@jimmy.codes/eslint-config 6.14.1 → 6.14.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/dist/index.d.ts +55 -1
- package/dist/index.js +2 -7
- package/dist/{react-BnGlxfxv.js → react-DRiOy59I.js} +12 -9
- package/package.json +13 -9
package/dist/index.d.ts
CHANGED
|
@@ -672,6 +672,11 @@ interface RuleOptions {
|
|
|
672
672
|
* @see https://eslint.style/rules/eol-last
|
|
673
673
|
*/
|
|
674
674
|
'@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>;
|
|
675
|
+
/**
|
|
676
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
677
|
+
* @see https://eslint.style/rules/list-style
|
|
678
|
+
*/
|
|
679
|
+
'@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle>;
|
|
675
680
|
/**
|
|
676
681
|
* Enforce line breaks between arguments of a function call
|
|
677
682
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -7401,6 +7406,50 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
|
|
|
7401
7406
|
type StylisticDotLocation = [] | [("object" | "property")];
|
|
7402
7407
|
// ----- @stylistic/eol-last -----
|
|
7403
7408
|
type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")];
|
|
7409
|
+
// ----- @stylistic/exp-list-style -----
|
|
7410
|
+
type StylisticExpListStyle = [] | [{
|
|
7411
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
7412
|
+
multiLine?: _StylisticExpListStyle_MultiLineConfig;
|
|
7413
|
+
overrides?: {
|
|
7414
|
+
"[]"?: _StylisticExpListStyle_BaseConfig;
|
|
7415
|
+
"{}"?: _StylisticExpListStyle_BaseConfig;
|
|
7416
|
+
"<>"?: _StylisticExpListStyle_BaseConfig;
|
|
7417
|
+
"()"?: _StylisticExpListStyle_BaseConfig;
|
|
7418
|
+
ArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7419
|
+
ArrayPattern?: _StylisticExpListStyle_BaseConfig;
|
|
7420
|
+
ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7421
|
+
CallExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7422
|
+
ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7423
|
+
FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7424
|
+
FunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7425
|
+
ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7426
|
+
ImportAttributes?: _StylisticExpListStyle_BaseConfig;
|
|
7427
|
+
NewExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7428
|
+
ObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7429
|
+
ObjectPattern?: _StylisticExpListStyle_BaseConfig;
|
|
7430
|
+
TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
|
|
7431
|
+
TSFunctionType?: _StylisticExpListStyle_BaseConfig;
|
|
7432
|
+
TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
|
|
7433
|
+
TSEnumBody?: _StylisticExpListStyle_BaseConfig;
|
|
7434
|
+
TSTupleType?: _StylisticExpListStyle_BaseConfig;
|
|
7435
|
+
TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
|
|
7436
|
+
TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7437
|
+
TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
|
|
7438
|
+
JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7439
|
+
JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7440
|
+
};
|
|
7441
|
+
}];
|
|
7442
|
+
interface _StylisticExpListStyle_SingleLineConfig {
|
|
7443
|
+
spacing?: ("always" | "never");
|
|
7444
|
+
maxItems?: number;
|
|
7445
|
+
}
|
|
7446
|
+
interface _StylisticExpListStyle_MultiLineConfig {
|
|
7447
|
+
minItems?: number;
|
|
7448
|
+
}
|
|
7449
|
+
interface _StylisticExpListStyle_BaseConfig {
|
|
7450
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
7451
|
+
multiline?: _StylisticExpListStyle_MultiLineConfig;
|
|
7452
|
+
}
|
|
7404
7453
|
// ----- @stylistic/function-call-argument-newline -----
|
|
7405
7454
|
type StylisticFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
|
|
7406
7455
|
// ----- @stylistic/function-call-spacing -----
|
|
@@ -7470,7 +7519,11 @@ type StylisticIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
7470
7519
|
ObjectExpression?: (number | ("first" | "off"));
|
|
7471
7520
|
ImportDeclaration?: (number | ("first" | "off"));
|
|
7472
7521
|
flatTernaryExpressions?: boolean;
|
|
7473
|
-
offsetTernaryExpressions?: boolean
|
|
7522
|
+
offsetTernaryExpressions?: (boolean | {
|
|
7523
|
+
CallExpression?: boolean;
|
|
7524
|
+
AwaitExpression?: boolean;
|
|
7525
|
+
NewExpression?: boolean;
|
|
7526
|
+
});
|
|
7474
7527
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean;
|
|
7475
7528
|
ignoredNodes?: string[];
|
|
7476
7529
|
ignoreComments?: boolean;
|
|
@@ -8271,6 +8324,7 @@ type StylisticObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "n
|
|
|
8271
8324
|
TSInterfaceBody?: ("always" | "never");
|
|
8272
8325
|
TSEnumBody?: ("always" | "never");
|
|
8273
8326
|
};
|
|
8327
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
8274
8328
|
}];
|
|
8275
8329
|
// ----- @stylistic/object-property-newline -----
|
|
8276
8330
|
type StylisticObjectPropertyNewline = [] | [{
|
package/dist/index.js
CHANGED
|
@@ -120,12 +120,7 @@ const additionalRules = {
|
|
|
120
120
|
"no-implicit-globals": "error",
|
|
121
121
|
"no-lonely-if": "error",
|
|
122
122
|
"no-loop-func": "error",
|
|
123
|
-
"no-magic-numbers":
|
|
124
|
-
0,
|
|
125
|
-
1,
|
|
126
|
-
-1,
|
|
127
|
-
2
|
|
128
|
-
] }],
|
|
123
|
+
"no-magic-numbers": "off",
|
|
129
124
|
"no-new-wrappers": "error",
|
|
130
125
|
"no-param-reassign": ["error", { props: true }],
|
|
131
126
|
"no-promise-executor-return": "error",
|
|
@@ -484,7 +479,7 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
|
|
|
484
479
|
];
|
|
485
480
|
const featureConfigs = await Promise.all([
|
|
486
481
|
isTypescriptEnabled && unwrap(import("./typescript-D8AT5dEv.js")),
|
|
487
|
-
isReactEnabled && unwrap(import("./react-
|
|
482
|
+
isReactEnabled && unwrap(import("./react-DRiOy59I.js")),
|
|
488
483
|
isTanstackQueryEnabled && unwrap(import("./tanstack-query-DqqVfxJs.js")),
|
|
489
484
|
isAstroEnabled && unwrap(import("./astro-Cc3Rxusf.js")),
|
|
490
485
|
isJestEnabled && unwrap(import("./jest-BCatBVvc.js")),
|
|
@@ -75,14 +75,17 @@ const reactRules = async () => {
|
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region src/configs/react.ts
|
|
77
77
|
async function reactConfig() {
|
|
78
|
-
const [reactPlugin, jsxA11yPlugin, reactHooksPlugin, reactRefreshPlugin, reactCompilerPlugin] = await Promise.all([
|
|
78
|
+
const [reactPlugin, jsxA11yPlugin, reactHooksPlugin, reactRefreshPlugin, reactCompilerPlugin, reactHooksExtraPlugin, reactDomPlugin, reactWebApiPlugin, reactNamingConventionPlugin] = await Promise.all([
|
|
79
79
|
interopDefault(import("@eslint-react/eslint-plugin")),
|
|
80
80
|
interopDefault(import("eslint-plugin-jsx-a11y")),
|
|
81
81
|
interopDefault(import("eslint-plugin-react-hooks")),
|
|
82
|
-
import("eslint-plugin-react-refresh"),
|
|
83
|
-
import("eslint-plugin-react-compiler")
|
|
82
|
+
interopDefault(import("eslint-plugin-react-refresh")),
|
|
83
|
+
interopDefault(import("eslint-plugin-react-compiler")),
|
|
84
|
+
interopDefault(import("eslint-plugin-react-hooks-extra")),
|
|
85
|
+
interopDefault(import("eslint-plugin-react-dom")),
|
|
86
|
+
interopDefault(import("eslint-plugin-react-web-api")),
|
|
87
|
+
interopDefault(import("eslint-plugin-react-naming-convention"))
|
|
84
88
|
]);
|
|
85
|
-
const reactPlugins = reactPlugin.configs.all.plugins;
|
|
86
89
|
return [{
|
|
87
90
|
files: [GLOB_JSX, GLOB_TSX],
|
|
88
91
|
languageOptions: {
|
|
@@ -94,11 +97,11 @@ async function reactConfig() {
|
|
|
94
97
|
},
|
|
95
98
|
name: "jimmy.codes/react",
|
|
96
99
|
plugins: {
|
|
97
|
-
"@eslint-react":
|
|
98
|
-
"@eslint-react/dom":
|
|
99
|
-
"@eslint-react/hooks-extra":
|
|
100
|
-
"@eslint-react/naming-convention":
|
|
101
|
-
"@eslint-react/web-api":
|
|
100
|
+
"@eslint-react": reactPlugin,
|
|
101
|
+
"@eslint-react/dom": reactDomPlugin,
|
|
102
|
+
"@eslint-react/hooks-extra": reactHooksExtraPlugin,
|
|
103
|
+
"@eslint-react/naming-convention": reactNamingConventionPlugin,
|
|
104
|
+
"@eslint-react/web-api": reactWebApiPlugin,
|
|
102
105
|
"jsx-a11y": jsxA11yPlugin,
|
|
103
106
|
"react-compiler": reactCompilerPlugin,
|
|
104
107
|
"react-hooks": reactHooksPlugin,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "6.14.
|
|
3
|
+
"version": "6.14.3",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
43
|
-
"@eslint-react/eslint-plugin": "2.2.
|
|
44
|
-
"@eslint/js": "^9.
|
|
45
|
-
"@next/eslint-plugin-next": "^15.5.
|
|
46
|
-
"@stylistic/eslint-plugin": "^5.
|
|
47
|
-
"@tanstack/eslint-plugin-query": "^5.91.
|
|
43
|
+
"@eslint-react/eslint-plugin": "^2.2.2",
|
|
44
|
+
"@eslint/js": "^9.38.0",
|
|
45
|
+
"@next/eslint-plugin-next": "^15.5.6",
|
|
46
|
+
"@stylistic/eslint-plugin": "^5.5.0",
|
|
47
|
+
"@tanstack/eslint-plugin-query": "^5.91.2",
|
|
48
48
|
"@types/eslint": "9.6.1",
|
|
49
49
|
"@typescript-eslint/parser": "^8.46.1",
|
|
50
50
|
"@typescript-eslint/utils": "^8.46.1",
|
|
51
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
51
|
+
"@vitest/eslint-plugin": "^1.3.23",
|
|
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,14 +57,18 @@
|
|
|
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": "^61.1.
|
|
60
|
+
"eslint-plugin-jsdoc": "^61.1.4",
|
|
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-dom": "^2.2.2",
|
|
66
67
|
"eslint-plugin-react-hooks": "^7.0.0",
|
|
67
|
-
"eslint-plugin-react-
|
|
68
|
+
"eslint-plugin-react-hooks-extra": "^2.2.2",
|
|
69
|
+
"eslint-plugin-react-naming-convention": "^2.2.2",
|
|
70
|
+
"eslint-plugin-react-refresh": "0.4.24",
|
|
71
|
+
"eslint-plugin-react-web-api": "^2.2.2",
|
|
68
72
|
"eslint-plugin-regexp": "^2.10.0",
|
|
69
73
|
"eslint-plugin-storybook": "0.12.0",
|
|
70
74
|
"eslint-plugin-testing-library": "^7.13.3",
|