-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy patheslint.config.js
More file actions
83 lines (82 loc) · 2.32 KB
/
eslint.config.js
File metadata and controls
83 lines (82 loc) · 2.32 KB
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
80
81
82
83
const js = require('@eslint/js');
const tseslint = require('@typescript-eslint/eslint-plugin');
const tsparser = require('@typescript-eslint/parser');
module.exports = [
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
globals: {
// Node.js globals
require: 'readonly',
module: 'readonly',
exports: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
process: 'readonly',
Buffer: 'readonly',
console: 'readonly',
global: 'readonly',
setTimeout: 'readonly',
clearInterval: 'readonly',
URL: 'readonly',
TextDecoder: 'readonly',
// Browser globals
document: 'readonly',
window: 'readonly',
navigator: 'readonly',
XMLHttpRequest: 'readonly',
WebAssembly: 'readonly',
fetch: 'readonly',
atob: 'readonly',
self: 'readonly',
define: 'readonly',
// Jest globals
describe: 'readonly',
test: 'readonly',
expect: 'readonly',
beforeAll: 'readonly',
jest: 'readonly',
fail: 'readonly',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'prefer-const': 'off',
'semi': ['warn', 'always'],
'no-prototype-builtins': 'off',
'no-misleading-character-class': 'off',
'no-useless-escape': 'off',
'no-empty': 'off',
'no-redeclare': 'off',
'no-fallthrough': 'off',
'no-unsafe-finally': 'off',
'no-cond-assign': 'off',
'no-func-assign': 'off',
'no-undef': 'off',
},
},
{
ignores: [
'dist/**',
'node_modules/**',
'cdk.out/**',
'**/*.js',
'examples/**/cdk.out/**',
],
},
];