Skip to content

Commit 605f08d

Browse files
committed
Updated eslint
1 parent 825ff91 commit 605f08d

File tree

4 files changed

+1230
-1209
lines changed

4 files changed

+1230
-1209
lines changed

.eslintrc.json

Lines changed: 0 additions & 48 deletions
This file was deleted.

eslint.config.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT license.
3+
4+
import globals from 'globals';
5+
import js from '@eslint/js';
6+
import tsParser from '@typescript-eslint/parser';
7+
import eslintTypeScript from '@typescript-eslint/eslint-plugin';
8+
import eslintPluginPrettier from 'eslint-plugin-prettier';
9+
import eslintPrettierRecommended from 'eslint-plugin-prettier/recommended';
10+
import eslintTsDocPlugin from 'eslint-plugin-tsdoc';
11+
import header from 'eslint-plugin-header';
12+
header.rules.header.meta.schema = false;
13+
14+
export default [
15+
{
16+
ignores: ['**/out'],
17+
},
18+
js.configs.recommended,
19+
eslintPrettierRecommended,
20+
{
21+
files: ['**.{ts,js}'],
22+
23+
languageOptions: {
24+
globals: {
25+
...globals.node,
26+
},
27+
28+
parser: tsParser,
29+
ecmaVersion: 'latest',
30+
sourceType: 'module',
31+
},
32+
33+
plugins: {
34+
eslintTypeScript,
35+
header,
36+
tsdoc: eslintTsDocPlugin,
37+
eslintPluginPrettier,
38+
},
39+
40+
rules: {
41+
'header/header': [
42+
'error',
43+
'line',
44+
[
45+
' Copyright (c) Microsoft Corporation.',
46+
' Licensed under the MIT license.',
47+
],
48+
],
49+
'prettier/prettier': [
50+
'error',
51+
{
52+
singleQuote: true,
53+
endOfLine: 'auto',
54+
printWidth: 80,
55+
},
56+
],
57+
'tsdoc/syntax': 'warn',
58+
},
59+
},
60+
];

0 commit comments

Comments
 (0)