@frontify/eslint-config-react 1.0.13 → 1.0.14

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.mjs +13 -11
  2. package/package.json +11 -8
package/eslint.config.mjs CHANGED
@@ -1,19 +1,22 @@
1
1
  // @ts-check
2
2
 
3
3
  import eslintPluginReact from '@eslint-react/eslint-plugin';
4
+ import eslintReactKit from '@eslint-react/kit';
4
5
  import basicConfig from '@frontify/eslint-config-basic';
5
6
  import { defineConfig } from 'eslint/config';
6
7
  // @ts-expect-error No types available
7
8
  import eslintPluginJsxA11yX from 'eslint-plugin-jsx-a11y-x';
8
- import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
9
+
10
+ import { jsxShorthandBoolean } from './rules/jsx-shorthand-boolean.mjs';
9
11
 
10
12
  export default defineConfig(
11
13
  basicConfig,
12
14
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
13
15
  eslintPluginJsxA11yX.flatConfigs.recommended,
14
16
  eslintPluginReact.configs['recommended-type-checked'],
15
- eslintPluginReactHooks.configs.flat['recommended-latest'],
17
+ eslintReactKit().use(jsxShorthandBoolean).getConfig(),
16
18
  {
19
+ files: ['**/*.{js,mjs,cjs,jsx,ts,tsx,mts,cts}'],
17
20
  languageOptions: {
18
21
  parserOptions: {
19
22
  ecmaFeatures: {
@@ -43,6 +46,7 @@ export default defineConfig(
43
46
  },
44
47
  ],
45
48
  'jsx-quotes': ['error', 'prefer-double'],
49
+ '@eslint-react/exhaustive-deps': 'error',
46
50
  '@eslint-react/no-children-for-each': 'off',
47
51
  '@eslint-react/no-children-count': 'off',
48
52
  '@eslint-react/no-children-map': 'off',
@@ -55,20 +59,17 @@ export default defineConfig(
55
59
  '@eslint-react/no-missing-component-display-name': 'warn',
56
60
  '@eslint-react/no-missing-context-display-name': 'error',
57
61
  '@eslint-react/no-unstable-context-value': 'error',
58
- '@eslint-react/no-useless-fragment': 'error',
62
+ '@eslint-react/jsx-no-useless-fragment': 'error',
59
63
  '@eslint-react/no-unused-props': 'error',
60
64
  '@eslint-react/no-unnecessary-use-prefix': 'error',
61
- '@eslint-react/jsx-shorthand-boolean': 'warn',
62
65
  '@eslint-react/prefer-namespace-import': 'error',
63
- '@eslint-react/dom/no-missing-button-type': 'error',
64
- '@eslint-react/dom/no-missing-iframe-sandbox': 'error',
66
+ '@eslint-react/dom-no-missing-button-type': 'error',
67
+ '@eslint-react/dom-no-missing-iframe-sandbox': 'error',
65
68
  '@eslint-react/no-unnecessary-use-callback': 'error',
66
69
  '@eslint-react/no-unnecessary-use-memo': 'error',
67
- '@eslint-react/prefer-use-state-lazy-initialization': 'error',
68
- '@eslint-react/naming-convention/component-name': ['error', 'PascalCase'],
69
- '@eslint-react/naming-convention/context-name': 'error',
70
- '@eslint-react/naming-convention/filename-extension': ['warn', 'as-needed'],
71
- '@eslint-react/naming-convention/use-state': 'error',
70
+ '@eslint-react/naming-convention-context-name': 'error',
71
+ '@eslint-react/use-state': 'error',
72
+ '@eslint-react/kit/jsx-shorthand-boolean': 'warn',
72
73
  },
73
74
  },
74
75
  {
@@ -96,6 +97,7 @@ export default defineConfig(
96
97
  '@eslint-react/no-missing-context-display-name': 'off',
97
98
  '@eslint-react/no-create-ref': 'off',
98
99
  '@eslint-react/no-unstable-context-value': 'off',
100
+ '@eslint-react/component-hook-factories': 'off',
99
101
  'jsx-a11y-x/no-static-element-interactions': 'off',
100
102
  'jsx-a11y-x/click-events-have-key-events': 'off',
101
103
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@frontify/eslint-config-react",
3
3
  "type": "module",
4
- "version": "1.0.13",
4
+ "version": "1.0.14",
5
5
  "author": "Frontify Developers <developers@frontify.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -16,25 +16,28 @@
16
16
  "peerDependencies": {
17
17
  "eslint": "^9.0.0 || ^10.0.0",
18
18
  "prettier": "^3.0.0",
19
- "react": "^18 || ^19"
19
+ "react": "^18 || ^19",
20
+ "typescript": "^5.0.0 || ^6.0.0 || ^7.0.0"
20
21
  },
21
22
  "dependencies": {
22
- "@eslint-react/eslint-plugin": "^2.13.0",
23
+ "@eslint-react/eslint-plugin": "^4.1.0-beta.0",
24
+ "@eslint-react/kit": "^4.1.0-beta.0",
23
25
  "eslint-plugin-jsx-a11y-x": "^0.1.1",
24
- "eslint-plugin-react-hooks": "^7.0.1",
25
26
  "globals": "^17.4.0",
26
- "typescript-eslint": "^8.56.1",
27
- "@frontify/eslint-config-basic": "^1.0.13"
27
+ "typescript-eslint": "^8.57.2",
28
+ "@frontify/eslint-config-basic": "^1.0.14"
28
29
  },
29
30
  "devDependencies": {
30
- "eslint": "^10.0.2",
31
- "prettier": "^3.8.1"
31
+ "eslint": "^10.1.0",
32
+ "prettier": "^3.8.1",
33
+ "typescript": "^6.0.2"
32
34
  },
33
35
  "publishConfig": {
34
36
  "access": "public"
35
37
  },
36
38
  "scripts": {
37
39
  "lint": "eslint .",
40
+ "test": "node --test 'rules/**/*.test.mjs'",
38
41
  "typecheck": "tsc --noEmit"
39
42
  }
40
43
  }