-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
36 lines (35 loc) · 897 Bytes
/
.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
module.exports = {
/* your base configuration of choice */
extends: ['eslint:recommended', 'plugin:react/recommended'],
// parser: 'babel-eslint',
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: ["@typescript-eslint"],
env: {
browser: true,
node: true,
es6: true
},
globals: {
__static: true
},
settings: {
react: {
version: 'detect'
}
},
rules: {
// allow anonymous component functions
'react/display-name': 0,
// disallow console and debugger in production mode
'no-console': process.env.NODE_ENV === 'production' ? 2 : 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
// allow spreading out properties from an object without warnings
'no-unused-vars': [0, { ignoreRestSiblings: true }]
}
}