@jimmy.codes/eslint-config 6.13.2 → 6.14.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/dist/index.d.ts +30 -1
- package/dist/index.js +4 -4
- package/dist/{jest-G-dRTY_j.js → jest-BCatBVvc.js} +1 -2
- package/dist/{nextjs-X6g9xH_I.js → nextjs-Dw-jYP2k.js} +1 -2
- package/dist/{react-By-ZN_z5.js → react-B1Uy4qg-.js} +1 -0
- package/dist/{vitest-BP2VqxKz.js → vitest-CADaM8FX.js} +1 -2
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -1536,7 +1536,7 @@ interface RuleOptions {
|
|
|
1536
1536
|
* Disallow member access on a value with type `any`
|
|
1537
1537
|
* @see https://typescript-eslint.io/rules/no-unsafe-member-access
|
|
1538
1538
|
*/
|
|
1539
|
-
'@typescript-eslint/no-unsafe-member-access'?: Linter.RuleEntry<
|
|
1539
|
+
'@typescript-eslint/no-unsafe-member-access'?: Linter.RuleEntry<TypescriptEslintNoUnsafeMemberAccess>;
|
|
1540
1540
|
/**
|
|
1541
1541
|
* Disallow returning a value with type `any` from a function
|
|
1542
1542
|
* @see https://typescript-eslint.io/rules/no-unsafe-return
|
|
@@ -5261,6 +5261,10 @@ interface RuleOptions {
|
|
|
5261
5261
|
* Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
5262
5262
|
*/
|
|
5263
5263
|
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
5264
|
+
/**
|
|
5265
|
+
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
5266
|
+
*/
|
|
5267
|
+
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
5264
5268
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
5265
5269
|
/**
|
|
5266
5270
|
* disallow confusing quantifiers
|
|
@@ -9087,6 +9091,10 @@ type TypescriptEslintNoUnnecessaryTypeAssertion = [] | [{
|
|
|
9087
9091
|
checkLiteralConstAssertions?: boolean;
|
|
9088
9092
|
typesToIgnore?: string[];
|
|
9089
9093
|
}];
|
|
9094
|
+
// ----- @typescript-eslint/no-unsafe-member-access -----
|
|
9095
|
+
type TypescriptEslintNoUnsafeMemberAccess = [] | [{
|
|
9096
|
+
allowOptionalChaining?: boolean;
|
|
9097
|
+
}];
|
|
9090
9098
|
// ----- @typescript-eslint/no-unused-expressions -----
|
|
9091
9099
|
type TypescriptEslintNoUnusedExpressions = [] | [{
|
|
9092
9100
|
allowShortCircuit?: boolean;
|
|
@@ -9104,6 +9112,7 @@ type TypescriptEslintNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
9104
9112
|
destructuredArrayIgnorePattern?: string;
|
|
9105
9113
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
9106
9114
|
ignoreRestSiblings?: boolean;
|
|
9115
|
+
ignoreUsingDeclarations?: boolean;
|
|
9107
9116
|
reportUsedIgnorePattern?: boolean;
|
|
9108
9117
|
vars?: ("all" | "local");
|
|
9109
9118
|
varsIgnorePattern?: string;
|
|
@@ -10647,13 +10656,29 @@ type JsdocTextEscaping = [] | [{
|
|
|
10647
10656
|
// ----- jsdoc/type-formatting -----
|
|
10648
10657
|
type JsdocTypeFormatting = [] | [{
|
|
10649
10658
|
arrayBrackets?: ("angle" | "square");
|
|
10659
|
+
arrowFunctionPostReturnMarkerSpacing?: string;
|
|
10660
|
+
arrowFunctionPreReturnMarkerSpacing?: string;
|
|
10650
10661
|
enableFixer?: boolean;
|
|
10662
|
+
functionOrClassParameterSpacing?: string;
|
|
10663
|
+
functionOrClassPostGenericSpacing?: string;
|
|
10664
|
+
functionOrClassPostReturnMarkerSpacing?: string;
|
|
10665
|
+
functionOrClassPreReturnMarkerSpacing?: string;
|
|
10666
|
+
functionOrClassTypeParameterSpacing?: string;
|
|
10667
|
+
genericAndTupleElementSpacing?: string;
|
|
10651
10668
|
genericDot?: boolean;
|
|
10669
|
+
keyValuePostColonSpacing?: string;
|
|
10670
|
+
keyValuePostKeySpacing?: string;
|
|
10671
|
+
keyValuePostOptionalSpacing?: string;
|
|
10672
|
+
keyValuePostVariadicSpacing?: string;
|
|
10673
|
+
methodQuotes?: ("double" | "single");
|
|
10652
10674
|
objectFieldIndent?: string;
|
|
10653
10675
|
objectFieldQuote?: ("double" | "single" | null);
|
|
10654
10676
|
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
|
|
10655
10677
|
objectFieldSeparatorOptionalLinebreak?: boolean;
|
|
10656
10678
|
objectFieldSeparatorTrailingPunctuation?: boolean;
|
|
10679
|
+
parameterDefaultValueSpacing?: string;
|
|
10680
|
+
postMethodNameSpacing?: string;
|
|
10681
|
+
postNewSpacing?: string;
|
|
10657
10682
|
separatorForSingleObjectField?: boolean;
|
|
10658
10683
|
stringQuotes?: ("double" | "single");
|
|
10659
10684
|
typeBracketSpacing?: string;
|
|
@@ -14119,6 +14144,10 @@ type ReactHooksUnsupportedSyntax = [] | [{
|
|
|
14119
14144
|
type ReactHooksUseMemo = [] | [{
|
|
14120
14145
|
[k: string]: unknown | undefined;
|
|
14121
14146
|
}];
|
|
14147
|
+
// ----- react-hooks/void-use-memo -----
|
|
14148
|
+
type ReactHooksVoidUseMemo = [] | [{
|
|
14149
|
+
[k: string]: unknown | undefined;
|
|
14150
|
+
}];
|
|
14122
14151
|
// ----- react-refresh/only-export-components -----
|
|
14123
14152
|
type ReactRefreshOnlyExportComponents = [] | [{
|
|
14124
14153
|
allowExportNames?: string[];
|
package/dist/index.js
CHANGED
|
@@ -484,15 +484,15 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
|
|
|
484
484
|
];
|
|
485
485
|
const featureConfigs = await Promise.all([
|
|
486
486
|
isTypescriptEnabled && unwrap(import("./typescript-D8AT5dEv.js")),
|
|
487
|
-
isReactEnabled && unwrap(import("./react-
|
|
487
|
+
isReactEnabled && unwrap(import("./react-B1Uy4qg-.js")),
|
|
488
488
|
isTanstackQueryEnabled && unwrap(import("./tanstack-query-DqqVfxJs.js")),
|
|
489
489
|
isAstroEnabled && unwrap(import("./astro-Cc3Rxusf.js")),
|
|
490
|
-
isJestEnabled && unwrap(import("./jest-
|
|
491
|
-
isVitestEnabled && unwrap(import("./vitest-
|
|
490
|
+
isJestEnabled && unwrap(import("./jest-BCatBVvc.js")),
|
|
491
|
+
isVitestEnabled && unwrap(import("./vitest-CADaM8FX.js")),
|
|
492
492
|
isTestingLibraryEnabled && unwrap(import("./testing-library-lJsmjyFo.js")),
|
|
493
493
|
isPlaywrightEnabled && unwrap(import("./playwright-Bbcb5Jsi.js")),
|
|
494
494
|
isStorybookEnabled && unwrap(import("./storybook-BO4plVPp.js")),
|
|
495
|
-
isNextjsEnabled && unwrap(import("./nextjs-
|
|
495
|
+
isNextjsEnabled && unwrap(import("./nextjs-Dw-jYP2k.js"))
|
|
496
496
|
]);
|
|
497
497
|
return [
|
|
498
498
|
...gitignore ? [gitignoreConfig({ strict: false })] : [],
|
|
@@ -50,11 +50,10 @@ const jestRules = async () => {
|
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/configs/jest.ts
|
|
52
52
|
async function jestConfig() {
|
|
53
|
-
const jestPlugin = await interopDefault(import("eslint-plugin-jest"));
|
|
54
53
|
return [{
|
|
55
54
|
files: GLOB_TESTS,
|
|
56
55
|
ignores: GLOB_E2E,
|
|
57
|
-
...
|
|
56
|
+
...(await interopDefault(import("eslint-plugin-jest"))).configs["flat/recommended"],
|
|
58
57
|
name: "jimmy.codes/jest",
|
|
59
58
|
rules: await jestRules()
|
|
60
59
|
}];
|
|
@@ -4,8 +4,7 @@ import { upwarn } from "./upwarn-C7t3ub-R.js";
|
|
|
4
4
|
|
|
5
5
|
//#region src/rules/nextjs.ts
|
|
6
6
|
const nextjsRules = async () => {
|
|
7
|
-
|
|
8
|
-
return upwarn(nextjsPlugin.configs.recommended.rules);
|
|
7
|
+
return upwarn((await interopDefault(import("@next/eslint-plugin-next"))).configs.recommended.rules);
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
//#endregion
|
|
@@ -58,6 +58,7 @@ const reactRules = async () => {
|
|
|
58
58
|
"react-hooks/static-components": "error",
|
|
59
59
|
"react-hooks/unsupported-syntax": "error",
|
|
60
60
|
"react-hooks/use-memo": "error",
|
|
61
|
+
"react-hooks/void-use-memo": "error",
|
|
61
62
|
"react-refresh/only-export-components": ["warn", {
|
|
62
63
|
allowConstantExport: isUsingVite,
|
|
63
64
|
allowExportNames: isUsingNextjs ? nextAllowedExportNames : []
|
|
@@ -64,11 +64,10 @@ const vitestRules = async () => {
|
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/configs/vitest.ts
|
|
66
66
|
async function vitestConfig() {
|
|
67
|
-
const vitestPlugin = await interopDefault(import("@vitest/eslint-plugin"));
|
|
68
67
|
return [{
|
|
69
68
|
files: GLOB_TESTS,
|
|
70
69
|
ignores: GLOB_E2E,
|
|
71
|
-
...
|
|
70
|
+
...(await interopDefault(import("@vitest/eslint-plugin"))).configs.recommended,
|
|
72
71
|
name: "jimmy.codes/vitest",
|
|
73
72
|
rules: await vitestRules()
|
|
74
73
|
}];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.14.0",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@stylistic/eslint-plugin": "^5.4.0",
|
|
47
47
|
"@tanstack/eslint-plugin-query": "^5.91.0",
|
|
48
48
|
"@types/eslint": "9.6.1",
|
|
49
|
-
"@typescript-eslint/parser": "^8.
|
|
50
|
-
"@typescript-eslint/utils": "^8.
|
|
51
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
49
|
+
"@typescript-eslint/parser": "^8.46.0",
|
|
50
|
+
"@typescript-eslint/utils": "^8.46.0",
|
|
51
|
+
"@vitest/eslint-plugin": "^1.3.16",
|
|
52
52
|
"astro-eslint-parser": "^1.2.2",
|
|
53
53
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
54
54
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -57,21 +57,21 @@
|
|
|
57
57
|
"eslint-plugin-import-x": "^4.16.1",
|
|
58
58
|
"eslint-plugin-jest": "^29.0.1",
|
|
59
59
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
60
|
-
"eslint-plugin-jsdoc": "^
|
|
60
|
+
"eslint-plugin-jsdoc": "^61.0.1",
|
|
61
61
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
62
62
|
"eslint-plugin-n": "^17.23.1",
|
|
63
63
|
"eslint-plugin-perfectionist": "^4.15.1",
|
|
64
64
|
"eslint-plugin-playwright": "^2.2.2",
|
|
65
65
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
66
|
-
"eslint-plugin-react-hooks": "^
|
|
66
|
+
"eslint-plugin-react-hooks": "^7.0.0",
|
|
67
67
|
"eslint-plugin-react-refresh": "0.4.23",
|
|
68
68
|
"eslint-plugin-regexp": "^2.10.0",
|
|
69
69
|
"eslint-plugin-storybook": "0.12.0",
|
|
70
|
-
"eslint-plugin-testing-library": "^7.
|
|
70
|
+
"eslint-plugin-testing-library": "^7.13.1",
|
|
71
71
|
"eslint-plugin-unicorn": "^61.0.2",
|
|
72
72
|
"globals": "^16.4.0",
|
|
73
73
|
"local-pkg": "^1.1.2",
|
|
74
|
-
"typescript-eslint": "^8.
|
|
74
|
+
"typescript-eslint": "^8.46.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"eslint": "^9.10.0"
|