@newsteam/eslint-config 1.0.0 → 1.1.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.
@@ -470,7 +470,7 @@ export const stylisticPlugin = [
470
470
  *
471
471
  * https://eslint.style/rules/default/multiline-ternary
472
472
  */
473
- "@stylistic/multiline-ternary": ["error", "never"],
473
+ "@stylistic/multiline-ternary": ["error", "always-multiline"],
474
474
  /*
475
475
  * Require parentheses when invoking a constructor with no arguments
476
476
  *
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/plugins/typescript.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAusC3C,CAAC"}
1
+ {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/plugins/typescript.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAwsC3C,CAAC"}
@@ -34,6 +34,7 @@ export const typescriptPlugin = [
34
34
  "no-magic-numbers": "off",
35
35
  "no-redeclare": "off",
36
36
  "no-shadow": "off",
37
+ "no-undef": "off",
37
38
  "no-undef-init": "off",
38
39
  "no-undefined": "off",
39
40
  "no-unused-vars": "off",
@@ -1 +1 @@
1
- {"version":3,"file":"unicorn.d.ts","sourceRoot":"","sources":["../../src/plugins/unicorn.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAw8BxC,CAAC"}
1
+ {"version":3,"file":"unicorn.d.ts","sourceRoot":"","sources":["../../src/plugins/unicorn.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EA69BxC,CAAC"}
@@ -1,3 +1,14 @@
1
+ /*
2
+
3
+ eslint
4
+
5
+ max-lines: "off",
6
+
7
+ --
8
+
9
+ not really an issue in a file like this, it's just a big list
10
+
11
+ */
1
12
  import unicorn from "eslint-plugin-unicorn";
2
13
  /*
3
14
  * Various awesome ESLint rules
@@ -39,6 +50,12 @@ export const unicornPlugin = [
39
50
  * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md
40
51
  */
41
52
  "unicorn/consistent-empty-array-spread": "error",
53
+ /*
54
+ * Enforce consistent style for element existence checks with indexOf(), lastIndexOf(), findIndex(), and findLastIndex()
55
+ *
56
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md
57
+ */
58
+ "unicorn/consistent-existence-index-check": "error",
42
59
  /*
43
60
  * Move function definitions to the highest possible scope.
44
61
  *
@@ -511,6 +528,12 @@ export const unicornPlugin = [
511
528
  * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md
512
529
  */
513
530
  "unicorn/prefer-export-from": "error",
531
+ /*
532
+ * Prefer `globalThis` over `window`, `self`, and `global`.
533
+ *
534
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md
535
+ */
536
+ "unicorn/prefer-global-this": "error",
514
537
  /*
515
538
  * Prefer .includes() over .indexOf() when checking for existence or non-existence
516
539
  *
@@ -535,6 +558,12 @@ export const unicornPlugin = [
535
558
  * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md
536
559
  */
537
560
  "unicorn/prefer-logical-operator-over-ternary": "error",
561
+ /*
562
+ * Prefer Math.min() and Math.max() over ternaries for simple comparisons
563
+ *
564
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md
565
+ */
566
+ "unicorn/prefer-math-min-max": "error",
538
567
  /*
539
568
  * Enforce the use of Math.trunc instead of bitwise operators. (partly fixable)
540
569
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newsteam/eslint-config",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Shared config for eslint",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -51,13 +51,13 @@
51
51
  "dist"
52
52
  ],
53
53
  "dependencies": {
54
- "@babel/eslint-parser": "^7.25.1",
55
- "@babel/preset-env": "^7.25.4",
54
+ "@babel/eslint-parser": "^7.25.7",
55
+ "@babel/preset-env": "^7.25.7",
56
56
  "@eslint/compat": "^1.1.1",
57
- "@next/eslint-plugin-next": "^14.2.12",
57
+ "@next/eslint-plugin-next": "^14.2.14",
58
58
  "@stylistic/eslint-plugin": "^2.8.0",
59
- "@typescript-eslint/eslint-plugin": "^8.6.0",
60
- "@typescript-eslint/parser": "^8.6.0",
59
+ "@typescript-eslint/eslint-plugin": "^8.8.0",
60
+ "@typescript-eslint/parser": "^8.8.0",
61
61
  "confusing-browser-globals": "^1.0.11",
62
62
  "eslint-plugin-array-func": "^5.0.2",
63
63
  "eslint-plugin-const-case": "^1.2.2",
@@ -65,31 +65,31 @@
65
65
  "eslint-plugin-destructuring": "^2.2.1",
66
66
  "eslint-plugin-eslint-comments": "^3.2.0",
67
67
  "eslint-plugin-import-newlines": "^1.4.0",
68
- "eslint-plugin-import-x": "^4.2.1",
68
+ "eslint-plugin-import-x": "^4.3.1",
69
69
  "eslint-plugin-more": "^1.0.5",
70
70
  "eslint-plugin-newline-destructuring": "^1.2.2",
71
- "eslint-plugin-no-unsanitized": "^4.1.0",
71
+ "eslint-plugin-no-unsanitized": "^4.1.2",
72
72
  "eslint-plugin-no-useless-assign": "^1.0.3",
73
73
  "eslint-plugin-node": "^11.1.0",
74
74
  "eslint-plugin-only-warn": "^1.1.0",
75
- "eslint-plugin-perfectionist": "^3.6.0",
75
+ "eslint-plugin-perfectionist": "^3.8.0",
76
76
  "eslint-plugin-promise": "^7.1.0",
77
- "eslint-plugin-react": "^7.36.1",
77
+ "eslint-plugin-react": "^7.37.1",
78
78
  "eslint-plugin-react-19-upgrade": "^1.6.0",
79
79
  "eslint-plugin-react-compiler": "0.0.0-experimental-ca16900-20240916",
80
80
  "eslint-plugin-react-hooks": "^4.6.2",
81
81
  "eslint-plugin-react-perf": "^3.3.2",
82
82
  "eslint-plugin-react-refresh": "^0.4.12",
83
83
  "eslint-plugin-security": "^3.0.1",
84
- "eslint-plugin-unicorn": "^55.0.0",
85
- "globals": "^15.9.0",
86
- "typescript-eslint": "^8.6.0"
84
+ "eslint-plugin-unicorn": "^56.0.0",
85
+ "globals": "^15.10.0",
86
+ "typescript-eslint": "^8.8.0"
87
87
  },
88
88
  "peerDependencies": {
89
89
  "eslint": ">= 9"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@types/eslint-plugin-security": "^3.0.0",
93
- "@types/node": "^22.5.5"
93
+ "@types/node": "^22.7.4"
94
94
  }
95
- }
95
+ }