-
Notifications
You must be signed in to change notification settings - Fork 25
/
.eslintrc.js
44 lines (42 loc) · 1.11 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
const tsExtends = [
'airbnb-typescript/base',
'plugin:prettier/recommended',
'plugin:unicorn/recommended',
'plugin:radar/recommended',
]
const CYPRESS_TS_OVERRIDE = {
files: ['cypress/**/*.ts'],
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
extends: [...tsExtends, 'plugin:cypress/recommended', 'plugin:chai-friendly/recommended'],
rules: {
'radar/no-duplicate-string': 'off',
'radar/no-identical-functions': 'off',
'no-new': 'off',
'func-names': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
},
}
const TS_OVERRIDE = {
files: ['**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint'],
extends: tsExtends,
rules: {
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
},
overrides: [CYPRESS_TS_OVERRIDE],
}
module.exports = {
parserOptions: {
ecmaVersion: 6,
},
overrides: [TS_OVERRIDE],
}