@wildpastry/eslint-config 1.2.7 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/.eslintrc +4 -8
  2. package/README.md +16 -9
  3. package/index.js +299 -330
  4. package/package.json +1 -1
package/.eslintrc CHANGED
@@ -229,9 +229,9 @@
229
229
  "generator-star-spacing": 1, // enforce consistent spacing around `*` operators in generator functions // DONE
230
230
  "implicit-arrow-linebreak": 1, // enforce the location of arrow function bodies // DONE
231
231
  "indent": [1, 2], // enforce consistent indentation. second value is number of spaces // DONE
232
- "jsx-quotes": 1, // enforce the consistent use of either double or single quotes in JSX attributes // DONE
233
- "key-spacing": 1, // enforce consistent spacing between keys and values in object literal properties // DONE
234
- "keyword-spacing": 1, // enforce consistent spacing before and after keywords // DONE
232
+ "jsx-quotes": [1, "prefer-single"], // enforce the consistent use of either double or single quotes in JSX attributes // DONE
233
+ "key-spacing": [1, { "beforeColon": false }], // enforce consistent spacing between keys and values in object literal properties // DONE
234
+ "keyword-spacing": [1, { "before": true }], // enforce consistent spacing before and after keywords // DONE
235
235
  "line-comment-position": 1, // enforce position of line comments // DONE
236
236
  "linebreak-style": 0, // enforce consistent linebreak style // OFF
237
237
  "lines-around-comment": 1, // require empty lines around comments // DONE
@@ -303,12 +303,9 @@
303
303
  "no-wrap-func": 1, // disallow wrapping of non-IIFE statements in parens // DONE
304
304
  "space-after-keywords": [1, "always"], // require a space after certain keywords // DONE
305
305
  "space-in-brackets": [1, "never"], // require or disallow spaces inside brackets // DONE
306
- "space-return-throw-case": [1, "always"], // require a space after return, throw, and case // DONE
307
- "spaced-line-comment": [1, "always"], // require or disallow a space immediately following the // in a line comment // DONE
308
306
 
309
307
  // React specific
310
308
  "react/display-name": 0, // prevent missing displayName in a React component definition // DONE - OFF
311
- "react/jsx-quotes": [1, "double", "avoid-escape"], // Enforce quote style for JSX attributes // DONE
312
309
  "react/jsx-no-undef": 1, // disallow undeclared variables in JSX // DONE
313
310
  "react/jsx-sort-props": 0, // enforce props alphabetical sorting // DONE - OFF
314
311
  "react/jsx-uses-react": 1, // prevent React to be incorrectly marked as unused // DONE
@@ -319,8 +316,7 @@
319
316
  "react/no-unknown-property": 1, // prevent usage of unknown DOM property // DONE
320
317
  "react/prop-types": 1, // prevent missing props validation in a React component definition // DONE
321
318
  "react/react-in-jsx-scope": 1, // prevent missing React when using JSX // DONE
322
- "react/self-closing-comp": 1, // prevent extra closing tags for components without children // DONE
323
- "react/wrap-multilines": 1 // prevent missing parentheses around multilines JSX // DONE
319
+ "react/self-closing-comp": 1 // prevent extra closing tags for components without children // DONE
324
320
  }
325
321
  }
326
322
  ]
package/README.md CHANGED
@@ -1,31 +1,38 @@
1
1
  # ESLintConfig
2
-
3
2
  Shareable ESLint configuration settings. No errors, only warnings.
4
3
 
5
4
  ## Prerequisites
6
-
7
5
  - Install the official ESLint extension in your IDE
8
6
  - Navigate to the root directory of your project
9
7
 
10
8
  ## Installation and usage
11
9
 
12
- ### Step One
13
-
10
+ ### Install eslint and plugins
14
11
  ```
15
- terminal > cd > project root
12
+ npm(or yarn) i eslint@latest
13
+ npm(or yarn) i @typescript-eslint/eslint-plugin
14
+ npm(or yarn) i eslint-plugin-react
16
15
  ```
17
- ### Step Two
18
16
 
17
+ ### Install eslint config
19
18
  ```
20
19
  npm(or yarn) i @wildpastry/eslint-config@latest
21
20
  ```
22
- ### Step Three
23
21
 
22
+ ### Create .eslintrc
24
23
  ```
25
- create new .eslintrc file (or modify existing)
24
+ create new .eslintrc file
26
25
  ```
27
- ### Step Four
28
26
 
27
+ ### Add config to .eslintrc
29
28
  ```
30
29
  add { "extends": "@wildpastry/eslint-config" }
31
30
  ```
31
+
32
+ ### Add scripts to package.json
33
+ ```
34
+ "scripts": {
35
+ "lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
36
+ "lint:fix": "eslint --fix \"**/*.{js,jsx,ts,tsx}\""
37
+ }
38
+ ```
package/index.js CHANGED
@@ -1,334 +1,303 @@
1
1
  module.exports = {
2
- /* KEY:
3
- * DONE = Checked and accepted rule
4
- * DONE - CUSTOMISED = Accepted rule but changed default behaviour
5
- * DONE - OFF = Disabled rule
6
- */
7
- rules: {
8
- curly: 1,
9
- semi: [1, 'always'],
10
- quotes: [1, 'single'],
11
- 'no-console': 1
12
- },
13
-
14
2
  root: true,
3
+ ignorePatterns: ["cypress/*"],
4
+ env: {
5
+ browser: true,
6
+ node: true,
7
+ es6: true
8
+ },
9
+ parser: "@typescript-eslint/parser",
10
+ plugins: ["@typescript-eslint", "react"],
11
+ parserOptions: {
12
+ ecmaFeatures: {
13
+ impliedStrict: true,
14
+ arrowFunctions: true,
15
+ binaryLiterals: true,
16
+ blockBindings: true,
17
+ classes: true,
18
+ defaultParams: true,
19
+ destructuring: true,
20
+ forOf: true,
21
+ generators: true,
22
+ modules: true,
23
+ objectLiteralComputedProperties: true,
24
+ objectLiteralDuplicateProperties: true,
25
+ objectLiteralShorthandMethods: true,
26
+ objectLiteralShorthandProperties: true,
27
+ octalLiterals: true,
28
+ regexUFlag: true,
29
+ regexYFlag: true,
30
+ spread: true,
31
+ superInFunctions: true,
32
+ templateStrings: true,
33
+ unicodeCodePointEscapes: true,
34
+ globalReturn: true,
35
+ jsx: true
36
+ },
37
+ requireConfigFile: false,
38
+ sourceType: "module",
39
+ },
40
+ rules: {
41
+ "no-inferrable-types": 0, // disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean // DONE - OFF
42
+ "no-unsafe-assignment": 0, // disallow assigning a value with type any to variables and properties // DONE - OFF
43
+ "no-unsafe-member-access": 0, //disallow member access on a value with type any // DONE - OFF
44
+ "array-callback-return": 0, // enforce `return` statements in callbacks of array methods // DONE - OFF
45
+ "no-await-in-loop": 0, // disallow `await` inside of loops // DONE - OFF
46
+ "no-constructor-return": 0, // disallow returning value from constructor // DONE - OFF
47
+ "no-duplicate-imports": 1, // disallow duplicate module imports // DONE
48
+ "no-promise-executor-return": 0, // disallow returning values from Promise executor functions // DONE - OFF
49
+ "no-self-compare": 1, // disallow comparisons where both sides are exactly the same // DONE
50
+ "no-template-curly-in-string": 0, // disallow template literal placeholder syntax in regular strings // DONE - OFF
51
+ "no-unmodified-loop-condition": 1, // disallow unmodified loop conditions // DONE
52
+ "no-unreachable-loop": 1, // disallow loops with a body that allows only one iteration // DONE
53
+ "no-use-before-define": 0, // disallow the use of variables before they are defined // DONE - OFF
54
+ "require-atomic-updates": 1, // disallow assignments that can lead to race conditions due to usage of `await` or `yield` // DONE
55
+ "accessor-pairs": 0, // enforce getter and setter pairs in objects and classes // DONE - OFF
56
+ "arrow-body-style": 0, // require braces around arrow function bodies // DONE - OFF
57
+ "block-scoped-var": 1, // enforce the use of variables within the scope they are defined // DONE
58
+ "camelcase": 1, // enforce camelcase naming convention // DONE
59
+ "capitalized-comments": 1, // enforce or disallow capitalization of the first letter of a comment // DONE
60
+ "class-methods-use-this": 0, // enforce that class methods utilize `this` // DONE
61
+ "complexity": 0, // enforce a maximum cyclomatic complexity allowed in a program // DONE - OFF
62
+ "consistent-return": 1, // require `return` statements to either always or never specify values // DONE
63
+ "consistent-this": 1, // enforce consistent naming when capturing the current execution context // DONE
64
+ "curly": 1, // enforce consistent brace style for all control statements // DONE
65
+ "default-case": 1, // require `default` cases in `switch` statements // DONE
66
+ "default-case-last": 1, // enforce default clauses in switch statements to be last // DONE
67
+ "default-param-last": 1, // enforce default parameters to be last // DONE
68
+ "dot-notation": 1, // enforce dot notation whenever possible // DONE
69
+ "eqeqeq": 1, // require the use of `===` and `!==` // DONE
70
+ "func-name-matching": 1, // require function names to match the name of the variable or property to which they are assigned // DONE
71
+ "func-names": 1, // require or disallow named `function` expressions // DONE
72
+ "func-style": 0, // enforce the consistent use of either `function` declarations or expressions // DONE - OFF
73
+ "grouped-accessor-pairs": 1, // require grouped accessor pairs in object literals and classes // DONE
74
+ "guard-for-in": 1, // require `for-in` loops to include an `if` statement // DONE
75
+ "id-denylist": 1, // disallow specified identifiers // DONE
76
+ "id-length": 0, // enforce minimum and maximum identifier lengths // DONE - OFF
77
+ "id-match": 1, // require identifiers to match a specified regular expression // DONE
78
+ "init-declarations": 0, // require or disallow initialization in variable declarations // DONE - OFF
79
+ "max-classes-per-file": 1, // enforce a maximum number of classes per file // DONE
80
+ "max-depth": [1, 3], // enforce a maximum depth that blocks can be nested // DONE
81
+ "max-lines": [1, { "max": 600, "skipBlankLines": true }], // enforce a maximum number of lines per file // DONE - CUSTOMISED
82
+ "max-lines-per-function": [1, { "max": 300 }], // enforce a maximum number of lines of code in a function // DONE - CUSTOMISED
83
+ "max-nested-callbacks": 1, // enforce a maximum depth that callbacks can be nested // DONE
84
+ "max-params": [1, { "max": 7 }], // enforce a maximum number of parameters in function definitions // DONE - CUSTOMISED
85
+ "max-statements": [1, { "max": 20 }], // enforce a maximum number of statements allowed in function blocks // DONE - CUSTOMISED
86
+ "multiline-comment-style": 1, // enforce a particular style for multiline comments // DONE
87
+ "new-cap": 0, // require constructor names to begin with a capital letter // DONE - OFF
88
+ "no-alert": 1, // disallow the use of `alert`, `confirm`, and `prompt` // DONE
89
+ "no-array-constructor": 1, // disallow `Array` constructors // DONE
90
+ "no-bitwise": 1, // disallow bitwise operators // DONE
91
+ "no-caller": 1, // disallow the use of `arguments.caller` or `arguments.callee` // DONE
92
+ "no-case-declarations": 1, // disallow lexical declarations in case clauses // DONE
93
+ "no-confusing-arrow": 1, // disallow arrow functions where they could be confused with comparisons // DONE
94
+ "no-console": 1, // disallow the use of `console` // DONE
95
+ "no-continue": 1, // disallow `continue` statements // DONE
96
+ "no-delete-var": 1, // disallow deleting variables // DONE
97
+ "no-div-regex": 1, // disallow division operators explicitly at the beginning of regular expressions // DONE
98
+ "no-else-return": 1, // disallow `else` blocks after `return` statements in `if` statements // DONE
99
+ "no-empty": 1, // disallow empty block statements // DONE
100
+ "no-empty-function": [1, { "allow": ["constructors"] }], // disallow empty functions // DONE - CUSTOMISED
101
+ "no-eq-null": 1, // disallow `null` comparisons without type-checking operators // DONE
102
+ "no-eval": 1, // disallow the use of `eval()` // DONE
103
+ "no-extend-native": 1, // disallow extending native types // DONE
104
+ "no-extra-bind": 1, // disallow unnecessary calls to `.bind()` // DONE
105
+ "no-extra-boolean-cast": 1, // disallow unnecessary boolean casts // DONE
106
+ "no-extra-label": 1, // disallow unnecessary labels // DONE
107
+ "no-extra-semi": 1, // disallow unnecessary semicolons // DONE
108
+ "no-floating-decimal": 1, // disallow leading or trailing decimal points in numeric literals // DONE
109
+ "no-global-assign": 1, // disallow assignments to native objects or read-only global variables // DONE
110
+ "no-implicit-coercion": 1, // disallow shorthand type conversions // DONE
111
+ "no-implicit-globals": 1, // disallow declarations in the global scope // DONE
112
+ "no-implied-eval": 1, // disallow the use of `eval()`-like methods // DONE
113
+ "no-inline-comments": 1, // disallow inline comments after code // DONE
114
+ "no-invalid-this": 1, // disallow `this` keywords outside of classes or class-like objects // DONE
115
+ "no-iterator": 1, // disallow the use of the `__iterator__` property // DONE
116
+ "no-label-var": 1, // disallow labels that share a name with a variable // DONE
117
+ "no-labels": 1, // disallow labeled statements // DONE
118
+ "no-lone-blocks": 1, // disallow unnecessary nested blocks // DONE
119
+ "no-lonely-if": 1, // disallow `if` statements as the only statement in `else` blocks // DONE
120
+ "no-loop-func": 1, // disallow function declarations that contain unsafe references inside loop statements // DONE
121
+ "no-magic-numbers": 0, // disallow magic numbers // Comment, this rule seems to be hard to satisfy. // DONE
122
+ "no-mixed-operators": 1, // disallow mixed binary operators // DONE
123
+ "no-multi-assign": 1, // disallow use of chained assignment expressions // DONE
124
+ "no-multi-str": 1, // disallow multiline strings // DONE
125
+ "no-negated-condition": 1, // disallow negated conditions // DONE
126
+ "no-nested-ternary": 1, // disallow nested ternary expressions // DONE
127
+ "no-new": 1, // disallow `new` operators outside of assignments or comparisons // DONE
128
+ "no-new-func": 1, // disallow `new` operators with the `Function` object // DONE
129
+ "no-new-object": 1, // disallow `Object` constructors // DONE
130
+ "no-new-wrappers": 1, // disallow `new` operators with the `String`, `Number`, and `Boolean` objects // DONE
131
+ "no-nonoctal-decimal-escape": 1, // disallow `\8` and `\9` escape sequences in string literals // DONE
132
+ "no-octal": 1, // disallow octal literals // DONE
133
+ "no-octal-escape": 1, // disallow octal escape sequences in string literals // DONE
134
+ "no-param-reassign": 1, // disallow reassigning `function` parameters // DONE
135
+ "no-plusplus": 0, // disallow the unary operators `++` and `--` // DONE - OFF
136
+ "no-proto": 1, // disallow the use of the `__proto__` property // DONE
137
+ "no-redeclare": 1, // disallow variable redeclaration // DONE
138
+ "no-regex-spaces": 1, // disallow multiple spaces in regular expressions // DONE
139
+ "no-restricted-exports": 1, // disallow specified names in exports // DONE
140
+ "no-restricted-globals": 1, // disallow specified global variables // DONE
141
+ "no-restricted-imports": 1, // disallow specified modules when loaded by `import` // DONE
142
+ "no-restricted-properties": 1, // disallow certain properties on certain objects // DONE
143
+ "no-restricted-syntax": 1, // disallow specified syntax // DONE
144
+ "no-return-assign": 1, // disallow assignment operators in `return` statements // DONE
145
+ "no-return-await": 1, // disallow unnecessary `return await` // DONE
146
+ "no-script-url": 1, // disallow `javascript:` urls // DONE
147
+ "no-sequences": 1, // disallow comma operators // DONE
148
+ "no-shadow": 0, // disallow variable declarations from shadowing variables declared in the outer scope // DONE
149
+ "no-shadow-restricted-names": 1, // disallow identifiers from shadowing restricted names // DONE
150
+ "no-ternary": 0, // disallow ternary operators // DONE - OFF
151
+ "no-throw-literal": 1, // disallow throwing literals as exceptions // DONE
152
+ "no-undef-init": 1, // disallow initializing variables to `undefined` // DONE
153
+ "no-undefined": 0, // disallow the use of `undefined` as an identifier // DONE
154
+ "no-underscore-dangle": 0, // disallow dangling underscores in identifiers // DONE
155
+ "no-unneeded-ternary": 0, // disallow ternary operators when simpler alternatives exist // DONE - OFF
156
+ "no-unused-expressions": 0, // disallow unused expressions // DONE - OFF
157
+ "no-unused-labels": 1, // disallow unused labels // DONE
158
+ "no-useless-call": 1, // disallow unnecessary calls to `.call()` and `.apply()` // DONE
159
+ "no-useless-catch": 1, // disallow unnecessary `catch` clauses // DONE
160
+ "no-useless-computed-key": 1, // disallow unnecessary computed property keys in objects and classes // DONE
161
+ "no-useless-concat": 1, // disallow unnecessary concatenation of literals or template literals // DONE
162
+ "no-useless-constructor": 0, // disallow unnecessary constructors // DONE
163
+ "no-useless-escape": 1, // disallow unnecessary escape characters // DONE
164
+ "no-useless-rename": 1, // disallow renaming import, export, and destructured assignments to the same name // DONE
165
+ "no-useless-return": 1, // disallow redundant return statements // DONE
166
+ "no-var": 1, // require `let` or `const` instead of `var` // DONE
167
+ "no-void": [1, { "allowAsStatement": true }], // disallow `void` operators // DONE - CUSTOMISED
168
+ "no-warning-comments": 1, // disallow specified warning terms in comments // DONE
169
+ "no-with": 1, // disallow `with` statements // DONE
170
+ "object-shorthand": 0, // require or disallow method and property shorthand syntax for object literals // DONE
171
+ "one-var": 0, // enforce variables to be declared either together or separately in functions // DONE
172
+ "one-var-declaration-per-line": 1, // require or disallow newlines around variable declarations // DONE
173
+ "operator-assignment": 1, // require or disallow assignment operator shorthand where possible // DONE
174
+ "prefer-arrow-callback": 1, // require using arrow functions for callbacks // DONE
175
+ "prefer-const": 1, // require `const` declarations for variables that are never reassigned after declared // DONE
176
+ "prefer-destructuring": 0, // require destructuring from arrays and/or objects // DONE - OFF
177
+ "prefer-exponentiation-operator": 1, // disallow the use of `Math.pow` in favor of the `**` operator // DONE
178
+ "prefer-named-capture-group": 1, // enforce using named capture group in regular expression // DONE
179
+ "prefer-numeric-literals": 1, // disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals // DONE
180
+ "prefer-object-spread": 1, // disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead. // DONE
181
+ "prefer-promise-reject-errors": 1, // require using Error objects as Promise rejection reasons // DONE
182
+ "prefer-regex-literals": 1, // disallow use of the `RegExp` constructor in favor of regular expression literals // DONE
183
+ "prefer-rest-params": 1, // require rest parameters instead of `arguments` // DONE
184
+ "prefer-spread": 1, // require spread operators instead of `.apply()` // DONE
185
+ "prefer-template": 1, // require template literals instead of string concatenation // DONE
186
+ "quote-props": 0, // require quotes around object literal property names // DONE
187
+ "radix": 1, // enforce the consistent use of the radix argument when using `parseInt()` // DONE
188
+ "require-await": 1, // disallow async functions which have no `await` expression // DONE
189
+ "require-unicode-regexp": 1, // enforce the use of `u` flag on RegExp // DONE
190
+ "require-yield": 1, // require generator functions to contain `yield` // DONE
191
+ "sort-imports": 1, // enforce sorted import declarations within modules // DONE
192
+ "sort-keys": 0, // require object keys to be sorted // DONE
193
+ "sort-vars": 1, // require variables within the same declaration block to be sorted // DONE
194
+ "spaced-comment": 1, // enforce consistent spacing after the `//` or `/*` in a comment // DONE
195
+ "strict": 0, // require or disallow strict mode directives // DONE - OFF
196
+ "symbol-description": 1, // require symbol descriptions // DONE
197
+ "vars-on-top": 1, // require `var` declarations be placed at the top of their containing scope // DONE
198
+ "yoda": 1, // require or disallow "Yoda" conditions // DONE
199
+ "array-bracket-newline": 1, // enforce linebreaks after opening and before closing array brackets // DONE
200
+ "array-bracket-spacing": 1, // enforce consistent spacing inside array brackets // DONE
201
+ "array-element-newline": 0, // enforce line breaks after each array element // DONE - OFF
202
+ "arrow-parens": 1, // require parentheses around arrow function arguments // DONE
203
+ "arrow-spacing": 1, // enforce consistent spacing before and after the arrow in arrow functions // DONE
204
+ "block-spacing": 1, // disallow or enforce spaces inside of blocks after opening block and before closing block // DONE
205
+ "brace-style": 1, // enforce consistent brace style for blocks // DONE
206
+ "comma-dangle": 1, // require or disallow trailing commas // DONE
207
+ "comma-spacing": 1, // enforce consistent spacing before and after commas // DONE
208
+ "comma-style": 1, // enforce consistent comma style // DONE
209
+ "computed-property-spacing": 1, // enforce consistent spacing inside computed property brackets // DONE
210
+ "dot-location": 0, // enforce consistent newlines before and after dots // DONE
211
+ "eol-last": 1, // require or disallow newline at the end of files // DONE
212
+ "func-call-spacing": 1, // require or disallow spacing between function identifiers and their invocations // DONE
213
+ "function-call-argument-newline": [1, "consistent"], // enforce line breaks between arguments of a function call // DONE - CUSTOMISED
214
+ "function-paren-newline": [1, "multiline-arguments"], // enforce consistent line breaks inside function parentheses // DONE
215
+ "generator-star-spacing": 1, // enforce consistent spacing around `*` operators in generator functions // DONE
216
+ "implicit-arrow-linebreak": 1, // enforce the location of arrow function bodies // DONE
217
+ "indent": [1, 2], // enforce consistent indentation. second value is number of spaces // DONE
218
+ "jsx-quotes": [1, "prefer-single"], // enforce the consistent use of either double or single quotes in JSX attributes // DONE
219
+ "key-spacing": [1, { "beforeColon": false }], // enforce consistent spacing between keys and values in object literal properties // DONE
220
+ "keyword-spacing": "always", // enforce consistent spacing before and after keywords // DONE
221
+ "line-comment-position": 1, // enforce position of line comments // DONE
222
+ "linebreak-style": 0, // enforce consistent linebreak style // OFF
223
+ "lines-around-comment": 1, // require empty lines around comments // DONE
224
+ "lines-between-class-members": 0, // require or disallow an empty line between class members // DONE
225
+ "max-len": [1, { "code": 140, "ignoreUrls": true, "ignorePattern": "^import .*" }], // enforce a maximum line length // DONE - CUSTOMISED
226
+ "max-statements-per-line": 1, // enforce a maximum number of statements allowed per line // DONE
227
+ "multiline-ternary": 0, // enforce newlines between operands of ternary expressions // DONE - OFF
228
+ "new-parens": 1, // enforce or disallow parentheses when invoking a constructor with no arguments // DONE
229
+ "newline-per-chained-call": 1, // require a newline after each call in a method chain // DONE
230
+ "no-extra-parens": 0, // disallow unnecessary parentheses // DONE - OFF
231
+ "no-mixed-spaces-and-tabs": 1, // disallow mixed spaces and tabs for indentation // DONE
232
+ "no-multi-spaces": 1, // disallow multiple spaces // DONE
233
+ "no-multiple-empty-lines": 1, // disallow multiple empty lines // DONE
234
+ "no-tabs": 1, // disallow all tabs // DONE
235
+ "no-trailing-spaces": 1, // disallow trailing whitespace at the end of lines // DONE
236
+ "no-whitespace-before-property": 1, // disallow whitespace before properties // DONE
237
+ "nonblock-statement-body-position": 1, // enforce the location of single-line statements // DONE
238
+ "object-curly-newline": 1, // enforce consistent line breaks after opening and before closing braces // DONE
239
+ "object-curly-spacing": [1, "always"], // enforce consistent spacing inside braces // DONE
240
+ "object-property-newline": 0, // enforce placing object properties on separate lines // DONE - OFF
241
+ "operator-linebreak": 1, // enforce consistent linebreak style for operators // DONE
242
+ "padded-blocks": 0, // require or disallow padding within blocks // DONE
243
+ "padding-line-between-statements": 1, // require or disallow padding lines between statements // DONE
244
+ "quotes": [1, "single"], // enforce the consistent use of either backticks, double, or single quotes // DONE
245
+ "rest-spread-spacing": 1, // enforce spacing between rest and spread operators and their expressions // DONE
246
+ "semi": [1, "always"], // require or disallow semicolons instead of ASI // DONE
247
+ "semi-spacing": 1, // enforce consistent spacing before and after semicolons // DONE
248
+ "semi-style": 1, // enforce location of semicolons // DONE
249
+ "space-before-blocks": 1, // enforce consistent spacing before blocks // DONE
250
+ "space-before-function-paren": 0, // enforce consistent spacing before `function` definition opening parenthesis // DONE
251
+ "space-in-parens": 1, // enforce consistent spacing inside parentheses // DONE
252
+ "space-infix-ops": 1, // require spacing around infix operators // DONE
253
+ "space-unary-ops": 1, // enforce consistent spacing before or after unary operators // DONE
254
+ "switch-colon-spacing": 1, // enforce spacing around colons of switch statements // DONE
255
+ "template-curly-spacing": 1, // require or disallow spacing around embedded expressions of template strings // DONE
256
+ "template-tag-spacing": 1, // require or disallow spacing between template tags and their literals // DONE
257
+ "unicode-bom": 1, // require or disallow Unicode byte order mark (BOM) // DONE
258
+ "wrap-iife": 1, // require parentheses around immediate `function` invocations // DONE
259
+ "wrap-regex": 1, // require parenthesis around regex literals // DONE
260
+ "yield-star-spacing": 1, // require or disallow spacing around the `*` in `yield*` expressions // DONE
261
+ "no-cond-assign": 1, // disallow assignment in conditional expressions // DONE
262
+ "no-constant-condition": 1, // disallow use of constant expressions in conditions // DONE
263
+ "no-control-regex": 1, // disallow control characters in regular expressions // DONE
264
+ "no-debugger": 0, // disallow use of debugger // DONE - OFF
265
+ "no-dupe-args": 1, // disallow duplicate arguments in functions // DONE
266
+ "no-dupe-keys": 1, // disallow duplicate keys when creating object literals // DONE
267
+ "no-duplicate-case": 1, // disallow a duplicate case label // DONE
268
+ "no-ex-assign": 1, // disallow assigning to the exception in a catch block // DONE
269
+ "no-func-assign": 1, // disallow overwriting functions written as function declarations // DONE
270
+ "no-inner-declarations": 1, // disallow function or variable declarations in nested blocks // DONE
271
+ "no-invalid-regexp": 1, // disallow invalid regular expression strings in the RegExp constructor // DONE
272
+ "no-irregular-whitespace": 1, // disallow irregular whitespace outside of strings and comments // DONE
273
+ "no-negated-in-lhs": 1, // disallow negation of the left operand of an in expression // DONE
274
+ "no-obj-calls": 1, // disallow the use of object properties of the global object (Math and JSON) as functions // DONE
275
+ "quote-props": [1, "as-needed"], // require quotes around object literal property names // DONE
276
+ "no-sparse-arrays": 1, // disallow sparse arrays // DONE
277
+ "no-unreachable": 1, // disallow unreachable statements after a return, throw, continue, or break statement // DONE
278
+ "use-isnan": 1, // disallow comparisons with the value NaN // DONE
279
+ "valid-jsdoc": 1, // ensure JSDoc comments are valid // DONE
280
+ "valid-typeof": 1, // ensure that the results of typeof are compared against a valid string // DONE
281
+ "no-catch-shadow": 1, // disallow the catch clause parameter name being the same as a variable in the outer scope // DONE
282
+ "no-unused-vars": 1, // disallow declaration of variables that are not used in the code // DONE
283
+ "newline-after-var": 0, // allow/disallow an empty newline after var statement // DONE - OFF
284
+ "no-spaced-func": 1, // disallow space between function identifier and application // DONE
285
+ "keyword-spacing": [1, { "before": true }], // enforce consistent spacing before and after keywords // DONE
286
+ "object-curly-spacing": [1, "always"], // enforce consistent spacing inside braces // DONE
287
+ "array-bracket-spacing": [1, "always"], // enforces consistent spacing inside array brackets // DONE
15
288
 
16
- ignorePatterns: ['cypress/*'],
17
-
18
- overrides: [
19
- {
20
- extends: [
21
- 'eslint:recommended',
22
- 'plugin:@typescript-eslint/recommended',
23
- 'plugin:@typescript-eslint/recommended-requiring-type-checking',
24
- ],
25
-
26
- env: {
27
- browser: true,
28
- node: true,
29
- es6: true,
30
- },
31
-
32
- plugins: ['react'],
33
-
34
- files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
35
-
36
- ecmaFeatures: {
37
- arrowFunctions: true,
38
- binaryLiterals: true,
39
- blockBindings: true,
40
- classes: true,
41
- defaultParams: true,
42
- destructuring: true,
43
- forOf: true,
44
- generators: true,
45
- modules: true,
46
- objectLiteralComputedProperties: true,
47
- objectLiteralDuplicateProperties: true,
48
- objectLiteralShorthandMethods: true,
49
- objectLiteralShorthandProperties: true,
50
- octalLiterals: true,
51
- regexUFlag: true,
52
- regexYFlag: true,
53
- spread: true,
54
- superInFunctions: true,
55
- templateStrings: true,
56
- unicodeCodePointEscapes: true,
57
- globalReturn: true,
58
- jsx: true,
59
- },
60
-
61
- rules: {
62
- 'no-inferrable-types': 0, // disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean // DONE - OFF
63
- 'no-unsafe-assignment': 0, // disallow assigning a value with type any to variables and properties // DONE - OFF
64
- 'no-unsafe-member-access': 0, //disallow member access on a value with type any // DONE - OFF
65
- 'array-callback-return': 0, // enforce `return` statements in callbacks of array methods // DONE - OFF
66
- 'no-await-in-loop': 0, // disallow `await` inside of loops // DONE - OFF
67
- 'no-constructor-return': 0, // disallow returning value from constructor // DONE - OFF
68
- 'no-duplicate-imports': 1, // disallow duplicate module imports // DONE
69
- 'no-promise-executor-return': 0, // disallow returning values from Promise executor functions // DONE - OFF
70
- 'no-self-compare': 1, // disallow comparisons where both sides are exactly the same // DONE
71
- 'no-template-curly-in-string': 0, // disallow template literal placeholder syntax in regular strings // DONE - OFF
72
- 'no-unmodified-loop-condition': 1, // disallow unmodified loop conditions // DONE
73
- 'no-unreachable-loop': 1, // disallow loops with a body that allows only one iteration // DONE
74
- 'no-use-before-define': 0, // disallow the use of variables before they are defined // DONE - OFF
75
- 'require-atomic-updates': 1, // disallow assignments that can lead to race conditions due to usage of `await` or `yield` // DONE
76
- 'accessor-pairs': 0, // enforce getter and setter pairs in objects and classes // DONE - OFF
77
- 'arrow-body-style': 0, // require braces around arrow function bodies // DONE - OFF
78
- 'block-scoped-var': 1, // enforce the use of variables within the scope they are defined // DONE
79
- 'camelcase': 1, // enforce camelcase naming convention // DONE
80
- 'capitalized-comments': 1, // enforce or disallow capitalization of the first letter of a comment // DONE
81
- 'class-methods-use-this': 0, // enforce that class methods utilize `this` // DONE
82
- 'complexity': 0, // enforce a maximum cyclomatic complexity allowed in a program // DONE - OFF
83
- 'consistent-return': 1, // require `return` statements to either always or never specify values // DONE
84
- 'consistent-this': 1, // enforce consistent naming when capturing the current execution context // DONE
85
- 'curly': 1, // enforce consistent brace style for all control statements // DONE
86
- 'default-case': 1, // require `default` cases in `switch` statements // DONE
87
- 'default-case-last': 1, // enforce default clauses in switch statements to be last // DONE
88
- 'default-param-last': 1, // enforce default parameters to be last // DONE
89
- 'dot-notation': 1, // enforce dot notation whenever possible // DONE
90
- 'eqeqeq': 1, // require the use of `===` and `!==` // DONE
91
- 'func-name-matching': 1, // require function names to match the name of the variable or property to which they are assigned // DONE
92
- 'func-names': 1, // require or disallow named `function` expressions // DONE
93
- 'func-style': 0, // enforce the consistent use of either `function` declarations or expressions // DONE - OFF
94
- 'grouped-accessor-pairs': 1, // require grouped accessor pairs in object literals and classes // DONE
95
- 'guard-for-in': 1, // require `for-in` loops to include an `if` statement // DONE
96
- 'id-denylist': 1, // disallow specified identifiers // DONE
97
- 'id-length': 0, // enforce minimum and maximum identifier lengths // DONE - OFF
98
- 'id-match': 1, // require identifiers to match a specified regular expression // DONE
99
- 'init-declarations': 0, // require or disallow initialization in variable declarations // DONE - OFF
100
- 'max-classes-per-file': 1, // enforce a maximum number of classes per file // DONE
101
- 'max-depth': [1, 3], // enforce a maximum depth that blocks can be nested // DONE
102
- 'max-lines': [1, { max: 600, skipBlankLines: true }], // enforce a maximum number of lines per file // DONE - CUSTOMISED
103
- 'max-lines-per-function': [1, { max: 300 }], // enforce a maximum number of lines of code in a function // DONE - CUSTOMISED
104
- 'max-nested-callbacks': 1, // enforce a maximum depth that callbacks can be nested // DONE
105
- 'max-params': [1, { max: 7 }], // enforce a maximum number of parameters in function definitions // DONE - CUSTOMISED
106
- 'max-statements': [1, { max: 20 }], // enforce a maximum number of statements allowed in function blocks // DONE - CUSTOMISED
107
- 'multiline-comment-style': 1, // enforce a particular style for multiline comments // DONE
108
- 'new-cap': 0, // require constructor names to begin with a capital letter // DONE - OFF
109
- 'no-alert': 1, // disallow the use of `alert`, `confirm`, and `prompt` // DONE
110
- 'no-array-constructor': 1, // disallow `Array` constructors // DONE
111
- 'no-bitwise': 1, // disallow bitwise operators // DONE
112
- 'no-caller': 1, // disallow the use of `arguments.caller` or `arguments.callee` // DONE
113
- 'no-case-declarations': 1, // disallow lexical declarations in case clauses // DONE
114
- 'no-confusing-arrow': 1, // disallow arrow functions where they could be confused with comparisons // DONE
115
- 'no-console': 1, // disallow the use of `console` // DONE
116
- 'no-continue': 1, // disallow `continue` statements // DONE
117
- 'no-delete-var': 1, // disallow deleting variables // DONE
118
- 'no-div-regex': 1, // disallow division operators explicitly at the beginning of regular expressions // DONE
119
- 'no-else-return': 1, // disallow `else` blocks after `return` statements in `if` statements // DONE
120
- 'no-empty': 1, // disallow empty block statements // DONE
121
- 'no-empty-function': [1, { allow: ['constructors'] }], // disallow empty functions // DONE - CUSTOMISED
122
- 'no-eq-null': 1, // disallow `null` comparisons without type-checking operators // DONE
123
- 'no-eval': 1, // disallow the use of `eval()` // DONE
124
- 'no-extend-native': 1, // disallow extending native types // DONE
125
- 'no-extra-bind': 1, // disallow unnecessary calls to `.bind()` // DONE
126
- 'no-extra-boolean-cast': 1, // disallow unnecessary boolean casts // DONE
127
- 'no-extra-label': 1, // disallow unnecessary labels // DONE
128
- 'no-extra-semi': 1, // disallow unnecessary semicolons // DONE
129
- 'no-floating-decimal': 1, // disallow leading or trailing decimal points in numeric literals // DONE
130
- 'no-global-assign': 1, // disallow assignments to native objects or read-only global variables // DONE
131
- 'no-implicit-coercion': 1, // disallow shorthand type conversions // DONE
132
- 'no-implicit-globals': 1, // disallow declarations in the global scope // DONE
133
- 'no-implied-eval': 1, // disallow the use of `eval()`-like methods // DONE
134
- 'no-inline-comments': 1, // disallow inline comments after code // DONE
135
- 'no-invalid-this': 1, // disallow `this` keywords outside of classes or class-like objects // DONE
136
- 'no-iterator': 1, // disallow the use of the `__iterator__` property // DONE
137
- 'no-label-var': 1, // disallow labels that share a name with a variable // DONE
138
- 'no-labels': 1, // disallow labeled statements // DONE
139
- 'no-lone-blocks': 1, // disallow unnecessary nested blocks // DONE
140
- 'no-lonely-if': 1, // disallow `if` statements as the only statement in `else` blocks // DONE
141
- 'no-loop-func': 1, // disallow function declarations that contain unsafe references inside loop statements // DONE
142
- 'no-magic-numbers': 0, // disallow magic numbers // Comment, this rule seems to be hard to satisfy. // DONE
143
- 'no-mixed-operators': 1, // disallow mixed binary operators // DONE
144
- 'no-multi-assign': 1, // disallow use of chained assignment expressions // DONE
145
- 'no-multi-str': 1, // disallow multiline strings // DONE
146
- 'no-negated-condition': 1, // disallow negated conditions // DONE
147
- 'no-nested-ternary': 1, // disallow nested ternary expressions // DONE
148
- 'no-new': 1, // disallow `new` operators outside of assignments or comparisons // DONE
149
- 'no-new-func': 1, // disallow `new` operators with the `Function` object // DONE
150
- 'no-new-object': 1, // disallow `Object` constructors // DONE
151
- 'no-new-wrappers': 1, // disallow `new` operators with the `String`, `Number`, and `Boolean` objects // DONE
152
- 'no-nonoctal-decimal-escape': 1, // disallow `\8` and `\9` escape sequences in string literals // DONE
153
- 'no-octal': 1, // disallow octal literals // DONE
154
- 'no-octal-escape': 1, // disallow octal escape sequences in string literals // DONE
155
- 'no-param-reassign': 1, // disallow reassigning `function` parameters // DONE
156
- 'no-plusplus': 0, // disallow the unary operators `++` and `--` // DONE - OFF
157
- 'no-proto': 1, // disallow the use of the `__proto__` property // DONE
158
- 'no-redeclare': 1, // disallow variable redeclaration // DONE
159
- 'no-regex-spaces': 1, // disallow multiple spaces in regular expressions // DONE
160
- 'no-restricted-exports': 1, // disallow specified names in exports // DONE
161
- 'no-restricted-globals': 1, // disallow specified global variables // DONE
162
- 'no-restricted-imports': 1, // disallow specified modules when loaded by `import` // DONE
163
- 'no-restricted-properties': 1, // disallow certain properties on certain objects // DONE
164
- 'no-restricted-syntax': 1, // disallow specified syntax // DONE
165
- 'no-return-assign': 1, // disallow assignment operators in `return` statements // DONE
166
- 'no-return-await': 1, // disallow unnecessary `return await` // DONE
167
- 'no-script-url': 1, // disallow `javascript:` urls // DONE
168
- 'no-sequences': 1, // disallow comma operators // DONE
169
- 'no-shadow': 0, // disallow variable declarations from shadowing variables declared in the outer scope // DONE
170
- 'no-shadow-restricted-names': 1, // disallow identifiers from shadowing restricted names // DONE
171
- 'no-ternary': 0, // disallow ternary operators // DONE - OFF
172
- 'no-throw-literal': 1, // disallow throwing literals as exceptions // DONE
173
- 'no-undef-init': 1, // disallow initializing variables to `undefined` // DONE
174
- 'no-undefined': 0, // disallow the use of `undefined` as an identifier // DONE
175
- 'no-underscore-dangle': 0, // disallow dangling underscores in identifiers // DONE
176
- 'no-unneeded-ternary': 0, // disallow ternary operators when simpler alternatives exist // DONE - OFF
177
- 'no-unused-expressions': 0, // disallow unused expressions // DONE - OFF
178
- 'no-unused-labels': 1, // disallow unused labels // DONE
179
- 'no-useless-call': 1, // disallow unnecessary calls to `.call()` and `.apply()` // DONE
180
- 'no-useless-catch': 1, // disallow unnecessary `catch` clauses // DONE
181
- 'no-useless-computed-key': 1, // disallow unnecessary computed property keys in objects and classes // DONE
182
- 'no-useless-concat': 1, // disallow unnecessary concatenation of literals or template literals // DONE
183
- 'no-useless-constructor': 0, // disallow unnecessary constructors // DONE
184
- 'no-useless-escape': 1, // disallow unnecessary escape characters // DONE
185
- 'no-useless-rename': 1, // disallow renaming import, export, and destructured assignments to the same name // DONE
186
- 'no-useless-return': 1, // disallow redundant return statements // DONE
187
- 'no-var': 1, // require `let` or `const` instead of `var` // DONE
188
- 'no-void': [1, { allowAsStatement: true }], // disallow `void` operators // DONE - CUSTOMISED
189
- 'no-warning-comments': 1, // disallow specified warning terms in comments // DONE
190
- 'no-with': 1, // disallow `with` statements // DONE
191
- 'object-shorthand': 0, // require or disallow method and property shorthand syntax for object literals // DONE
192
- 'one-var': 0, // enforce variables to be declared either together or separately in functions // DONE
193
- 'one-var-declaration-per-line': 1, // require or disallow newlines around variable declarations // DONE
194
- 'operator-assignment': 1, // require or disallow assignment operator shorthand where possible // DONE
195
- 'prefer-arrow-callback': 1, // require using arrow functions for callbacks // DONE
196
- 'prefer-const': 1, // require `const` declarations for variables that are never reassigned after declared // DONE
197
- 'prefer-destructuring': 0, // require destructuring from arrays and/or objects // DONE - OFF
198
- 'prefer-exponentiation-operator': 1, // disallow the use of `Math.pow` in favor of the `**` operator // DONE
199
- 'prefer-named-capture-group': 1, // enforce using named capture group in regular expression // DONE
200
- 'prefer-numeric-literals': 1, // disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals // DONE
201
- 'prefer-object-spread': 1, // disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead. // DONE
202
- 'prefer-promise-reject-errors': 1, // require using Error objects as Promise rejection reasons // DONE
203
- 'prefer-regex-literals': 1, // disallow use of the `RegExp` constructor in favor of regular expression literals // DONE
204
- 'prefer-rest-params': 1, // require rest parameters instead of `arguments` // DONE
205
- 'prefer-spread': 1, // require spread operators instead of `.apply()` // DONE
206
- 'prefer-template': 1, // require template literals instead of string concatenation // DONE
207
- 'quote-props': 0, // require quotes around object literal property names // DONE
208
- 'radix': 1, // enforce the consistent use of the radix argument when using `parseInt()` // DONE
209
- 'require-await': 1, // disallow async functions which have no `await` expression // DONE
210
- 'require-unicode-regexp': 1, // enforce the use of `u` flag on RegExp // DONE
211
- 'require-yield': 1, // require generator functions to contain `yield` // DONE
212
- 'sort-imports': 1, // enforce sorted import declarations within modules // DONE
213
- 'sort-keys': 0, // require object keys to be sorted // DONE
214
- 'sort-vars': 1, // require variables within the same declaration block to be sorted // DONE
215
- 'spaced-comment': 1, // enforce consistent spacing after the `//` or `/*` in a comment // DONE
216
- 'strict': 0, // require or disallow strict mode directives // DONE - OFF
217
- 'symbol-description': 1, // require symbol descriptions // DONE
218
- 'vars-on-top': 1, // require `var` declarations be placed at the top of their containing scope // DONE
219
- 'yoda': 1, // require or disallow "Yoda" conditions // DONE
220
- 'array-bracket-newline': 1, // enforce linebreaks after opening and before closing array brackets // DONE
221
- 'array-bracket-spacing': 1, // enforce consistent spacing inside array brackets // DONE
222
- 'array-element-newline': 0, // enforce line breaks after each array element // DONE - OFF
223
- 'arrow-parens': 1, // require parentheses around arrow function arguments // DONE
224
- 'arrow-spacing': 1, // enforce consistent spacing before and after the arrow in arrow functions // DONE
225
- 'block-spacing': 1, // disallow or enforce spaces inside of blocks after opening block and before closing block // DONE
226
- 'brace-style': 1, // enforce consistent brace style for blocks // DONE
227
- 'comma-dangle': 1, // require or disallow trailing commas // DONE
228
- 'comma-spacing': 1, // enforce consistent spacing before and after commas // DONE
229
- 'comma-style': 1, // enforce consistent comma style // DONE
230
- 'computed-property-spacing': 1, // enforce consistent spacing inside computed property brackets // DONE
231
- 'dot-location': 0, // enforce consistent newlines before and after dots // DONE
232
- 'eol-last': 1, // require or disallow newline at the end of files // DONE
233
- 'func-call-spacing': 1, // require or disallow spacing between function identifiers and their invocations // DONE
234
- 'function-call-argument-newline': [1, 'consistent'], // enforce line breaks between arguments of a function call // DONE - CUSTOMISED
235
- 'function-paren-newline': [1, 'multiline-arguments'], // enforce consistent line breaks inside function parentheses // DONE
236
- 'generator-star-spacing': 1, // enforce consistent spacing around `*` operators in generator functions // DONE
237
- 'implicit-arrow-linebreak': 1, // enforce the location of arrow function bodies // DONE
238
- 'indent': [1, 2], // enforce consistent indentation. second value is number of spaces // DONE
239
- 'jsx-quotes': 1, // enforce the consistent use of either double or single quotes in JSX attributes // DONE
240
- 'key-spacing': 1, // enforce consistent spacing between keys and values in object literal properties // DONE
241
- 'keyword-spacing': 1, // enforce consistent spacing before and after keywords // DONE
242
- 'line-comment-position': 1, // enforce position of line comments // DONE
243
- 'linebreak-style': 0, // enforce consistent linebreak style // OFF
244
- 'lines-around-comment': 1, // require empty lines around comments // DONE
245
- 'lines-between-class-members': 0, // require or disallow an empty line between class members // DONE
246
- 'max-len': [
247
- 1,
248
- { code: 140, ignoreUrls: true, ignorePattern: '^import .*' },
249
- ], // enforce a maximum line length // DONE - CUSTOMISED
250
- 'max-statements-per-line': 1, // enforce a maximum number of statements allowed per line // DONE
251
- 'multiline-ternary': 0, // enforce newlines between operands of ternary expressions // DONE - OFF
252
- 'new-parens': 1, // enforce or disallow parentheses when invoking a constructor with no arguments // DONE
253
- 'newline-per-chained-call': 1, // require a newline after each call in a method chain // DONE
254
- 'no-extra-parens': 0, // disallow unnecessary parentheses // DONE - OFF
255
- 'no-mixed-spaces-and-tabs': 1, // disallow mixed spaces and tabs for indentation // DONE
256
- 'no-multi-spaces': 1, // disallow multiple spaces // DONE
257
- 'no-multiple-empty-lines': 1, // disallow multiple empty lines // DONE
258
- 'no-tabs': 1, // disallow all tabs // DONE
259
- 'no-trailing-spaces': 1, // disallow trailing whitespace at the end of lines // DONE
260
- 'no-whitespace-before-property': 1, // disallow whitespace before properties // DONE
261
- 'nonblock-statement-body-position': 1, // enforce the location of single-line statements // DONE
262
- 'object-curly-newline': 1, // enforce consistent line breaks after opening and before closing braces // DONE
263
- 'object-curly-spacing': [1, 'always'], // enforce consistent spacing inside braces // DONE
264
- 'object-property-newline': 0, // enforce placing object properties on separate lines // DONE - OFF
265
- 'operator-linebreak': 1, // enforce consistent linebreak style for operators // DONE
266
- 'padded-blocks': 0, // require or disallow padding within blocks // DONE
267
- 'padding-line-between-statements': 1, // require or disallow padding lines between statements // DONE
268
- 'quotes': [1, 'single'], // enforce the consistent use of either backticks, double, or single quotes // DONE
269
- 'rest-spread-spacing': 1, // enforce spacing between rest and spread operators and their expressions // DONE
270
- 'semi': [1, 'always'], // require or disallow semicolons instead of ASI // DONE
271
- 'semi-spacing': 1, // enforce consistent spacing before and after semicolons // DONE
272
- 'semi-style': 1, // enforce location of semicolons // DONE
273
- 'space-before-blocks': 1, // enforce consistent spacing before blocks // DONE
274
- 'space-before-function-paren': 0, // enforce consistent spacing before `function` definition opening parenthesis // DONE
275
- 'space-in-parens': 1, // enforce consistent spacing inside parentheses // DONE
276
- 'space-infix-ops': 1, // require spacing around infix operators // DONE
277
- 'space-unary-ops': 1, // enforce consistent spacing before or after unary operators // DONE
278
- 'switch-colon-spacing': 1, // enforce spacing around colons of switch statements // DONE
279
- 'template-curly-spacing': 1, // require or disallow spacing around embedded expressions of template strings // DONE
280
- 'template-tag-spacing': 1, // require or disallow spacing between template tags and their literals // DONE
281
- 'unicode-bom': 1, // require or disallow Unicode byte order mark (BOM) // DONE
282
- 'wrap-iife': 1, // require parentheses around immediate `function` invocations // DONE
283
- 'wrap-regex': 1, // require parenthesis around regex literals // DONE
284
- 'yield-star-spacing': 1, // require or disallow spacing around the `*` in `yield*` expressions // DONE
285
- 'no-cond-assign': 1, // disallow assignment in conditional expressions // DONE
286
- 'no-constant-condition': 1, // disallow use of constant expressions in conditions // DONE
287
- 'no-control-regex': 1, // disallow control characters in regular expressions // DONE
288
- 'no-debugger': 0, // disallow use of debugger // DONE - OFF
289
- 'no-dupe-args': 1, // disallow duplicate arguments in functions // DONE
290
- 'no-dupe-keys': 1, // disallow duplicate keys when creating object literals // DONE
291
- 'no-duplicate-case': 1, // disallow a duplicate case label // DONE
292
- 'no-empty-class': 1, // disallow the use of empty character classes in regular expressions // DONE
293
- 'no-ex-assign': 1, // disallow assigning to the exception in a catch block // DONE
294
- 'no-func-assign': 1, // disallow overwriting functions written as function declarations // DONE
295
- 'no-inner-declarations': 1, // disallow function or variable declarations in nested blocks // DONE
296
- 'no-invalid-regexp': 1, // disallow invalid regular expression strings in the RegExp constructor // DONE
297
- 'no-irregular-whitespace': 1, // disallow irregular whitespace outside of strings and comments // DONE
298
- 'no-negated-in-lhs': 1, // disallow negation of the left operand of an in expression // DONE
299
- 'no-obj-calls': 1, // disallow the use of object properties of the global object (Math and JSON) as functions // DONE
300
- 'no-reserved-keys': 1, // disallow reserved words being used as object literal keys // DONE
301
- 'no-sparse-arrays': 1, // disallow sparse arrays // DONE
302
- 'no-unreachable': 1, // disallow unreachable statements after a return, throw, continue, or break statement // DONE
303
- 'use-isnan': 1, // disallow comparisons with the value NaN // DONE
304
- 'valid-jsdoc': 1, // ensure JSDoc comments are valid // DONE
305
- 'valid-typeof': 1, // ensure that the results of typeof are compared against a valid string // DONE
306
- 'no-catch-shadow': 1, // disallow the catch clause parameter name being the same as a variable in the outer scope // DONE
307
- 'no-unused-vars': 1, // disallow declaration of variables that are not used in the code // DONE
308
- 'newline-after-var': 0, // allow/disallow an empty newline after var statement // DONE - OFF
309
- 'no-spaced-func': 1, // disallow space between function identifier and application // DONE
310
- 'no-wrap-func': 1, // disallow wrapping of non-IIFE statements in parens // DONE
311
- 'space-after-keywords': [1, 'always'], // require a space after certain keywords // DONE
312
- 'space-in-brackets': [1, 'never'], // require or disallow spaces inside brackets // DONE
313
- 'space-return-throw-case': [1, 'always'], // require a space after return, throw, and case // DONE
314
- 'spaced-line-comment': [1, 'always'], // require or disallow a space immediately following the // in a line comment // DONE
315
-
316
- // React specific
317
- 'react/display-name': 0, // prevent missing displayName in a React component definition // DONE - OFF
318
- 'react/jsx-quotes': [1, 'double', 'avoid-escape'], // Enforce quote style for JSX attributes // DONE
319
- 'react/jsx-no-undef': 1, // disallow undeclared variables in JSX // DONE
320
- 'react/jsx-sort-props': 0, // enforce props alphabetical sorting // DONE - OFF
321
- 'react/jsx-uses-react': 1, // prevent React to be incorrectly marked as unused // DONE
322
- 'react/jsx-uses-vars': 1, // prevent variables used in JSX to be incorrectly marked as unused // DONE
323
- 'react/no-did-mount-set-state': 1, // prevent usage of setState in componentDidMount // DONE
324
- 'react/no-did-update-set-state': 1, // prevent usage of setState in componentDidUpdate // DONE
325
- 'react/no-multi-comp': 0, // prevent multiple component definition per file // DONE - OFF
326
- 'react/no-unknown-property': 1, // prevent usage of unknown DOM property // DONE
327
- 'react/prop-types': 1, // prevent missing props validation in a React component definition // DONE
328
- 'react/react-in-jsx-scope': 1, // prevent missing React when using JSX // DONE
329
- 'react/self-closing-comp': 1, // prevent extra closing tags for components without children // DONE
330
- 'react/wrap-multilines': 1 // prevent missing parentheses around multilines JSX // DONE
331
- }
332
- }
333
- ]
289
+ // React specific
290
+ "react/display-name": 0, // prevent missing displayName in a React component definition // DONE - OFF
291
+ "react/jsx-no-undef": 1, // disallow undeclared variables in JSX // DONE
292
+ "react/jsx-sort-props": 0, // enforce props alphabetical sorting // DONE - OFF
293
+ "react/jsx-uses-react": 1, // prevent React to be incorrectly marked as unused // DONE
294
+ "react/jsx-uses-vars": 1, // prevent variables used in JSX to be incorrectly marked as unused // DONE
295
+ "react/no-did-mount-set-state": 1, // prevent usage of setState in componentDidMount // DONE
296
+ "react/no-did-update-set-state": 1, // prevent usage of setState in componentDidUpdate // DONE
297
+ "react/no-multi-comp": 0, // prevent multiple component definition per file // DONE - OFF
298
+ "react/no-unknown-property": 1, // prevent usage of unknown DOM property // DONE
299
+ "react/prop-types": 1, // prevent missing props validation in a React component definition // DONE
300
+ "react/react-in-jsx-scope": 1, // prevent missing React when using JSX // DONE
301
+ "react/self-closing-comp": 1 // prevent extra closing tags for components without children // DONE
302
+ },
334
303
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildpastry/eslint-config",
3
- "version": "1.2.7",
3
+ "version": "1.3.0",
4
4
  "description": "ESLint configuration file",
5
5
  "main": "index.js",
6
6
  "scripts": {