1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | "use strict";
|
10 |
|
11 | const OFF = 0;
|
12 | const WARNING = 1;
|
13 | const ERROR = 2;
|
14 |
|
15 | module.exports = {
|
16 | "env": {
|
17 | "node": true,
|
18 | "es6": true,
|
19 | },
|
20 | "parser": "babel-eslint",
|
21 | "parserOptions": {
|
22 | "ecmaVersion": 6,
|
23 | "sourceType": "module",
|
24 | "ecmaFeatures": {
|
25 | "arrowFunctions": true,
|
26 | "blockBindings": true,
|
27 | "classes": true,
|
28 | "defaultParameters": true,
|
29 | "destructuring": true,
|
30 | "forOf": true,
|
31 | "generators": true,
|
32 | "modules": true,
|
33 | "objectLiteralComputedProperties": true,
|
34 | "objectLiteralDuplicateProperties": true,
|
35 | "objectLiteralShorthandMethods": true,
|
36 | "objectLiteralShorthandProperties": true,
|
37 | "regexUFlag": true,
|
38 | "regexYFlag": true,
|
39 | "restParams": true,
|
40 | "spread": true,
|
41 | "superInFunctions": true,
|
42 | "templateStrings": true,
|
43 | "unicodeCodePointEscapes": true,
|
44 | "globalReturn": true,
|
45 | "jsx": true,
|
46 | }
|
47 | },
|
48 | "plugins": [
|
49 | "prettier",
|
50 | ],
|
51 | "rules": {
|
52 | "prettier/prettier": [ ERROR, {
|
53 | "singleQuote": false,
|
54 | "tabWidth": 4,
|
55 | "trailingComma": "all",
|
56 | "bracketSpacing": false,
|
57 | "jsxBracketSameLine": true,
|
58 | } ],
|
59 |
|
60 | "accessor-pairs": ERROR,
|
61 | "block-scoped-var": ERROR,
|
62 | "consistent-this": [ ERROR, "self" ],
|
63 | "constructor-super": ERROR,
|
64 | "curly": ERROR,
|
65 | "dot-notation": ERROR,
|
66 | "eqeqeq": [ ERROR, "smart" ],
|
67 | "func-style": [ ERROR, "expression" ],
|
68 | "global-require": ERROR,
|
69 | "handle-callback-err": WARNING,
|
70 | "new-cap": ERROR,
|
71 | "newline-after-var": [ ERROR, "always" ],
|
72 |
|
73 | "no-alert": WARNING,
|
74 | "no-array-constructor": ERROR,
|
75 | "no-bitwise": ERROR,
|
76 | "no-caller": ERROR,
|
77 | "no-catch-shadow": ERROR,
|
78 | "no-class-assign": ERROR,
|
79 | "no-confusing-arrow": WARNING,
|
80 | "no-console": ERROR,
|
81 | "no-const-assign": ERROR,
|
82 | "no-constant-condition": ERROR,
|
83 | "no-continue": ERROR,
|
84 | "no-control-regex": ERROR,
|
85 | "no-debugger": WARNING,
|
86 | "no-delete-var": ERROR,
|
87 | "no-div-regex": WARNING,
|
88 | "no-dupe-class-members": ERROR,
|
89 | "no-dupe-keys": ERROR,
|
90 | "no-duplicate-case": ERROR,
|
91 | "no-else-return": ERROR,
|
92 | "no-empty": ERROR,
|
93 | "no-empty-character-class": ERROR,
|
94 | "no-eval": ERROR,
|
95 | "no-extend-native": ERROR,
|
96 | "no-extra-bind": ERROR,
|
97 | "no-extra-boolean-cast": ERROR,
|
98 | "no-fallthrough": ERROR,
|
99 | "no-func-assign": ERROR,
|
100 | "no-implied-eval": ERROR,
|
101 | "no-inner-declarations": ERROR,
|
102 | "no-invalid-regexp": ERROR,
|
103 | "no-irregular-whitespace": ERROR,
|
104 | "no-iterator": ERROR,
|
105 | "no-labels": ERROR,
|
106 | "no-lone-blocks": ERROR,
|
107 | "no-lonely-if": ERROR,
|
108 | "no-loop-func": ERROR,
|
109 | "no-multi-str": ERROR,
|
110 | "no-native-reassign": ERROR,
|
111 | "no-negated-in-lhs": ERROR,
|
112 | "no-nested-ternary": ERROR,
|
113 | "no-new": ERROR,
|
114 | "no-new-func": ERROR,
|
115 | "no-new-object": ERROR,
|
116 | "no-new-require": ERROR,
|
117 | "no-new-wrappers": ERROR,
|
118 | "no-octal": ERROR,
|
119 | "no-octal-escape": ERROR,
|
120 | "no-param-reassign": ERROR,
|
121 | "no-proto": ERROR,
|
122 | "no-redeclare": ERROR,
|
123 | "no-return-assign": ERROR,
|
124 | "no-self-compare": ERROR,
|
125 | "no-shadow": ERROR,
|
126 | "no-shadow-restricted-names": ERROR,
|
127 | "no-this-before-super": ERROR,
|
128 | "no-throw-literal": ERROR,
|
129 | "no-undef-init": ERROR,
|
130 | "no-unneeded-ternary": ERROR,
|
131 | "no-unreachable": ERROR,
|
132 | "no-unused-expressions": [ ERROR, { "allowShortCircuit": true, "allowTernary": true } ],
|
133 | "no-unused-vars": ERROR,
|
134 | "no-use-before-define": ERROR,
|
135 | "no-useless-call": ERROR,
|
136 | "no-useless-concat": ERROR,
|
137 | "no-var": ERROR,
|
138 | "no-void": ERROR,
|
139 | "no-warning-comments": OFF,
|
140 | "no-with": ERROR,
|
141 |
|
142 | "one-var": [ ERROR, { "var": "always", "let": "always", "const": "never" } ],
|
143 | "prefer-arrow-callback": WARNING,
|
144 | "prefer-spread": WARNING,
|
145 | "prefer-template": WARNING,
|
146 | "radix": [ ERROR, "as-needed" ],
|
147 |
|
148 | "require-yield": ERROR,
|
149 | "spaced-comment": [ ERROR, "always" ],
|
150 | "strict": [ ERROR, "function" ],
|
151 | "use-isnan": ERROR,
|
152 | "valid-typeof": ERROR,
|
153 | "vars-on-top": ERROR,
|
154 | "yoda": ERROR,
|
155 | }
|
156 | }
|