@shakuroinc/eslint-config-react 7.0.1 → 7.0.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/eslint.config.js +27 -1
  2. package/package.json +1 -1
package/eslint.config.js CHANGED
@@ -60,7 +60,15 @@ const sharedRules = {
60
60
  '@typescript-eslint/explicit-module-boundary-types': 'off',
61
61
  '@typescript-eslint/no-empty-function': 'off',
62
62
  '@typescript-eslint/no-explicit-any': 'off',
63
- '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^[_]*$' }],
63
+ '@typescript-eslint/no-unused-vars': [
64
+ 'warn',
65
+ {
66
+ argsIgnorePattern: '^_',
67
+ caughtErrorsIgnorePattern: '^_',
68
+ varsIgnorePattern: '^_',
69
+ destructuredArrayIgnorePattern: '^_',
70
+ },
71
+ ],
64
72
  'no-unused-vars': 'off',
65
73
 
66
74
  // Naming conventions
@@ -90,6 +98,16 @@ const sharedRules = {
90
98
  leadingUnderscore: 'allow',
91
99
  filter: '^[_]*$',
92
100
  },
101
+ // Allow leading underscore on parameters to mark them as intentionally
102
+ // unused — consistent with `argsIgnorePattern: '^_'` on no-unused-vars.
103
+ // Also covers placeholder names like `_`, `__`, `___` used to skip earlier
104
+ // positional args.
105
+ {
106
+ selector: 'parameter',
107
+ format: null,
108
+ leadingUnderscore: 'allow',
109
+ filter: '^[_]',
110
+ },
93
111
  { selector: 'typeLike', format: ['PascalCase'] },
94
112
  {
95
113
  selector: ['enumMember', 'enum'],
@@ -198,6 +216,10 @@ const sharedRules = {
198
216
  // react-hooks (v7 introduces new rules; we enable the classic ones explicitly)
199
217
  'react-hooks/exhaustive-deps': 'error',
200
218
  'react-hooks/rules-of-hooks': 'error',
219
+ // Informational only — React Compiler flags components that touch libraries
220
+ // it cannot compile (react-hook-form, tanstack/react-table, tanstack/react-virtual…).
221
+ // The runtime behaviour is unaffected; turning it off until upstream libs gain support.
222
+ 'react-hooks/incompatible-library': 'off',
201
223
 
202
224
  // simple-import-sort
203
225
  'simple-import-sort/exports': 'warn',
@@ -229,6 +251,10 @@ const sharedRules = {
229
251
  const mdxRuleOverrides = {
230
252
  '@next/next/no-img-element': 'off',
231
253
  '@typescript-eslint/naming-convention': 'off',
254
+ // MDX imports are often consumed by JSX in the document body
255
+ // (e.g. <Meta of={...} />), which the rule does not see.
256
+ '@typescript-eslint/no-unused-vars': 'off',
257
+ 'no-unused-vars': 'off',
232
258
  'padding-line-between-statements': 'off',
233
259
  'max-lines': 'off',
234
260
  'no-unused-expressions': 'off',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shakuroinc/eslint-config-react",
3
- "version": "7.0.1",
3
+ "version": "7.0.3",
4
4
  "description": "Shakuro shared ESLint + Prettier config (flat config, ESLint 9/10, React 19, Tailwind v4).",
5
5
  "main": "eslint.config.js",
6
6
  "exports": {