-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
79 lines (76 loc) · 2.84 KB
/
.eslintrc.js
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
const path = require("path");
module.exports = {
root: true,
env: {
node: true,
es2020: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
plugins: ['@typescript-eslint', 'header'],
rules: {
"header/header": [
2,
"block",
[
"",
"Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.",
"SPDX-License-Identifier: Apache-2.0",
""
]
],
'@typescript-eslint/array-type': ['warn'],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/class-literal-property-style': ['warn'],
'@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
'@typescript-eslint/explicit-function-return-type': ['error'],
'@typescript-eslint/explicit-member-accessibility': ['warn'],
'@typescript-eslint/naming-convention': [
'error',
{ selector: 'variableLike', format: ['camelCase'] },
{ selector: 'memberLike', format: ['camelCase'] },
{ selector: 'typeLike', format: ['PascalCase'] },
],
'@typescript-eslint/no-confusing-void-expression': ['error'],
'@typescript-eslint/no-empty-interface': ['warn'],
'@typescript-eslint/no-inferrable-types': ['warn'],
'@typescript-eslint/no-invalid-void-type': ['error'],
'@typescript-eslint/no-throw-literal': ['error'],
'@typescript-eslint/no-unnecessary-boolean-literal-compare': ['warn'],
'@typescript-eslint/no-unnecessary-condition': ['warn'],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_.*', varsIgnorePattern: '^_.*' },
],
'@typescript-eslint/no-useless-constructor': ['error'],
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-enum-initializers': ['error'],
'@typescript-eslint/prefer-for-of': ['warn'],
'@typescript-eslint/prefer-includes': ['warn'],
'@typescript-eslint/prefer-optional-chain': ['warn'],
'@typescript-eslint/prefer-readonly': ['warn'],
'@typescript-eslint/prefer-string-starts-ends-with': ['warn'],
'@typescript-eslint/unified-signatures': ['warn'],
'no-undef': 0,
'no-func-assign': 0,
'padding-line-between-statements': [
'error',
{
blankLine: 'always',
prev: ['export', 'class'],
next: '*',
},
],
},
};