@ekz/eslint-config-packer 1.0.0-beta.2 → 1.0.0-beta.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @ekz/eslint-config-packer
2
2
 
3
+ ## 1.0.0-beta.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 659a473: ESLint flat config fixes for TypeScript React consumers:
8
+
9
+ - Restore 0.16 behavior: turn off `react/prop-types` and `react/display-name` globally (not JS-only) after extending `@ekz/packer/recommended`.
10
+ - Register `eslint-plugin-react-hooks` for `**/*.{js,jsx,mjs,cjs,ts,tsx}` so consumers can override `react-hooks/exhaustive-deps` with a rules-only block — no plugin redeclaration or `fixupPluginRules` wrapper required.
11
+
3
12
  ## 1.0.0-beta.2
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekz/eslint-config-packer",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
package/recommended.js CHANGED
@@ -13,6 +13,9 @@ const { prettierRule } = require('./prettier');
13
13
 
14
14
  const reactPlugin = fixupPluginRules(react);
15
15
 
16
+ const reactFiles = ['**/*.{js,jsx,mjs,cjs,ts,tsx}'];
17
+ const jsFiles = ['**/*.{js,jsx,mjs,cjs}'];
18
+
16
19
  module.exports = [
17
20
  {
18
21
  ignores: ['**/bin/**', '**/dist/**', '**/node_modules/**']
@@ -36,9 +39,25 @@ module.exports = [
36
39
  }
37
40
  }
38
41
  },
42
+ {
43
+ rules: {
44
+ 'react/display-name': 'off',
45
+ 'react/prop-types': 'off'
46
+ }
47
+ },
39
48
  eslintConfigPrettier,
40
49
  {
41
- files: ['**/*.{js,jsx,mjs,cjs}'],
50
+ files: reactFiles,
51
+ plugins: {
52
+ 'react-hooks': reactHooks
53
+ },
54
+ rules: {
55
+ 'react-hooks/rules-of-hooks': 'error',
56
+ 'react-hooks/exhaustive-deps': 'warn'
57
+ }
58
+ },
59
+ {
60
+ files: jsFiles,
42
61
  languageOptions: {
43
62
  parser: babelParser,
44
63
  parserOptions: {
@@ -62,8 +81,7 @@ module.exports = [
62
81
  }
63
82
  },
64
83
  plugins: {
65
- prettier,
66
- 'react-hooks': reactHooks
84
+ prettier
67
85
  },
68
86
  settings: {
69
87
  react: {
@@ -71,10 +89,6 @@ module.exports = [
71
89
  }
72
90
  },
73
91
  rules: {
74
- 'react/display-name': 'off',
75
- 'react/prop-types': 'off',
76
- 'react-hooks/rules-of-hooks': 'error',
77
- 'react-hooks/exhaustive-deps': 'warn',
78
92
  'no-console': 'warn',
79
93
  'prettier/prettier': prettierRule,
80
94
  eqeqeq: ['error', 'allow-null']