@foray1010/eslint-config 13.0.0 → 13.0.1

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
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [13.0.1](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@13.0.0...@foray1010/eslint-config@13.0.1) (2024-08-27)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **eslint-config:** fix errors when uses with eslint v9 ([9e2bc51](https://github.com/foray1010/common-presets/commit/9e2bc512f84b91963955e0558b7346bb27ba1365))
11
+
6
12
  ## [13.0.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@12.4.0...@foray1010/eslint-config@13.0.0) (2024-08-27)
7
13
 
8
14
  ### ⚠ BREAKING CHANGES
package/bases/browser.mjs CHANGED
@@ -1,7 +1,7 @@
1
+ import { fixupPluginRules } from '@eslint/compat'
1
2
  import { hasDep } from '@foray1010/common-presets-utils'
2
3
  import restrictedGlobals from 'confusing-browser-globals'
3
4
  import eslintPluginCompat from 'eslint-plugin-compat'
4
- import eslintPluginImportX from 'eslint-plugin-import-x'
5
5
  import eslintPluginTestingLibrary from 'eslint-plugin-testing-library'
6
6
  import globals from 'globals'
7
7
 
@@ -37,8 +37,6 @@ const browserConfig = [
37
37
  },
38
38
  plugins: {
39
39
  compat: eslintPluginCompat,
40
- // @ts-expect-error Type is not compact with flat config
41
- 'import-x': eslintPluginImportX,
42
40
  },
43
41
  rules: {
44
42
  'compat/compat': 'error',
@@ -50,7 +48,12 @@ const browserConfig = [
50
48
  ...(await generateJestDomConfig()),
51
49
  {
52
50
  files: testFileGlobs,
53
- ...eslintPluginTestingLibrary.configs['flat/dom'],
51
+ plugins: {
52
+ 'testing-library': fixupPluginRules(eslintPluginTestingLibrary),
53
+ },
54
+ rules: {
55
+ ...eslintPluginTestingLibrary.configs['flat/dom']?.rules,
56
+ },
54
57
  },
55
58
  {
56
59
  files: testFileGlobs,
package/bases/react.mjs CHANGED
@@ -61,7 +61,10 @@ const reactConfig = [
61
61
  },
62
62
  {
63
63
  files: testFileGlobs,
64
- ...eslintPluginTestingLibrary.configs['flat/react'],
64
+ rules: {
65
+ // Do not use flat config directly as eslint v9 does not support duplicated plugins (already defined in browser.mjs)
66
+ ...eslintPluginTestingLibrary.configs['flat/react']?.rules,
67
+ },
65
68
  },
66
69
  {
67
70
  files: testFileGlobs,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@foray1010/eslint-config",
4
- "version": "13.0.0",
4
+ "version": "13.0.1",
5
5
  "homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
6
6
  "bugs": "https://github.com/foray1010/common-presets/issues",
7
7
  "repository": {
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
24
+ "@eslint/compat": "^1.1.1",
24
25
  "@eslint/js": "^9.9.1",
25
26
  "@foray1010/common-presets-utils": "^8.0.0",
26
27
  "confusing-browser-globals": "^1.0.11",
@@ -67,5 +68,5 @@
67
68
  "publishConfig": {
68
69
  "access": "public"
69
70
  },
70
- "gitHead": "aa4ee431e3dd279c5e4b1e14977c39a0466c1e5a"
71
+ "gitHead": "96a15140fa887ba923ba9706b55e1cf1c3af48d9"
71
72
  }