-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.mjs
65 lines (59 loc) · 1.39 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import globals from 'globals';
import js from '@eslint/js';
import tsParser from '@typescript-eslint/parser';
import eslintTypeScript from '@typescript-eslint/eslint-plugin';
import eslintPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintTsDocPlugin from 'eslint-plugin-tsdoc';
import header from 'eslint-plugin-header';
header.rules.header.meta.schema = false;
export default [
{
ignores: ['**/out'],
},
js.configs.recommended,
eslintPrettierRecommended,
{
files: ['**/*.{ts,mjs}'],
languageOptions: {
globals: {
...globals.node,
},
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: {
typeScript: eslintTypeScript,
header,
tsdoc: eslintTsDocPlugin,
},
rules: {
'header/header': [
'error',
'line',
[
' Copyright (c) Microsoft Corporation.',
' Licensed under the MIT license.',
],
],
'prettier/prettier': [
'error',
{
singleQuote: true,
endOfLine: 'auto',
printWidth: 80,
},
],
'no-unused-vars': 'off',
'typeScript/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
},
],
'tsdoc/syntax': 'warn',
},
},
];