-
Notifications
You must be signed in to change notification settings - Fork 30
/
.eslintrc.js
84 lines (84 loc) · 2.21 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
module.exports = {
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
],
parser: '@babel/eslint-parser',
plugins: [
'prettier',
],
ignorePatterns: ['node_modules', 'dist'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'prettier/prettier': 'warn',
'no-console': 'off',
'prefer-object-spread': 'warn',
'prefer-spread': 'warn',
'no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
],
'no-useless-escape': 'off',
camelcase: ['warn', { properties: 'never' }],
'no-new': 'warn',
'new-cap': ['error', { newIsCap: true, capIsNew: false }],
'no-unused-vars': [
'error',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-comment": "off"
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
extends: ['plugin:@typescript-eslint/recommended', 'prettier'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-types': 'warn',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'off',
camelcase: 'off',
'@typescript-eslint/camelcase': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
],
},
},
{
files: ['*.test.*', '**/__mocks__/**'],
env: {
node: true,
es6: true,
commonjs: true,
jest: true,
},
},
{
files: [
'.babelrc.js',
'babel.config.js',
'.eslintrc.js',
'*.config.js',
'jest.setup.js',
],
env: {
node: true,
commonjs: true,
jest: true,
},
},
],
}