-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
56 lines (55 loc) · 1.47 KB
/
.eslintrc.cjs
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
const NodeGlobals = ['module', 'require']
module.exports = {
extends: [
'eslint-config-standard',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin', 'promise', 'tsdoc', 'jest'],
root: true,
env: {
node: true,
es6: true,
commonjs: true
},
rules: {
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/ban-ts-comment': 0,
'tsdoc/syntax': 'warn',
'no-debugger': 'error',
'no-unused-vars': [
'error',
// we are only using this rule to check for unused arguments since TS
// catches unused variables but not args.
{ varsIgnorePattern: '.*', args: 'none' }
],
// most of the codebase are expected to be env agnostic
'no-restricted-globals': ['error', ...NodeGlobals],
'@typescript-eslint/no-explicit-any': 0
},
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
ecmaVersion: 2018,
sourceType: 'module'
},
overrides: [
{
files: ['**/__tests__/**'],
rules: {
'no-restricted-globals': 'off',
'no-restricted-syntax': 'off',
'jest/no-disabled-tests': 'error',
'jest/no-focused-tests': 'error'
}
},
{
files: ['packages/*/playground/**/*.js', '.eslintrc.cjs'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'no-restricted-globals': 'off'
}
}
]
}