-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
90 lines (89 loc) · 2.08 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
'use strict';
module.exports = {
root: true,
extends: 'airbnb-base',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'script',
requireConfigFile: false,
},
env: {
es6: true,
node: true,
},
overrides: [
{
files: ['*.jsx'],
parserOptions: {
sourceType: 'module',
ecmaFeatures: { jsx: true },
},
},
{
files: ['*.mjs'],
parserOptions: { sourceType: 'module' },
env: {
node: true,
},
rules: {
'no-restricted-globals': ['error', 'require'],
},
},
{
files: ['*.web.js'],
env: { browser: true },
},
],
rules: {
'strict': ['error', 'global'],
'indent': ['error', 2, {
SwitchCase: 1,
FunctionDeclaration: {
parameters: 'first',
},
FunctionExpression: {
parameters: 'first',
},
CallExpression: {
arguments: 'first',
},
}],
'no-bitwise': 'off',
'no-iterator': 'off',
'global-require': 'off',
'quote-props': ['error', 'consistent-as-needed'],
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
'curly': ['error', 'all'],
'no-param-reassign': 'off',
'arrow-parens': ['error', 'always'],
'no-multi-assign': 'off',
'no-underscore-dangle': 'off',
'no-restricted-syntax': 'off',
'object-curly-newline': 'off',
'prefer-const': ['error', { destructuring: 'all' }],
'class-methods-use-this': 'off',
'implicit-arrow-linebreak': 'off',
'lines-between-class-members': 'off',
'import/no-dynamic-require': 'off',
'import/no-extraneous-dependencies': ['error', {
devDependencies: true,
}],
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'max-classes-per-file': 'off',
},
globals: {
WebAssembly: false,
BigInt: false,
BigInt64Array: false,
BigUint64Array: false,
URL: false,
Atomics: false,
SharedArrayBuffer: false,
globalThis: false,
FinalizationRegistry: false,
WeakRef: false,
queueMicrotask: false,
},
};