-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy path.eslintrc.js
executable file
·43 lines (43 loc) · 968 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
37
38
39
40
41
42
43
module.exports = {
root: true,
env: {
browser: true,
commonjs: true,
es6: true,
es2016: true,
es2017: true,
es2018: true,
es2019: true,
es2020: true,
es2021: true,
jest: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
plugins: ['prettier'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
_: false,
},
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
rules: {
'eol-last': ['error', 'always'],
'prettier/prettier': 'error',
'linebreak-style': ['error', 'unix'],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
semi: ['error', 'always'],
},
overrides: [
{
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
env: {
jest: true,
},
},
],
};