-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.js
51 lines (50 loc) · 1.41 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
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json', './packages/*/tsconfig.json'],
},
plugins: ['@typescript-eslint', 'prettier', 'header', 'jest'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:jest/recommended',
],
env: {
node: true,
},
rules: {
eqeqeq: 'error',
'no-fallthrough': 'error',
'prefer-template': 'error',
'require-await': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-floating-promises': 'error',
'no-console': 'error',
'header/header': [
'error',
'line',
[
' Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.',
' SPDX-License-Identifier: Apache-2.0',
],
2,
],
'no-restricted-syntax': [
'error',
{
selector: 'TSEnumDeclaration',
message: "Don't declare enums; use an object instead, and mark it with `as const`",
},
{
selector: 'ExportDefaultDeclaration',
message: 'Use named exports instead of default exports',
},
],
},
}