forked from SeleniumHQ/selenium-ide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
87 lines (87 loc) · 2.15 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
80
81
82
83
84
85
86
87
module.exports = {
env: {
browser: true,
node: true,
es6: true,
jest: true,
webextensions: true,
},
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:react/recommended',
'prettier',
],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true,
legacyDecorators: true,
},
sourceType: 'module',
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
rules: {
'@typescript-eslint/array-type': ['error', { default: 'array' }],
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/interface-name-prefix': ['error', 'never'],
'no-dupe-class-members': 'off',
'no-unused-vars': 'off',
'no-inner-declarations': 0, // for typescript namespace
},
},
],
plugins: ['@typescript-eslint', 'jest', 'react', 'prettier', 'no-only-tests'],
rules: {
'prettier/prettier': 'error',
'react/prop-types': [0],
'no-const-assign': 'error',
'no-this-before-super': 'error',
'no-undef': 'error',
'no-unreachable': 'error',
'no-unused-vars': [
'error',
{ varsIgnorePattern: '^_', args: 'all', argsIgnorePattern: '^_' },
],
'constructor-super': 'error',
'valid-typeof': 'error',
'no-only-tests/no-only-tests': 'error',
'node/no-unpublished-require': [
'error',
{
allowModules: ['electron'],
},
],
'node/no-unsupported-features/es-syntax': 0,
'node/no-unsupported-features/node-builtins': 0,
'node/shebang': [
'error',
{
convertPath: {
'src/**/*.js': ['src/(.+)$', 'dist/$1'],
'src/**/*.ts': ['src/(.+)ts$', 'dist/$1js'],
},
},
],
'node/no-missing-import': [
'error',
{
allowModules: ['electron'],
tryExtensions: ['.js', '.jsx', '.json', '.ts', '.tsx', '.node'],
},
],
},
settings: {
react: {
version: 'detect',
},
},
}