-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
84 lines (84 loc) · 2.28 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 = {
parser: '@typescript-eslint/parser',
extends: [
'airbnb-base',
'react-app',
'plugin:monorepo/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier/react',
'prettier/@typescript-eslint',
],
plugins: ['@typescript-eslint', 'prettier'],
parserOptions: { ecmaFeatures: { jsx: true } },
env: {
browser: true,
},
rules: {
'class-methods-use-this': 'off',
'import/no-cycle': 'warn',
'import/prefer-default-export': 'off',
'monorepo/no-internal-import': 'off',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-debugger': 'warn',
'no-param-reassign': 'off',
'no-restricted-syntax': 'off',
'global-require': 'off',
'no-underscore-dangle': 'warn',
'no-unused-vars': 'warn',
'no-use-before-define': 'off',
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: false,
trailingComma: 'all',
},
],
'react/destructuring-assignment': 'warn',
'react/jsx-filename-extension': 'off',
'react/no-unused-prop-types': 'warn',
'react/no-unused-state': 'warn',
'react/prefer-stateless-function': 'warn',
'react/prop-types': 'warn',
'react/require-default-props': 'warn',
'@typescript-eslint/explicit-function-return-type': ['error', { 'allowExpressions': true }],
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/camelcase': 'warn',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
overrides: [
{
files: ['packages/generator-jbrowse/**/*'],
env: { node: true },
rules: { '@typescript-eslint/no-var-requires': 'off' },
},
{
files: ['**/*.worker.js'],
globals: { self: true },
rules: { 'no-restricted-globals': 'off' },
},
{
files: ['**/*.test.[t,j]s'],
env: { jest: true },
globals: {
document: true,
it: true,
describe: true,
test: true,
},
rules: {
'import/no-extraneous-dependencies': 'off',
// 'no-restricted-globals': 'off',
},
},
],
}