-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.js
40 lines (40 loc) · 1.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
module.exports = {
//this is the project root dir, eslint will not include parent config files
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 8,
},
//predefined available global variables
env: {
es6: true,
// activate commonjs syntax (module.export and require) for webpack
commonjs: true,
},
overrides: [
{
// for test files activate the jest env variables
files: ['**/__tests__/*.{j,t}s?(x)', '**/e2e/**/*.{j,t}s?(x)', '**.test.{j,t}s?(x)'],
env: {
jest: true,
node: true,
},
// extends in override possible since eslint version 6.x
// problem: vscode eslint extension bug: https://github.com/microsoft/vscode-eslint/issues/696
// that is why it is still commented out
// extends: [
// 'plugin:jest/recommended',
// ]
},
],
//self defined available global variables
globals: {},
extends: [
'eslint-config-prettier', // has to go last to override
],
rules: {
'no-warning-comments': 'warn', // Marks TODO: etc. as warnings
'no-undef': 'warn', // no-undef for console etc.
'no-console': 'warn', // don't use console but instead the logging methods in each project
},
};