forked from elastic/elastic-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
74 lines (71 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
'plugin:react/recommended',
],
plugins: ['import', 'jest'],
env: {
es6: true,
node: true,
mocha: true,
browser: true,
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 6,
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true,
},
// NOTE: That is to avoid a known performance issue related with the `ts.Program` used by
// typescript eslint. As we are not using rules that need types information, we can safely
// disabling that feature setting the project to undefined. That issue is being addressed
// by the typescript eslint team. More info could be found here:
// https://github.com/typescript-eslint/typescript-eslint/issues/389
// https://github.com/typescript-eslint/typescript-eslint/issues/243
// https://github.com/typescript-eslint/typescript-eslint/pull/361
project: undefined,
},
rules: {
'no-unused-vars': ['error', {
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
},],
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
},
],
'comma-dangle': ['error', 'always-multiline'],
'sort-keys': 'off',
'import/no-default-export': 'error',
'import/no-unresolved': 'error',
'no-irregular-whitespace': 'error',
'no-unused-expressions': 'error',
quotemark: [true, 'single', 'jsx-double'],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-use-before-define': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.mjs', '.js', '.json', '.ts', '.tsx'],
},
},
react: {
version: 'detect',
},
},
};