Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*]
indent_style = space
indent_size = 2
insert_final_newline = true
20 changes: 13 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"cSpell.ignoreWords": [
"graphtutorial",
"odata"
],
"cSpell.words": [
"graphapponlytutorial"
]
"cSpell.ignoreWords": [
"graphapponlytutorial",
"graphtutorial",
"odata"
],
"cSpell.overrides": [
{
"filename": "package.json",
"ignoreWords": [
"ganchev"
]
}
]
}
4 changes: 3 additions & 1 deletion app-auth/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# How to run the completed project

<!-- markdownlint-disable MD060 -->

## Prerequisites

To run the completed project in this folder, you need the following:
Expand Down Expand Up @@ -81,5 +83,5 @@ In your command-line interface (CLI), navigate to the project directory and run

```Shell
npm install
npx ts-node index.ts
npm start
```
65 changes: 65 additions & 0 deletions app-auth/graphapponlytutorial/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

// cSpell:ignore ganchev

import { defineConfig } from 'eslint/config';

import tseslint from 'typescript-eslint';
import eslintPrettierRecommended from 'eslint-plugin-prettier/recommended';
import header from '@tony.ganchev/eslint-plugin-header';

export default defineConfig(
{
ignores: ['**/build'],
},
tseslint.configs.recommended,
eslintPrettierRecommended,
{
files: ['**/**.{ts,js}'],

languageOptions: {
parser: tseslint.parser,
ecmaVersion: 6,
sourceType: 'module',
},

plugins: {
header,
'@typescript-eslint': tseslint.plugin,
},

rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'header/header': [
'error',
'line',
[
' Copyright (c) Microsoft Corporation.',
' Licensed under the MIT license.',
],
2,
],
'prettier/prettier': [
'error',
{
singleQuote: true,
jsxSingleQuote: true,
endOfLine: 'auto',
printWidth: 80,
},
],
},
},
);
55 changes: 0 additions & 55 deletions app-auth/graphapponlytutorial/eslint.config.mjs

This file was deleted.

4 changes: 2 additions & 2 deletions app-auth/graphapponlytutorial/graphHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { ClientSecretCredential } from '@azure/identity';
import { Client, PageCollection } from '@microsoft/microsoft-graph-client';
// prettier-ignore
import { TokenCredentialAuthenticationProvider } from
'@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials';
'@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.js';

import { AppSettings } from './appSettings';
import { AppSettings } from './appSettings.js';

let _settings: AppSettings | undefined = undefined;
let _clientSecretCredential: ClientSecretCredential | undefined = undefined;
Expand Down
4 changes: 2 additions & 2 deletions app-auth/graphapponlytutorial/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import * as readline from 'readline-sync';
import { User } from '@microsoft/microsoft-graph-types';

import settings, { AppSettings } from './appSettings';
import * as graphHelper from './graphHelper';
import settings, { AppSettings } from './appSettings.js';
import * as graphHelper from './graphHelper.js';

async function main() {
console.log('TypeScript Graph Tutorial');
Expand Down
Loading