-
Notifications
You must be signed in to change notification settings - Fork 399
Expand file tree
/
Copy path.eslintrc.js
More file actions
88 lines (88 loc) · 2.61 KB
/
.eslintrc.js
File metadata and controls
88 lines (88 loc) · 2.61 KB
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
module.exports = {
root: true,
env: {
node: true,
builtin: true,
es6: true,
browser: true,
},
parser: '@babel/eslint-parser',
// TODO: Check for "Note: The parserOptions described in the official documentation are for the default parser and are not necessarily supported by @babel/eslint-parser. Please see the section directly below for supported parserOptions.": https://www.npmjs.com/package/@babel/eslint-parser
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
allowImportExportEverywhere: true,
ecmaFeatures: {
jsx: true,
experimentalDecorators: true,
},
},
globals: {},
plugins: ['@babel', 'prettier'],
extends: ['plugin:prettier/recommended'],
// TODO: Check for "ESLint rules relating to code formatting", compare to "This plugin works best if you disable all other ESLint rules relating to code formatting, and only enable rules that detect potential bugs. (If another active ESLint rule disagrees with prettier about how code should be formatted, it will be impossible to avoid lint errors.)", source: https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
rules: {
'prettier/prettier': 'error',
'block-scoped-var': 0,
camelcase: 0,
'consistent-return': 2,
curly: [2, 'all'],
'dot-notation': [1, { allowKeywords: true }],
eqeqeq: [2, 'allow-null'],
'strict': [0, 'never'],
'guard-for-in': 2,
'key-spacing': 0,
'new-cap': 0,
'no-alert': 2,
'no-bitwise': 2,
'no-caller': 2,
'no-cond-assign': [2, 'except-parens'],
'no-debugger': 2,
'no-dupe-args': 2,
'no-dupe-keys': 2,
'no-empty': 2,
'no-eval': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-parens': 0,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-invalid-regexp': 2,
'no-irregular-whitespace': 1,
'no-iterator': 2,
'no-loop-func': 2,
'node/no-mixed-requires': 0,
'no-multi-str': 2,
'no-global-assign': 2,
'no-new': 2,
'no-param-reassign': 1,
'no-proto': 2,
'no-redeclare': 0,
'no-script-url': 2,
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow': 2,
'no-undef': 2,
'no-underscore-dangle': 0,
'no-unreachable': 1,
'no-unused-vars': 1,
'no-use-before-define': 1,
'no-useless-call': 2,
'no-useless-concat': 2,
'no-var': 2,
'no-with': 2,
quotes: [0, 'single'],
radix: 2,
strict: 0,
'valid-typeof': 2,
'vars-on-top': 0,
'prefer-const': [
'error',
{
destructuring: 'any',
ignoreReadBeforeAssign: false,
},
],
},
};