@fullstacksjs/eslint-config 13.4.0 → 13.5.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.
@@ -185,6 +185,9 @@ function base(options = {}) {
185
185
  allowUnboundThis: true
186
186
  }],
187
187
  'prefer-const': 'warn',
188
+ 'preserve-caught-error': (0, _conditions.strict)(options, ['warn', {
189
+ requireCatchParameter: true
190
+ }]),
188
191
  'prefer-exponentiation-operator': 'warn',
189
192
  'prefer-numeric-literals': 'error',
190
193
  'prefer-object-has-own': 'warn',
@@ -48,7 +48,6 @@ function node(options = {}) {
48
48
  // Nice but not a general rule
49
49
  'n/prefer-global/buffer': 'warn',
50
50
  'n/prefer-global/console': 'warn',
51
- 'n/prefer-global/process': 'warn',
52
51
  'n/prefer-global/text-decoder': 'warn',
53
52
  'n/prefer-global/text-encoder': 'warn',
54
53
  'n/prefer-global/url-search-params': 'warn',
@@ -58,6 +57,7 @@ function node(options = {}) {
58
57
  'n/prefer-promises/fs': 'warn',
59
58
  'n/process-exit-as-throw': 'error',
60
59
  // Disabled
60
+ 'n/prefer-global/process': 'off',
61
61
  'n/file-extension-in-import': 'off',
62
62
  'n/no-extraneous-import': 'off',
63
63
  'n/no-extraneous-require': 'off',
@@ -41,7 +41,11 @@ function react() {
41
41
  '@eslint-react/jsx-key-before-spread': 'error',
42
42
  '@eslint-react/jsx-no-undef': 'off',
43
43
  '@eslint-react/jsx-no-iife': 'warn',
44
+ '@eslint-react/jsx-no-duplicate-props': 'error',
45
+ '@eslint-react/jsx-no-comment-textnodes': 'warn',
44
46
  '@eslint-react/jsx-uses-react': 'off',
47
+ '@eslint-react/jsx-shorthand-boolean': 'warn',
48
+ '@eslint-react/jsx-shorthand-fragment': 'warn',
45
49
  '@eslint-react/no-access-state-in-setstate': 'error',
46
50
  '@eslint-react/no-array-index-key': 'warn',
47
51
  '@eslint-react/no-children-count': 'warn',
@@ -51,7 +55,6 @@ function react() {
51
55
  '@eslint-react/no-children-prop': 'warn',
52
56
  '@eslint-react/no-children-to-array': 'warn',
53
57
  '@eslint-react/no-clone-element': 'warn',
54
- '@eslint-react/no-comment-textnodes': 'warn',
55
58
  '@eslint-react/no-component-will-mount': 'error',
56
59
  '@eslint-react/no-component-will-receive-props': 'error',
57
60
  '@eslint-react/no-component-will-update': 'error',
@@ -60,7 +63,6 @@ function react() {
60
63
  '@eslint-react/no-direct-mutation-state': 'error',
61
64
  '@eslint-react/no-duplicate-key': 'error',
62
65
  '@eslint-react/no-default-props': 'warn',
63
- '@eslint-react/jsx-no-duplicate-props': 'error',
64
66
  '@eslint-react/no-forward-ref': 'warn',
65
67
  '@eslint-react/no-implicit-key': 'error',
66
68
  '@eslint-react/no-missing-context-display-name': 'warn',
@@ -73,6 +75,7 @@ function react() {
73
75
  '@eslint-react/no-set-state-in-component-did-update': 'warn',
74
76
  '@eslint-react/no-set-state-in-component-will-update': 'warn',
75
77
  '@eslint-react/no-string-refs': 'error',
78
+ '@eslint-react/dom/no-string-style-prop': 'error',
76
79
  '@eslint-react/no-unsafe-component-will-mount': 'warn',
77
80
  '@eslint-react/no-unsafe-component-will-receive-props': 'warn',
78
81
  '@eslint-react/no-unsafe-component-will-update': 'warn',
@@ -80,18 +83,17 @@ function react() {
80
83
  '@eslint-react/no-unstable-default-props': 'error',
81
84
  '@eslint-react/no-unused-class-component-members': 'warn',
82
85
  '@eslint-react/no-unused-state': 'warn',
86
+ '@eslint-react/no-unused-props': 'off',
83
87
  '@eslint-react/no-useless-forward-ref': 'off',
84
88
  '@eslint-react/no-useless-fragment': 'warn',
85
89
  '@eslint-react/no-use-context': 'warn',
90
+ '@eslint-react/no-unnecessary-use-callback': 'warn',
91
+ '@eslint-react/no-unnecessary-use-memo': 'warn',
92
+ '@eslint-react/no-unnecessary-use-prefix': 'warn',
93
+ '@eslint-react/no-unnecessary-key': 'warn',
94
+ '@eslint-react/prefer-use-state-lazy-initialization': 'warn',
86
95
  '@eslint-react/prefer-destructuring-assignment': 'warn',
87
- '@eslint-react/prefer-shorthand-boolean': 'warn',
88
- '@eslint-react/avoid-shorthand-boolean': 'off',
89
- '@eslint-react/prefer-shorthand-fragment': 'warn',
90
- '@eslint-react/avoid-shorthand-fragment': 'off',
91
- '@eslint-react/hooks-extra/prefer-use-state-lazy-initialization': 'warn',
92
- '@eslint-react/hooks-extra/no-unnecessary-use-callback': 'warn',
93
- '@eslint-react/hooks-extra/no-unnecessary-use-prefix': 'warn',
94
- '@eslint-react/hooks-extra/no-unnecessary-use-memo': 'warn',
96
+ '@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'warn',
95
97
  '@eslint-react/naming-convention/component-name': 'warn',
96
98
  '@eslint-react/naming-convention/context-name': 'warn',
97
99
  '@eslint-react/naming-convention/filename-extension': ['error', {
@@ -70,8 +70,9 @@ function typescript(options = {}) {
70
70
  '@typescript-eslint/no-duplicate-enum-values': 'error',
71
71
  '@typescript-eslint/no-dynamic-delete': 'error',
72
72
  '@typescript-eslint/no-empty-function': 'error',
73
- '@typescript-eslint/no-empty-interface': 'off',
74
- // Annoying with auto-fix on save.
73
+ '@typescript-eslint/no-empty-object-type': ['warn', {
74
+ allowInterfaces: 'with-single-extends'
75
+ }],
75
76
  '@typescript-eslint/no-explicit-any': 'off',
76
77
  '@typescript-eslint/no-extra-non-null-assertion': 'error',
77
78
  '@typescript-eslint/no-extraneous-class': ['warn', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "13.4.0",
3
+ "version": "13.5.0",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -35,18 +35,18 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@eslint-react/eslint-plugin": "1.53.1",
39
- "@eslint/compat": "1.3.2",
40
- "@next/eslint-plugin-next": "15.5.3",
41
- "@stylistic/eslint-plugin": "5.3.1",
42
- "@vitest/eslint-plugin": "1.3.9",
38
+ "@eslint-react/eslint-plugin": "2.0.0",
39
+ "@eslint/compat": "1.4.0",
40
+ "@next/eslint-plugin-next": "15.5.4",
41
+ "@stylistic/eslint-plugin": "5.4.0",
42
+ "@vitest/eslint-plugin": "1.3.13",
43
43
  "deepmerge": "4.3.1",
44
- "eslint-plugin-better-tailwindcss": "3.7.8",
44
+ "eslint-plugin-better-tailwindcss": "3.7.9",
45
45
  "eslint-plugin-cypress": "5.1.1",
46
46
  "eslint-plugin-import-x": "4.16.1",
47
47
  "eslint-plugin-jest": "29.0.1",
48
48
  "eslint-plugin-jsx-a11y": "6.10.2",
49
- "eslint-plugin-n": "17.21.3",
49
+ "eslint-plugin-n": "17.23.1",
50
50
  "eslint-plugin-perfectionist": "4.15.0",
51
51
  "eslint-plugin-playwright": "2.2.2",
52
52
  "eslint-plugin-prettier": "5.5.4",
@@ -56,23 +56,23 @@
56
56
  "eslint-plugin-storybook": "0.12.0",
57
57
  "globals": "16.4.0",
58
58
  "local-pkg": "1.1.2",
59
- "typescript-eslint": "8.43.0"
59
+ "typescript-eslint": "8.44.1"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@eslint/eslintrc": "3.3.1",
63
- "@eslint/js": "9.35.0",
63
+ "@eslint/js": "9.36.0",
64
64
  "@semantic-release/github": "11.0.6",
65
65
  "@semantic-release/npm": "12.0.2",
66
66
  "@semantic-release/release-notes-generator": "14.1.0",
67
67
  "@types/eslint": "9.6.1",
68
68
  "cspell": "9.2.1",
69
- "eslint": "9.35.0",
69
+ "eslint": "9.36.0",
70
70
  "husky": "9.1.7",
71
71
  "jest": "30.1.3",
72
- "lint-staged": "16.1.6",
72
+ "lint-staged": "16.2.1",
73
73
  "pinst": "3.0.0",
74
74
  "prettier": "3.6.2",
75
- "semantic-release": "24.2.8",
75
+ "semantic-release": "24.2.9",
76
76
  "typescript": "5.9.2",
77
77
  "unbuild": "3.6.1"
78
78
  },
@@ -157,6 +157,12 @@ function base(options = {}) {
157
157
  'one-var': ['error', { uninitialized: 'never', initialized: 'never' }],
158
158
  'prefer-arrow-callback': ['warn', { allowNamedFunctions: true, allowUnboundThis: true }],
159
159
  'prefer-const': 'warn',
160
+ 'preserve-caught-error': strict(options, [
161
+ 'warn',
162
+ {
163
+ requireCatchParameter: true,
164
+ },
165
+ ]),
160
166
  'prefer-exponentiation-operator': 'warn',
161
167
  'prefer-numeric-literals': 'error',
162
168
  'prefer-object-has-own': 'warn',
@@ -35,7 +35,6 @@ function node(options = {}) {
35
35
  'n/no-unsupported-features/node-builtins': 'off', // Nice but not a general rule
36
36
  'n/prefer-global/buffer': 'warn',
37
37
  'n/prefer-global/console': 'warn',
38
- 'n/prefer-global/process': 'warn',
39
38
  'n/prefer-global/text-decoder': 'warn',
40
39
  'n/prefer-global/text-encoder': 'warn',
41
40
  'n/prefer-global/url-search-params': 'warn',
@@ -46,6 +45,7 @@ function node(options = {}) {
46
45
  'n/process-exit-as-throw': 'error',
47
46
 
48
47
  // Disabled
48
+ 'n/prefer-global/process': 'off',
49
49
  'n/file-extension-in-import': 'off',
50
50
  'n/no-extraneous-import': 'off',
51
51
  'n/no-extraneous-require': 'off',
@@ -36,7 +36,12 @@ function react() {
36
36
  '@eslint-react/jsx-key-before-spread': 'error',
37
37
  '@eslint-react/jsx-no-undef': 'off',
38
38
  '@eslint-react/jsx-no-iife': 'warn',
39
+ '@eslint-react/jsx-no-duplicate-props': 'error',
40
+ '@eslint-react/jsx-no-comment-textnodes': 'warn',
39
41
  '@eslint-react/jsx-uses-react': 'off',
42
+ '@eslint-react/jsx-shorthand-boolean': 'warn',
43
+ '@eslint-react/jsx-shorthand-fragment': 'warn',
44
+
40
45
  '@eslint-react/no-access-state-in-setstate': 'error',
41
46
  '@eslint-react/no-array-index-key': 'warn',
42
47
  '@eslint-react/no-children-count': 'warn',
@@ -46,7 +51,6 @@ function react() {
46
51
  '@eslint-react/no-children-prop': 'warn',
47
52
  '@eslint-react/no-children-to-array': 'warn',
48
53
  '@eslint-react/no-clone-element': 'warn',
49
- '@eslint-react/no-comment-textnodes': 'warn',
50
54
  '@eslint-react/no-component-will-mount': 'error',
51
55
  '@eslint-react/no-component-will-receive-props': 'error',
52
56
  '@eslint-react/no-component-will-update': 'error',
@@ -55,7 +59,6 @@ function react() {
55
59
  '@eslint-react/no-direct-mutation-state': 'error',
56
60
  '@eslint-react/no-duplicate-key': 'error',
57
61
  '@eslint-react/no-default-props': 'warn',
58
- '@eslint-react/jsx-no-duplicate-props': 'error',
59
62
  '@eslint-react/no-forward-ref': 'warn',
60
63
  '@eslint-react/no-implicit-key': 'error',
61
64
  '@eslint-react/no-missing-context-display-name': 'warn',
@@ -68,6 +71,7 @@ function react() {
68
71
  '@eslint-react/no-set-state-in-component-did-update': 'warn',
69
72
  '@eslint-react/no-set-state-in-component-will-update': 'warn',
70
73
  '@eslint-react/no-string-refs': 'error',
74
+ '@eslint-react/dom/no-string-style-prop': 'error',
71
75
  '@eslint-react/no-unsafe-component-will-mount': 'warn',
72
76
  '@eslint-react/no-unsafe-component-will-receive-props': 'warn',
73
77
  '@eslint-react/no-unsafe-component-will-update': 'warn',
@@ -75,21 +79,19 @@ function react() {
75
79
  '@eslint-react/no-unstable-default-props': 'error',
76
80
  '@eslint-react/no-unused-class-component-members': 'warn',
77
81
  '@eslint-react/no-unused-state': 'warn',
82
+ '@eslint-react/no-unused-props': 'off',
78
83
  '@eslint-react/no-useless-forward-ref': 'off',
79
84
  '@eslint-react/no-useless-fragment': 'warn',
80
85
  '@eslint-react/no-use-context': 'warn',
81
- '@eslint-react/prefer-destructuring-assignment': 'warn',
82
-
83
- '@eslint-react/prefer-shorthand-boolean': 'warn',
84
- '@eslint-react/avoid-shorthand-boolean': 'off',
86
+ '@eslint-react/no-unnecessary-use-callback': 'warn',
87
+ '@eslint-react/no-unnecessary-use-memo': 'warn',
88
+ '@eslint-react/no-unnecessary-use-prefix': 'warn',
89
+ '@eslint-react/no-unnecessary-key': 'warn',
85
90
 
86
- '@eslint-react/prefer-shorthand-fragment': 'warn',
87
- '@eslint-react/avoid-shorthand-fragment': 'off',
91
+ '@eslint-react/prefer-use-state-lazy-initialization': 'warn',
92
+ '@eslint-react/prefer-destructuring-assignment': 'warn',
88
93
 
89
- '@eslint-react/hooks-extra/prefer-use-state-lazy-initialization': 'warn',
90
- '@eslint-react/hooks-extra/no-unnecessary-use-callback': 'warn',
91
- '@eslint-react/hooks-extra/no-unnecessary-use-prefix': 'warn',
92
- '@eslint-react/hooks-extra/no-unnecessary-use-memo': 'warn',
94
+ '@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'warn',
93
95
 
94
96
  '@eslint-react/naming-convention/component-name': 'warn',
95
97
  '@eslint-react/naming-convention/context-name': 'warn',
@@ -74,7 +74,7 @@ function typescript(options = {}) {
74
74
  '@typescript-eslint/no-duplicate-enum-values': 'error',
75
75
  '@typescript-eslint/no-dynamic-delete': 'error',
76
76
  '@typescript-eslint/no-empty-function': 'error',
77
- '@typescript-eslint/no-empty-interface': 'off', // Annoying with auto-fix on save.
77
+ '@typescript-eslint/no-empty-object-type': ['warn', { allowInterfaces: 'with-single-extends' }],
78
78
  '@typescript-eslint/no-explicit-any': 'off',
79
79
  '@typescript-eslint/no-extra-non-null-assertion': 'error',
80
80
  '@typescript-eslint/no-extraneous-class': ['warn', { allowWithDecorator: true }],