@wildpastry/eslint-config 1.2.1 → 1.2.3

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 (2) hide show
  1. package/index.js +55 -52
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -1,53 +1,59 @@
1
1
  module.exports = {
2
- // Globals
3
- globals: {
4
- "root": true,
2
+ /* KEY:
3
+ * DONE = Checked and accepted rule
4
+ * DONE - CUSTOMISED = Accepted rule but changed default behaviour
5
+ * DONE - OFF = Disabled rule
6
+ */
7
+ "root": true,
5
8
 
6
- "ignorePatterns": ["cypress/*"],
7
-
8
- "extends": [
9
- "eslint:recommended",
10
- "plugin:@typescript-eslint/recommended",
11
- "plugin:@typescript-eslint/recommended-requiring-type-checking"
12
- ],
13
-
14
- "env": {
15
- "browser": true,
16
- "node": true,
17
- "es6": true
18
- },
19
-
20
- "plugins": ["react"],
21
-
22
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
23
-
24
- "ecmaFeatures": {
25
- "arrowFunctions": true,
26
- "binaryLiterals": true,
27
- "blockBindings": true,
28
- "classes": true,
29
- "defaultParams": true,
30
- "destructuring": true,
31
- "forOf": true,
32
- "generators": true,
33
- "modules": true,
34
- "objectLiteralComputedProperties": true,
35
- "objectLiteralDuplicateProperties": true,
36
- "objectLiteralShorthandMethods": true,
37
- "objectLiteralShorthandProperties": true,
38
- "octalLiterals": true,
39
- "regexUFlag": true,
40
- "regexYFlag": true,
41
- "spread": true,
42
- "superInFunctions": true,
43
- "templateStrings": true,
44
- "unicodeCodePointEscapes": true,
45
- "globalReturn": true,
46
- "jsx": true
9
+ "ignorePatterns": ["cypress/*"],
10
+
11
+ "overrides": [
12
+ {
13
+ "extends": [
14
+ "eslint:recommended",
15
+ "plugin:@typescript-eslint/recommended",
16
+ "plugin:@typescript-eslint/recommended-requiring-type-checking"
17
+ ],
18
+
19
+ "env": {
20
+ "browser": true,
21
+ "node": true,
22
+ "es6": true
23
+ },
24
+
25
+ "plugins": ["react"],
26
+
27
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
28
+
29
+ "ecmaFeatures": {
30
+ "arrowFunctions": true,
31
+ "binaryLiterals": true,
32
+ "blockBindings": true,
33
+ "classes": true,
34
+ "defaultParams": true,
35
+ "destructuring": true,
36
+ "forOf": true,
37
+ "generators": true,
38
+ "modules": true,
39
+ "objectLiteralComputedProperties": true,
40
+ "objectLiteralDuplicateProperties": true,
41
+ "objectLiteralShorthandMethods": true,
42
+ "objectLiteralShorthandProperties": true,
43
+ "octalLiterals": true,
44
+ "regexUFlag": true,
45
+ "regexYFlag": true,
46
+ "spread": true,
47
+ "superInFunctions": true,
48
+ "templateStrings": true,
49
+ "unicodeCodePointEscapes": true,
50
+ "globalReturn": true,
51
+ "jsx": true
52
+ }
47
53
  }
48
- },
49
- // Rules
50
- rules: {
54
+ ],
55
+
56
+ "rules": {
51
57
  "no-inferrable-types": 0, // disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean // DONE - OFF
52
58
  "no-unsafe-assignment": 0, // disallow assigning a value with type any to variables and properties // DONE - OFF
53
59
  "no-unsafe-member-access": 0, //disallow member access on a value with type any // DONE - OFF
@@ -232,10 +238,7 @@ module.exports = {
232
238
  "linebreak-style": 0, // enforce consistent linebreak style // OFF
233
239
  "lines-around-comment": 1, // require empty lines around comments // DONE
234
240
  "lines-between-class-members": 0, // require or disallow an empty line between class members // DONE
235
- "max-len": [
236
- 1,
237
- { "code": 140, "ignoreUrls": true, "ignorePattern": "^import .*" }
238
- ], // enforce a maximum line length // DONE - CUSTOMISED
241
+ "max-len": [1, { "code": 140, "ignoreUrls": true, "ignorePattern": "^import .*" }], // enforce a maximum line length // DONE - CUSTOMISED
239
242
  "max-statements-per-line": 1, // enforce a maximum number of statements allowed per line // DONE
240
243
  "multiline-ternary": 0, // enforce newlines between operands of ternary expressions // DONE - OFF
241
244
  "new-parens": 1, // enforce or disallow parentheses when invoking a constructor with no arguments // DONE
@@ -301,7 +304,7 @@ module.exports = {
301
304
  "space-in-brackets": [1, "never"], // require or disallow spaces inside brackets // DONE
302
305
  "space-return-throw-case": [1, "always"], // require a space after return, throw, and case // DONE
303
306
  "spaced-line-comment": [1, "always"], // require or disallow a space immediately following the // in a line comment // DONE
304
-
307
+
305
308
  // React specific
306
309
  "react/display-name": 0, // prevent missing displayName in a React component definition // DONE - OFF
307
310
  "react/jsx-quotes": [1, "double", "avoid-escape"], // Enforce quote style for JSX attributes // DONE
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@wildpastry/eslint-config",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "ESLint configuration file",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "publish": "npm publish --access public"
7
+ "deploy": "npm publish --access public"
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",