-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.js
98 lines (98 loc) · 2.26 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
88
89
90
91
92
93
94
95
96
97
98
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
},
parser: '@typescript-eslint/parser',
extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier', 'prettier/prettier'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
createjs: false,
},
overrides: [
{
files: ['**/*.test.js'],
globals: {
container: 'writable',
createjs: 'writable',
parentEl: 'writable',
stage: 'writable',
},
}
],
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true,
},
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.json',
},
root: true,
plugins: ['import', '@typescript-eslint'],
rules: {
'array-bracket-newline': 'warn',
'no-underscore-dangle': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
ts: 'never',
tsx: 'never',
},
],
'no-plusplus': 'off',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowTernary: true,
}
],
'object-shorthand': 'error',
'consistent-return': 'off',
'no-mixed-operators': 'warn',
'no-bitwise': 'warn',
'no-multiple-empty-lines': 'warn',
'no-new': 'warn',
'no-eval': 'warn',
'no-lone-blocks': 'off',
'no-return-assign': 'warn',
'no-duplicate-case': 'error',
'class-methods-use-this': 'off',
'import/prefer-default-export': 'off',
'prefer-rest-params': 'warn',
'no-restricted-properties': [
'off',
{
object: 'Math',
property: 'pow',
},
],
'no-continue': 'warn',
'max-len': 'warn',
'no-param-reassign': 'off',
'new-cap': 'warn',
'quote-props': 'off',
'no-use-before-define': 'warn',
'object-curly-newline': 'warn',
'no-multi-spaces': 'warn',
'arrow-spacing': ['error', { before: true, after: true }],
'space-in-parens': 'warn',
'prefer-destructuring': 'off',
'import/no-unresolved': 'off',
},
settings: {
'import/core-modules': ['createjs', 'TimelineMax'],
'import/resolver': {
node: {
moduleDirectory: ['node_modules', 'src'],
extensions: ['.js'],
},
},
},
};