@foray1010/eslint-config 12.3.1 → 12.4.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.
- package/CHANGELOG.md +10 -0
- package/bases/base.mjs +2 -11
- package/bases/browser.mjs +4 -4
- package/bases/react.mjs +6 -5
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
## [12.4.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@12.3.1...@foray1010/eslint-config@12.4.0) (2024-08-20)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **eslint-config:** support all hooks in use-deep-compare ([e689bce](https://github.com/foray1010/common-presets/commit/e689bceed67924c5b4fa31066d818fa7f73c27a0))
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **deps:** update dependency typescript-eslint to v8 ([e755b3e](https://github.com/foray1010/common-presets/commit/e755b3ef4fe40fa86a1e24b78660dd7911eac5d7))
|
|
15
|
+
|
|
6
16
|
## [12.3.1](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@12.3.0...@foray1010/eslint-config@12.3.1) (2024-07-25)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
package/bases/base.mjs
CHANGED
|
@@ -57,17 +57,6 @@ async function generateTypeScriptConfig() {
|
|
|
57
57
|
},
|
|
58
58
|
rules: {
|
|
59
59
|
...eslintPluginImportX.configs['typescript']?.rules,
|
|
60
|
-
// extend existing rule
|
|
61
|
-
'@typescript-eslint/ban-types': [
|
|
62
|
-
'error',
|
|
63
|
-
{
|
|
64
|
-
types: {
|
|
65
|
-
// TypeScript team suggests to use `<T extends {}>` https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/#unconstrained-generics-no-longer-assignable-to
|
|
66
|
-
'{}': false,
|
|
67
|
-
},
|
|
68
|
-
extendDefaults: true,
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
60
|
// separate type exports which allow certain optimizations within compilers
|
|
72
61
|
'@typescript-eslint/consistent-type-exports': [
|
|
73
62
|
'error',
|
|
@@ -106,6 +95,8 @@ async function generateTypeScriptConfig() {
|
|
|
106
95
|
'@typescript-eslint/no-duplicate-enum-values': 'error',
|
|
107
96
|
// need empty function for react context default value
|
|
108
97
|
'@typescript-eslint/no-empty-function': 'off',
|
|
98
|
+
// TypeScript team suggests to use `<T extends {}>` https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/#unconstrained-generics-no-longer-assignable-to
|
|
99
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
109
100
|
// when using typescript 5.0 with verbatimModuleSyntax flag on, compiler will not remove import statements with only inline type imports which lead to side effects
|
|
110
101
|
'@typescript-eslint/no-import-type-side-effects': 'error',
|
|
111
102
|
// enforce correct usage of `void` type
|
package/bases/browser.mjs
CHANGED
|
@@ -50,11 +50,11 @@ const browserConfig = [
|
|
|
50
50
|
...(await generateJestDomConfig()),
|
|
51
51
|
{
|
|
52
52
|
files: testFileGlobs,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
...eslintPluginTestingLibrary.configs['flat/dom'],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
files: testFileGlobs,
|
|
56
57
|
rules: {
|
|
57
|
-
...eslintPluginTestingLibrary.configs['dom']?.rules,
|
|
58
58
|
// allow to use nodejs modules in tests
|
|
59
59
|
'import-x/no-nodejs-modules': 'off',
|
|
60
60
|
},
|
package/bases/react.mjs
CHANGED
|
@@ -53,18 +53,19 @@ const reactConfig = [
|
|
|
53
53
|
{
|
|
54
54
|
// support package `use-deep-compare`
|
|
55
55
|
additionalHooks:
|
|
56
|
-
|
|
56
|
+
/^(useDeepCompareCallback|useDeepCompareEffect|useDeepCompareImperativeHandle|useDeepCompareLayoutEffect|useDeepCompareMemo)$/u
|
|
57
|
+
.source,
|
|
57
58
|
},
|
|
58
59
|
],
|
|
59
60
|
},
|
|
60
61
|
},
|
|
61
62
|
{
|
|
62
63
|
files: testFileGlobs,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
...eslintPluginTestingLibrary.configs['flat/react'],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
files: testFileGlobs,
|
|
66
68
|
rules: {
|
|
67
|
-
...eslintPluginTestingLibrary.configs['react']?.rules,
|
|
68
69
|
// avoid using unnecessary `await` as workaround for `not wrapped in act(...)` warnings
|
|
69
70
|
'testing-library/no-await-sync-events': [
|
|
70
71
|
'error',
|
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": "12.
|
|
4
|
+
"version": "12.4.0",
|
|
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": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
39
39
|
"eslint-plugin-regexp": "^2.6.0",
|
|
40
40
|
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
41
|
-
"eslint-plugin-testing-library": "^6.
|
|
41
|
+
"eslint-plugin-testing-library": "^6.3.0",
|
|
42
42
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
43
43
|
"globals": "^15.4.0",
|
|
44
|
-
"typescript-eslint": "^
|
|
44
|
+
"typescript-eslint": "^8.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/confusing-browser-globals": "1.0.3",
|
|
48
|
-
"@types/eslint": "8.56.
|
|
48
|
+
"@types/eslint": "8.56.11",
|
|
49
49
|
"@types/eslint__js": "8.42.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "fae1085ef22d08177b22034905e40dd23a80b95a"
|
|
72
72
|
}
|