forked from visgl/hubble.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
74 lines (65 loc) · 1.81 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
const {getESLintConfig, deepMerge} = require('ocular-dev-tools');
const defaultConfig = getESLintConfig({react: '16.13.1'});
// Make any changes to default config here
const config = deepMerge(defaultConfig, {
parserOptions: {
project: ['./jsconfig.json'],
ecmaVersion: 2020
},
extends: ['prettier'],
env: {
es6: true,
browser: true
// node: true
},
rules: {
camelcase: 0,
indent: 0,
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': 0, // ['warn'],
'no-console': 1,
'no-continue': ['warn'],
'callback-return': 0,
'max-depth': ['warn', 4],
complexity: ['warn'],
'max-statements': ['warn'],
'default-case': ['warn'],
'no-eq-null': ['warn'],
eqeqeq: ['warn'],
radix: 0,
'arrow-parens': ['error', 'as-needed'] // TODO: Remove later
// 'accessor-pairs': ['error', {getWithoutSet: false, setWithoutGet: false}]
},
overrides: [
{
files: ['*.spec.js', 'webpack.config.js', '**/bundle/*.js'],
rules: {
'import/no-extraneous-dependencies': 0
}
}
],
settings: {
// Ensure eslint finds typescript files
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx']
}
}
}
});
// config.overrides[1].parserOptions = {
// project: ['./tsconfig.json']
// };
// Uncomment to log the eslint config
// console.debug(config);
module.exports = config;
// rules: {
// 'guard-for-in': 0,
// 'no-inline-comments': 0,
// camelcase: 0,
// 'react/forbid-prop-types': 0,
// 'react/no-deprecated': 0,
// 'import/no-unresolved': ['error', {ignore: ['test']}],
// 'import/no-extraneous-dependencies': ['error', {devDependencies: false, peerDependencies: true}],
// // 'accessor-pairs': ['error', {getWithoutSet: false, setWithoutGet: false}],
// },