@jimmy.codes/eslint-config 7.7.0 → 7.9.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/README.md +1 -2
- package/dist/{astro-BMlbg_8j.mjs → astro-Cx6fITty.mjs} +3 -2
- package/dist/{has-dependency-BB12gGNt.mjs → has-dependency-B7hGqVJZ.mjs} +3 -1
- package/dist/index.d.mts +56 -158
- package/dist/index.mjs +14 -25
- package/dist/{nextjs-D_XQzWJz.mjs → nextjs-B0fXPHjQ.mjs} +1 -1
- package/dist/{playwright-hse_Mk2B.mjs → playwright-Bhw2bvHF.mjs} +1 -1
- package/dist/{react-CWFVE51B.mjs → react-CEyLW1lt.mjs} +7 -6
- package/dist/rebrand-DXAl5XCF.mjs +19 -0
- package/dist/{storybook-Cmw5qksj.mjs → storybook-cMDF1zHD.mjs} +1 -1
- package/dist/{testing-library-Dqon1Cou.mjs → testing-library-3qEUjAPR.mjs} +1 -18
- package/package.json +2 -3
- /package/dist/{jest-W70UkOeC.mjs → jest-Dgx6RBQH.mjs} +0 -0
- /package/dist/{tanstack-query-ntNKBb-Z.mjs → tanstack-query-TQFfKAwZ.mjs} +0 -0
- /package/dist/{typescript-BDNbtOD5.mjs → typescript-IuDeWlMw.mjs} +0 -0
- /package/dist/{upwarn-Bq0SLcj_.mjs → upwarn-BFKZTYPG.mjs} +0 -0
- /package/dist/{vitest-BXTl-VRj.mjs → vitest-CQTl1RfB.mjs} +0 -0
package/README.md
CHANGED
|
@@ -272,13 +272,12 @@ This config includes the following plugins:
|
|
|
272
272
|
| [`@tanstack/eslint-plugin-query`](https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query) | TanStack Query rules |
|
|
273
273
|
| [`@vitest/eslint-plugin`](https://github.com/vitest-dev/eslint-plugin-vitest) | Vitest support |
|
|
274
274
|
| [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier) | Disable formatting conflicts |
|
|
275
|
-
| [`eslint-plugin-arrow-return-style-x`](https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x) | Arrow function return style |
|
|
276
275
|
| [`eslint-plugin-astro`](https://ota-meshi.github.io/eslint-plugin-astro/) | Astro framework support |
|
|
277
276
|
| [`eslint-plugin-import-x`](https://github.com/un-ts/eslint-plugin-import-x) | Import order and hygiene |
|
|
278
277
|
| [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest) | Jest support |
|
|
279
278
|
| [`eslint-plugin-jest-dom`](https://github.com/testing-library/eslint-plugin-jest-dom) | DOM assertions for tests |
|
|
280
279
|
| [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc) | JSDoc comment rules |
|
|
281
|
-
| [`eslint-plugin-jsx-a11y`](https://github.com/
|
|
280
|
+
| [`eslint-plugin-jsx-a11y-x`](https://github.com/es-tooling/eslint-plugin-jsx-a11y-x) | Accessibility in JSX |
|
|
282
281
|
| [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n) | Node.js-specific rules |
|
|
283
282
|
| [`eslint-plugin-perfectionist`](https://perfectionist.dev) | Sorting and consistency |
|
|
284
283
|
| [`eslint-plugin-playwright`](https://github.com/playwright-community/eslint-plugin-playwright) | Playwright testing support |
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GLOB_ASTRO } from "./globs.mjs";
|
|
2
2
|
import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
|
|
3
|
+
import { t as rebrand } from "./rebrand-DXAl5XCF.mjs";
|
|
3
4
|
import globals from "globals";
|
|
4
5
|
//#region src/configs/astro.ts
|
|
5
6
|
async function astroConfig(options) {
|
|
@@ -9,7 +10,7 @@ async function astroConfig(options) {
|
|
|
9
10
|
import("typescript-eslint"),
|
|
10
11
|
import("eslint-plugin-astro"),
|
|
11
12
|
import("astro-eslint-parser"),
|
|
12
|
-
unwrapDefault(import("eslint-plugin-jsx-a11y"))
|
|
13
|
+
unwrapDefault(import("eslint-plugin-jsx-a11y-x"))
|
|
13
14
|
]);
|
|
14
15
|
return [
|
|
15
16
|
{
|
|
@@ -34,7 +35,7 @@ async function astroConfig(options) {
|
|
|
34
35
|
},
|
|
35
36
|
processor: "astro/client-side-ts",
|
|
36
37
|
rules: {
|
|
37
|
-
...jsxA11yPlugin.configs.recommended.rules,
|
|
38
|
+
...rebrand(jsxA11yPlugin.configs.recommended.rules, "jsx-a11y-x", "jsx-a11y"),
|
|
38
39
|
"astro/missing-client-only-directive-value": "error",
|
|
39
40
|
"astro/no-conflict-set-directives": "error",
|
|
40
41
|
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
@@ -13,7 +13,9 @@ const hasJest = () => {
|
|
|
13
13
|
return isPackageExists("jest");
|
|
14
14
|
};
|
|
15
15
|
const hasTestingLibrary = () => {
|
|
16
|
-
return ["@testing-library/react"].some((pkg) =>
|
|
16
|
+
return ["@testing-library/react"].some((pkg) => {
|
|
17
|
+
return isPackageExists(pkg);
|
|
18
|
+
});
|
|
17
19
|
};
|
|
18
20
|
const hasReactQuery = () => {
|
|
19
21
|
return isPackageExists("@tanstack/react-query");
|
package/dist/index.d.mts
CHANGED
|
@@ -1402,16 +1402,6 @@ interface RuleOptions {
|
|
|
1402
1402
|
* @deprecated
|
|
1403
1403
|
*/
|
|
1404
1404
|
'arrow-spacing'?: Linter.RuleEntry<ArrowSpacing>;
|
|
1405
|
-
/**
|
|
1406
|
-
* Enforce consistent arrow function return style based on length, multiline expressions, JSX usage, and export context
|
|
1407
|
-
* @see https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x/blob/v1.2.6/src/rules/arrow-return-style/documentation.md
|
|
1408
|
-
*/
|
|
1409
|
-
'arrow-style/arrow-return-style'?: Linter.RuleEntry<ArrowStyleArrowReturnStyle>;
|
|
1410
|
-
/**
|
|
1411
|
-
* Disallow anonymous arrow functions as export default declarations
|
|
1412
|
-
* @see https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x/blob/v1.2.6/src/rules/no-export-default-arrow/documentation.md
|
|
1413
|
-
*/
|
|
1414
|
-
'arrow-style/no-export-default-arrow'?: Linter.RuleEntry<[]>;
|
|
1415
1405
|
/**
|
|
1416
1406
|
* apply `jsx-a11y/alt-text` rule to Astro components
|
|
1417
1407
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/alt-text/
|
|
@@ -2977,204 +2967,186 @@ interface RuleOptions {
|
|
|
2977
2967
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header
|
|
2978
2968
|
*/
|
|
2979
2969
|
'jsdoc/valid-types'?: Linter.RuleEntry<JsdocValidTypes>;
|
|
2980
|
-
/**
|
|
2981
|
-
* Enforce emojis are wrapped in `<span>` and provide screen reader access.
|
|
2982
|
-
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md
|
|
2983
|
-
* @deprecated
|
|
2984
|
-
*/
|
|
2985
|
-
'jsx-a11y/accessible-emoji'?: Linter.RuleEntry<JsxA11YAccessibleEmoji>;
|
|
2986
2970
|
/**
|
|
2987
2971
|
* Enforce all elements that require alternative text have meaningful information to relay back to end user.
|
|
2988
|
-
* @see https://github.com/
|
|
2972
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/alt-text.md
|
|
2989
2973
|
*/
|
|
2990
2974
|
'jsx-a11y/alt-text'?: Linter.RuleEntry<JsxA11YAltText>;
|
|
2991
2975
|
/**
|
|
2992
2976
|
* Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link".
|
|
2993
|
-
* @see https://github.com/
|
|
2977
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/anchor-ambiguous-text.md
|
|
2994
2978
|
*/
|
|
2995
2979
|
'jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry<JsxA11YAnchorAmbiguousText>;
|
|
2996
2980
|
/**
|
|
2997
2981
|
* Enforce all anchors to contain accessible content.
|
|
2998
|
-
* @see https://github.com/
|
|
2982
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/anchor-has-content.md
|
|
2999
2983
|
*/
|
|
3000
2984
|
'jsx-a11y/anchor-has-content'?: Linter.RuleEntry<JsxA11YAnchorHasContent>;
|
|
3001
2985
|
/**
|
|
3002
2986
|
* Enforce all anchors are valid, navigable elements.
|
|
3003
|
-
* @see https://github.com/
|
|
2987
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/anchor-is-valid.md
|
|
3004
2988
|
*/
|
|
3005
2989
|
'jsx-a11y/anchor-is-valid'?: Linter.RuleEntry<JsxA11YAnchorIsValid>;
|
|
3006
2990
|
/**
|
|
3007
2991
|
* Enforce elements with aria-activedescendant are tabbable.
|
|
3008
|
-
* @see https://github.com/
|
|
2992
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md
|
|
3009
2993
|
*/
|
|
3010
|
-
'jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<
|
|
2994
|
+
'jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<[]>;
|
|
3011
2995
|
/**
|
|
3012
2996
|
* Enforce all `aria-*` props are valid.
|
|
3013
|
-
* @see https://github.com/
|
|
2997
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/aria-props.md
|
|
3014
2998
|
*/
|
|
3015
|
-
'jsx-a11y/aria-props'?: Linter.RuleEntry<
|
|
2999
|
+
'jsx-a11y/aria-props'?: Linter.RuleEntry<[]>;
|
|
3016
3000
|
/**
|
|
3017
3001
|
* Enforce ARIA state and property values are valid.
|
|
3018
|
-
* @see https://github.com/
|
|
3002
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/aria-proptypes.md
|
|
3019
3003
|
*/
|
|
3020
|
-
'jsx-a11y/aria-proptypes'?: Linter.RuleEntry<
|
|
3004
|
+
'jsx-a11y/aria-proptypes'?: Linter.RuleEntry<[]>;
|
|
3021
3005
|
/**
|
|
3022
3006
|
* Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
|
|
3023
|
-
* @see https://github.com/
|
|
3007
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/aria-role.md
|
|
3024
3008
|
*/
|
|
3025
3009
|
'jsx-a11y/aria-role'?: Linter.RuleEntry<JsxA11YAriaRole>;
|
|
3026
3010
|
/**
|
|
3027
3011
|
* Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
|
|
3028
|
-
* @see https://github.com/
|
|
3012
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/aria-unsupported-elements.md
|
|
3029
3013
|
*/
|
|
3030
|
-
'jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<
|
|
3014
|
+
'jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<[]>;
|
|
3031
3015
|
/**
|
|
3032
3016
|
* Enforce that autocomplete attributes are used correctly.
|
|
3033
|
-
* @see https://github.com/
|
|
3017
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/autocomplete-valid.md
|
|
3034
3018
|
*/
|
|
3035
3019
|
'jsx-a11y/autocomplete-valid'?: Linter.RuleEntry<JsxA11YAutocompleteValid>;
|
|
3036
3020
|
/**
|
|
3037
3021
|
* Enforce a clickable non-interactive element has at least one keyboard event listener.
|
|
3038
|
-
* @see https://github.com/
|
|
3022
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/click-events-have-key-events.md
|
|
3039
3023
|
*/
|
|
3040
|
-
'jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<
|
|
3024
|
+
'jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<[]>;
|
|
3041
3025
|
/**
|
|
3042
3026
|
* Enforce that a control (an interactive element) has a text label.
|
|
3043
|
-
* @see https://github.com/
|
|
3027
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/control-has-associated-label.md
|
|
3044
3028
|
*/
|
|
3045
3029
|
'jsx-a11y/control-has-associated-label'?: Linter.RuleEntry<JsxA11YControlHasAssociatedLabel>;
|
|
3046
3030
|
/**
|
|
3047
3031
|
* Enforce heading (`h1`, `h2`, etc) elements contain accessible content.
|
|
3048
|
-
* @see https://github.com/
|
|
3032
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/heading-has-content.md
|
|
3049
3033
|
*/
|
|
3050
3034
|
'jsx-a11y/heading-has-content'?: Linter.RuleEntry<JsxA11YHeadingHasContent>;
|
|
3051
3035
|
/**
|
|
3052
3036
|
* Enforce `<html>` element has `lang` prop.
|
|
3053
|
-
* @see https://github.com/
|
|
3037
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/html-has-lang.md
|
|
3054
3038
|
*/
|
|
3055
|
-
'jsx-a11y/html-has-lang'?: Linter.RuleEntry<
|
|
3039
|
+
'jsx-a11y/html-has-lang'?: Linter.RuleEntry<[]>;
|
|
3056
3040
|
/**
|
|
3057
3041
|
* Enforce iframe elements have a title attribute.
|
|
3058
|
-
* @see https://github.com/
|
|
3042
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/iframe-has-title.md
|
|
3059
3043
|
*/
|
|
3060
|
-
'jsx-a11y/iframe-has-title'?: Linter.RuleEntry<
|
|
3044
|
+
'jsx-a11y/iframe-has-title'?: Linter.RuleEntry<[]>;
|
|
3061
3045
|
/**
|
|
3062
3046
|
* Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo".
|
|
3063
|
-
* @see https://github.com/
|
|
3047
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/img-redundant-alt.md
|
|
3064
3048
|
*/
|
|
3065
3049
|
'jsx-a11y/img-redundant-alt'?: Linter.RuleEntry<JsxA11YImgRedundantAlt>;
|
|
3066
3050
|
/**
|
|
3067
3051
|
* Enforce that elements with interactive handlers like `onClick` must be focusable.
|
|
3068
|
-
* @see https://github.com/
|
|
3052
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/interactive-supports-focus.md
|
|
3069
3053
|
*/
|
|
3070
3054
|
'jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry<JsxA11YInteractiveSupportsFocus>;
|
|
3071
3055
|
/**
|
|
3072
3056
|
* Enforce that a `label` tag has a text label and an associated control.
|
|
3073
|
-
* @see https://github.com/
|
|
3057
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/label-has-associated-control.md
|
|
3074
3058
|
*/
|
|
3075
3059
|
'jsx-a11y/label-has-associated-control'?: Linter.RuleEntry<JsxA11YLabelHasAssociatedControl>;
|
|
3076
|
-
/**
|
|
3077
|
-
* Enforce that `<label>` elements have the `htmlFor` prop.
|
|
3078
|
-
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md
|
|
3079
|
-
* @deprecated
|
|
3080
|
-
*/
|
|
3081
|
-
'jsx-a11y/label-has-for'?: Linter.RuleEntry<JsxA11YLabelHasFor>;
|
|
3082
3060
|
/**
|
|
3083
3061
|
* Enforce lang attribute has a valid value.
|
|
3084
|
-
* @see https://github.com/
|
|
3062
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/lang.md
|
|
3085
3063
|
*/
|
|
3086
|
-
'jsx-a11y/lang'?: Linter.RuleEntry<
|
|
3064
|
+
'jsx-a11y/lang'?: Linter.RuleEntry<[]>;
|
|
3087
3065
|
/**
|
|
3088
3066
|
* Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.
|
|
3089
|
-
* @see https://github.com/
|
|
3067
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/media-has-caption.md
|
|
3090
3068
|
*/
|
|
3091
3069
|
'jsx-a11y/media-has-caption'?: Linter.RuleEntry<JsxA11YMediaHasCaption>;
|
|
3092
3070
|
/**
|
|
3093
3071
|
* Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users.
|
|
3094
|
-
* @see https://github.com/
|
|
3072
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/mouse-events-have-key-events.md
|
|
3095
3073
|
*/
|
|
3096
3074
|
'jsx-a11y/mouse-events-have-key-events'?: Linter.RuleEntry<JsxA11YMouseEventsHaveKeyEvents>;
|
|
3097
3075
|
/**
|
|
3098
3076
|
* Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader.
|
|
3099
|
-
* @see https://github.com/
|
|
3077
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-access-key.md
|
|
3100
3078
|
*/
|
|
3101
|
-
'jsx-a11y/no-access-key'?: Linter.RuleEntry<
|
|
3079
|
+
'jsx-a11y/no-access-key'?: Linter.RuleEntry<[]>;
|
|
3102
3080
|
/**
|
|
3103
3081
|
* Disallow `aria-hidden="true"` from being set on focusable elements.
|
|
3104
|
-
* @see https://github.com/
|
|
3082
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-aria-hidden-on-focusable.md
|
|
3105
3083
|
*/
|
|
3106
|
-
'jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<
|
|
3084
|
+
'jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<[]>;
|
|
3107
3085
|
/**
|
|
3108
|
-
* Enforce autoFocus prop is not
|
|
3109
|
-
* @see https://github.com/
|
|
3086
|
+
* Enforce autoFocus prop is not enabled.
|
|
3087
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-autofocus.md
|
|
3110
3088
|
*/
|
|
3111
3089
|
'jsx-a11y/no-autofocus'?: Linter.RuleEntry<JsxA11YNoAutofocus>;
|
|
3112
3090
|
/**
|
|
3113
3091
|
* Enforce distracting elements are not used.
|
|
3114
|
-
* @see https://github.com/
|
|
3092
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-distracting-elements.md
|
|
3115
3093
|
*/
|
|
3116
3094
|
'jsx-a11y/no-distracting-elements'?: Linter.RuleEntry<JsxA11YNoDistractingElements>;
|
|
3117
3095
|
/**
|
|
3118
|
-
*
|
|
3119
|
-
* @see https://github.com/
|
|
3096
|
+
* Disallow interactive elements being assigned non-interactive roles.
|
|
3097
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md
|
|
3120
3098
|
*/
|
|
3121
3099
|
'jsx-a11y/no-interactive-element-to-noninteractive-role'?: Linter.RuleEntry<JsxA11YNoInteractiveElementToNoninteractiveRole>;
|
|
3122
3100
|
/**
|
|
3123
|
-
*
|
|
3124
|
-
* @see https://github.com/
|
|
3101
|
+
* Disallow non-interactive elements being assigned mouse or keyboard event listeners.
|
|
3102
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md
|
|
3125
3103
|
*/
|
|
3126
3104
|
'jsx-a11y/no-noninteractive-element-interactions'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementInteractions>;
|
|
3127
3105
|
/**
|
|
3128
|
-
*
|
|
3129
|
-
* @see https://github.com/
|
|
3106
|
+
* Disallow non-interactive elements being assigned interactive roles.
|
|
3107
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md
|
|
3130
3108
|
*/
|
|
3131
3109
|
'jsx-a11y/no-noninteractive-element-to-interactive-role'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementToInteractiveRole>;
|
|
3132
3110
|
/**
|
|
3133
|
-
* `tabIndex`
|
|
3134
|
-
* @see https://github.com/
|
|
3111
|
+
* Enforce `tabIndex` only be declared on interactive elements.
|
|
3112
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-noninteractive-tabindex.md
|
|
3135
3113
|
*/
|
|
3136
3114
|
'jsx-a11y/no-noninteractive-tabindex'?: Linter.RuleEntry<JsxA11YNoNoninteractiveTabindex>;
|
|
3137
|
-
/**
|
|
3138
|
-
* Enforce usage of `onBlur` over `onChange` on select menus for accessibility.
|
|
3139
|
-
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md
|
|
3140
|
-
* @deprecated
|
|
3141
|
-
*/
|
|
3142
|
-
'jsx-a11y/no-onchange'?: Linter.RuleEntry<JsxA11YNoOnchange>;
|
|
3143
3115
|
/**
|
|
3144
3116
|
* Enforce explicit role property is not the same as implicit/default role property on element.
|
|
3145
|
-
* @see https://github.com/
|
|
3117
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-redundant-roles.md
|
|
3146
3118
|
*/
|
|
3147
3119
|
'jsx-a11y/no-redundant-roles'?: Linter.RuleEntry<JsxA11YNoRedundantRoles>;
|
|
3148
3120
|
/**
|
|
3149
3121
|
* Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute.
|
|
3150
|
-
* @see https://github.com/
|
|
3122
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-static-element-interactions.md
|
|
3151
3123
|
*/
|
|
3152
3124
|
'jsx-a11y/no-static-element-interactions'?: Linter.RuleEntry<JsxA11YNoStaticElementInteractions>;
|
|
3153
3125
|
/**
|
|
3154
3126
|
* Enforces using semantic DOM elements over the ARIA `role` property.
|
|
3155
|
-
* @see https://github.com/
|
|
3127
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/prefer-tag-over-role.md
|
|
3156
3128
|
*/
|
|
3157
|
-
'jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<
|
|
3129
|
+
'jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<[]>;
|
|
3158
3130
|
/**
|
|
3159
3131
|
* Enforce that elements with ARIA roles must have all required attributes for that role.
|
|
3160
|
-
* @see https://github.com/
|
|
3132
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/role-has-required-aria-props.md
|
|
3161
3133
|
*/
|
|
3162
|
-
'jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<
|
|
3134
|
+
'jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<[]>;
|
|
3163
3135
|
/**
|
|
3164
3136
|
* Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.
|
|
3165
|
-
* @see https://github.com/
|
|
3137
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/role-supports-aria-props.md
|
|
3166
3138
|
*/
|
|
3167
|
-
'jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<
|
|
3139
|
+
'jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<[]>;
|
|
3168
3140
|
/**
|
|
3169
3141
|
* Enforce `scope` prop is only used on `<th>` elements.
|
|
3170
|
-
* @see https://github.com/
|
|
3142
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/scope.md
|
|
3171
3143
|
*/
|
|
3172
|
-
'jsx-a11y/scope'?: Linter.RuleEntry<
|
|
3144
|
+
'jsx-a11y/scope'?: Linter.RuleEntry<[]>;
|
|
3173
3145
|
/**
|
|
3174
3146
|
* Enforce `tabIndex` value is not greater than zero.
|
|
3175
|
-
* @see https://github.com/
|
|
3147
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/tabindex-no-positive.md
|
|
3176
3148
|
*/
|
|
3177
|
-
'jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<
|
|
3149
|
+
'jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<[]>;
|
|
3178
3150
|
/**
|
|
3179
3151
|
* Enforce the consistent use of either double or single quotes in JSX attributes
|
|
3180
3152
|
* @see https://eslint.org/docs/latest/rules/jsx-quotes
|
|
@@ -9602,17 +9574,6 @@ type ArrowParens = [] | [("always" | "as-needed")] | [("always" | "as-needed"),
|
|
|
9602
9574
|
type ArrowSpacing = [] | [{
|
|
9603
9575
|
before?: boolean;
|
|
9604
9576
|
after?: boolean;
|
|
9605
|
-
}]; // ----- arrow-style/arrow-return-style -----
|
|
9606
|
-
type ArrowStyleArrowReturnStyle = [] | [{
|
|
9607
|
-
jsxAlwaysUseExplicitReturn?: boolean;
|
|
9608
|
-
maxLen?: number;
|
|
9609
|
-
maxObjectProperties?: number;
|
|
9610
|
-
namedExportsAlwaysUseExplicitReturn?: boolean;
|
|
9611
|
-
objectReturnStyle?: ("always-explicit" | "complex-explicit" | "off");
|
|
9612
|
-
usePrettier?: (boolean | {
|
|
9613
|
-
[k: string]: unknown | undefined;
|
|
9614
|
-
} | null);
|
|
9615
|
-
[k: string]: unknown | undefined;
|
|
9616
9577
|
}]; // ----- astro/jsx-a11y/alt-text -----
|
|
9617
9578
|
type AstroJsxA11YAltText = [] | [{
|
|
9618
9579
|
elements?: string[];
|
|
@@ -10771,9 +10732,6 @@ type JsdocTypeFormatting = [] | [{
|
|
|
10771
10732
|
}]; // ----- jsdoc/valid-types -----
|
|
10772
10733
|
type JsdocValidTypes = [] | [{
|
|
10773
10734
|
allowEmptyNamepaths?: boolean;
|
|
10774
|
-
}]; // ----- jsx-a11y/accessible-emoji -----
|
|
10775
|
-
type JsxA11YAccessibleEmoji = [] | [{
|
|
10776
|
-
[k: string]: unknown | undefined;
|
|
10777
10735
|
}]; // ----- jsx-a11y/alt-text -----
|
|
10778
10736
|
type JsxA11YAltText = [] | [{
|
|
10779
10737
|
elements?: string[];
|
|
@@ -10796,30 +10754,15 @@ type JsxA11YAnchorIsValid = [] | [{
|
|
|
10796
10754
|
specialLink?: string[];
|
|
10797
10755
|
aspects?: [("noHref" | "invalidHref" | "preferButton"), ...(("noHref" | "invalidHref" | "preferButton"))[]];
|
|
10798
10756
|
[k: string]: unknown | undefined;
|
|
10799
|
-
}]; // ----- jsx-a11y/aria-activedescendant-has-tabindex -----
|
|
10800
|
-
type JsxA11YAriaActivedescendantHasTabindex = [] | [{
|
|
10801
|
-
[k: string]: unknown | undefined;
|
|
10802
|
-
}]; // ----- jsx-a11y/aria-props -----
|
|
10803
|
-
type JsxA11YAriaProps = [] | [{
|
|
10804
|
-
[k: string]: unknown | undefined;
|
|
10805
|
-
}]; // ----- jsx-a11y/aria-proptypes -----
|
|
10806
|
-
type JsxA11YAriaProptypes = [] | [{
|
|
10807
|
-
[k: string]: unknown | undefined;
|
|
10808
10757
|
}]; // ----- jsx-a11y/aria-role -----
|
|
10809
10758
|
type JsxA11YAriaRole = [] | [{
|
|
10810
10759
|
allowedInvalidRoles?: string[];
|
|
10811
10760
|
ignoreNonDOM?: boolean;
|
|
10812
10761
|
[k: string]: unknown | undefined;
|
|
10813
|
-
}]; // ----- jsx-a11y/aria-unsupported-elements -----
|
|
10814
|
-
type JsxA11YAriaUnsupportedElements = [] | [{
|
|
10815
|
-
[k: string]: unknown | undefined;
|
|
10816
10762
|
}]; // ----- jsx-a11y/autocomplete-valid -----
|
|
10817
10763
|
type JsxA11YAutocompleteValid = [] | [{
|
|
10818
10764
|
inputComponents?: string[];
|
|
10819
10765
|
[k: string]: unknown | undefined;
|
|
10820
|
-
}]; // ----- jsx-a11y/click-events-have-key-events -----
|
|
10821
|
-
type JsxA11YClickEventsHaveKeyEvents = [] | [{
|
|
10822
|
-
[k: string]: unknown | undefined;
|
|
10823
10766
|
}]; // ----- jsx-a11y/control-has-associated-label -----
|
|
10824
10767
|
type JsxA11YControlHasAssociatedLabel = [] | [{
|
|
10825
10768
|
labelAttributes?: string[];
|
|
@@ -10832,12 +10775,6 @@ type JsxA11YControlHasAssociatedLabel = [] | [{
|
|
|
10832
10775
|
type JsxA11YHeadingHasContent = [] | [{
|
|
10833
10776
|
components?: string[];
|
|
10834
10777
|
[k: string]: unknown | undefined;
|
|
10835
|
-
}]; // ----- jsx-a11y/html-has-lang -----
|
|
10836
|
-
type JsxA11YHtmlHasLang = [] | [{
|
|
10837
|
-
[k: string]: unknown | undefined;
|
|
10838
|
-
}]; // ----- jsx-a11y/iframe-has-title -----
|
|
10839
|
-
type JsxA11YIframeHasTitle = [] | [{
|
|
10840
|
-
[k: string]: unknown | undefined;
|
|
10841
10778
|
}]; // ----- jsx-a11y/img-redundant-alt -----
|
|
10842
10779
|
type JsxA11YImgRedundantAlt = [] | [{
|
|
10843
10780
|
components?: string[];
|
|
@@ -10855,21 +10792,6 @@ type JsxA11YLabelHasAssociatedControl = [] | [{
|
|
|
10855
10792
|
assert?: ("htmlFor" | "nesting" | "both" | "either");
|
|
10856
10793
|
depth?: number;
|
|
10857
10794
|
[k: string]: unknown | undefined;
|
|
10858
|
-
}]; // ----- jsx-a11y/label-has-for -----
|
|
10859
|
-
type JsxA11YLabelHasFor = [] | [{
|
|
10860
|
-
components?: string[];
|
|
10861
|
-
required?: (("nesting" | "id") | {
|
|
10862
|
-
some: ("nesting" | "id")[];
|
|
10863
|
-
[k: string]: unknown | undefined;
|
|
10864
|
-
} | {
|
|
10865
|
-
every: ("nesting" | "id")[];
|
|
10866
|
-
[k: string]: unknown | undefined;
|
|
10867
|
-
});
|
|
10868
|
-
allowChildren?: boolean;
|
|
10869
|
-
[k: string]: unknown | undefined;
|
|
10870
|
-
}]; // ----- jsx-a11y/lang -----
|
|
10871
|
-
type JsxA11YLang = [] | [{
|
|
10872
|
-
[k: string]: unknown | undefined;
|
|
10873
10795
|
}]; // ----- jsx-a11y/media-has-caption -----
|
|
10874
10796
|
type JsxA11YMediaHasCaption = [] | [{
|
|
10875
10797
|
audio?: string[];
|
|
@@ -10881,12 +10803,6 @@ type JsxA11YMouseEventsHaveKeyEvents = [] | [{
|
|
|
10881
10803
|
hoverInHandlers?: string[];
|
|
10882
10804
|
hoverOutHandlers?: string[];
|
|
10883
10805
|
[k: string]: unknown | undefined;
|
|
10884
|
-
}]; // ----- jsx-a11y/no-access-key -----
|
|
10885
|
-
type JsxA11YNoAccessKey = [] | [{
|
|
10886
|
-
[k: string]: unknown | undefined;
|
|
10887
|
-
}]; // ----- jsx-a11y/no-aria-hidden-on-focusable -----
|
|
10888
|
-
type JsxA11YNoAriaHiddenOnFocusable = [] | [{
|
|
10889
|
-
[k: string]: unknown | undefined;
|
|
10890
10806
|
}]; // ----- jsx-a11y/no-autofocus -----
|
|
10891
10807
|
type JsxA11YNoAutofocus = [] | [{
|
|
10892
10808
|
ignoreNonDOM?: boolean;
|
|
@@ -10910,9 +10826,6 @@ type JsxA11YNoNoninteractiveTabindex = [] | [{
|
|
|
10910
10826
|
roles?: string[];
|
|
10911
10827
|
tags?: string[];
|
|
10912
10828
|
[k: string]: unknown | undefined;
|
|
10913
|
-
}]; // ----- jsx-a11y/no-onchange -----
|
|
10914
|
-
type JsxA11YNoOnchange = [] | [{
|
|
10915
|
-
[k: string]: unknown | undefined;
|
|
10916
10829
|
}]; // ----- jsx-a11y/no-redundant-roles -----
|
|
10917
10830
|
type JsxA11YNoRedundantRoles = [] | [{
|
|
10918
10831
|
[k: string]: string[] | undefined;
|
|
@@ -10920,21 +10833,6 @@ type JsxA11YNoRedundantRoles = [] | [{
|
|
|
10920
10833
|
type JsxA11YNoStaticElementInteractions = [] | [{
|
|
10921
10834
|
handlers?: string[];
|
|
10922
10835
|
[k: string]: unknown | undefined;
|
|
10923
|
-
}]; // ----- jsx-a11y/prefer-tag-over-role -----
|
|
10924
|
-
type JsxA11YPreferTagOverRole = [] | [{
|
|
10925
|
-
[k: string]: unknown | undefined;
|
|
10926
|
-
}]; // ----- jsx-a11y/role-has-required-aria-props -----
|
|
10927
|
-
type JsxA11YRoleHasRequiredAriaProps = [] | [{
|
|
10928
|
-
[k: string]: unknown | undefined;
|
|
10929
|
-
}]; // ----- jsx-a11y/role-supports-aria-props -----
|
|
10930
|
-
type JsxA11YRoleSupportsAriaProps = [] | [{
|
|
10931
|
-
[k: string]: unknown | undefined;
|
|
10932
|
-
}]; // ----- jsx-a11y/scope -----
|
|
10933
|
-
type JsxA11YScope = [] | [{
|
|
10934
|
-
[k: string]: unknown | undefined;
|
|
10935
|
-
}]; // ----- jsx-a11y/tabindex-no-positive -----
|
|
10936
|
-
type JsxA11YTabindexNoPositive = [] | [{
|
|
10937
|
-
[k: string]: unknown | undefined;
|
|
10938
10836
|
}]; // ----- jsx-quotes -----
|
|
10939
10837
|
type JsxQuotes = [] | [("prefer-single" | "prefer-double")]; // ----- key-spacing -----
|
|
10940
10838
|
type KeySpacing = [] | [({
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { GLOB_CJS, GLOB_IGNORES, GLOB_TESTS } from "./globs.mjs";
|
|
2
|
-
import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-
|
|
2
|
+
import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-B7hGqVJZ.mjs";
|
|
3
3
|
import gitignoreConfig from "eslint-config-flat-gitignore";
|
|
4
4
|
import globals from "globals";
|
|
5
5
|
import { recommended } from "@eslint-community/eslint-plugin-eslint-comments/configs";
|
|
6
6
|
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
|
7
7
|
import { configs, importX } from "eslint-plugin-import-x";
|
|
8
8
|
import nodePlugin from "eslint-plugin-n";
|
|
9
|
-
import arrowReturnStylePlugin from "eslint-plugin-arrow-return-style-x";
|
|
10
9
|
import deMorganPlugin, { configs as configs$1 } from "eslint-plugin-de-morgan";
|
|
11
10
|
import eslint from "@eslint/js";
|
|
12
11
|
import jsdocPlugin from "eslint-plugin-jsdoc";
|
|
@@ -102,14 +101,7 @@ const importsConfig = ({ isTypescriptEnabled = false } = {}) => {
|
|
|
102
101
|
//#region src/rules/javascript.ts
|
|
103
102
|
const additionalRules = {
|
|
104
103
|
"array-callback-return": ["error", { allowImplicit: true }],
|
|
105
|
-
"arrow-body-style": "
|
|
106
|
-
"arrow-style/arrow-return-style": ["error", {
|
|
107
|
-
jsxAlwaysUseExplicitReturn: true,
|
|
108
|
-
namedExportsAlwaysUseExplicitReturn: true,
|
|
109
|
-
objectReturnStyle: "off",
|
|
110
|
-
usePrettier: false
|
|
111
|
-
}],
|
|
112
|
-
"arrow-style/no-export-default-arrow": "error",
|
|
104
|
+
"arrow-body-style": ["error", "always"],
|
|
113
105
|
"class-methods-use-this": "error",
|
|
114
106
|
"consistent-return": "error",
|
|
115
107
|
"curly": ["error", "all"],
|
|
@@ -179,10 +171,7 @@ const javascriptConfig = () => {
|
|
|
179
171
|
return [{
|
|
180
172
|
linterOptions: { reportUnusedDisableDirectives: true },
|
|
181
173
|
name: "jimmy.codes/javascript",
|
|
182
|
-
plugins: {
|
|
183
|
-
"arrow-style": arrowReturnStylePlugin,
|
|
184
|
-
"de-morgan": deMorganPlugin
|
|
185
|
-
},
|
|
174
|
+
plugins: { "de-morgan": deMorganPlugin },
|
|
186
175
|
rules: javascriptRules
|
|
187
176
|
}, {
|
|
188
177
|
files: GLOB_TESTS,
|
|
@@ -460,7 +449,7 @@ const unicornRules = {
|
|
|
460
449
|
"unicorn/filename-case": "off",
|
|
461
450
|
"unicorn/import-style": "off",
|
|
462
451
|
"unicorn/no-abusive-eslint-disable": "off",
|
|
463
|
-
"unicorn/no-anonymous-default-export": "
|
|
452
|
+
"unicorn/no-anonymous-default-export": "error",
|
|
464
453
|
"unicorn/no-array-callback-reference": "off",
|
|
465
454
|
"unicorn/no-array-reduce": "off",
|
|
466
455
|
"unicorn/no-null": "off",
|
|
@@ -556,16 +545,16 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
|
|
|
556
545
|
stylisticConfig()
|
|
557
546
|
];
|
|
558
547
|
const featureConfigs = await Promise.all([
|
|
559
|
-
isTypescriptEnabled && unwrap(import("./typescript-
|
|
560
|
-
isReactEnabled && unwrap(import("./react-
|
|
561
|
-
isTanstackQueryEnabled && unwrap(import("./tanstack-query-
|
|
562
|
-
isAstroEnabled && unwrap(import("./astro-
|
|
563
|
-
isJestEnabled && unwrap(import("./jest-
|
|
564
|
-
isVitestEnabled && unwrap(import("./vitest-
|
|
565
|
-
isTestingLibraryEnabled && unwrap(import("./testing-library-
|
|
566
|
-
isPlaywrightEnabled && unwrap(import("./playwright-
|
|
567
|
-
isStorybookEnabled && unwrap(import("./storybook-
|
|
568
|
-
isNextjsEnabled && unwrap(import("./nextjs-
|
|
548
|
+
isTypescriptEnabled && unwrap(import("./typescript-IuDeWlMw.mjs"), typescript),
|
|
549
|
+
isReactEnabled && unwrap(import("./react-CEyLW1lt.mjs"), react),
|
|
550
|
+
isTanstackQueryEnabled && unwrap(import("./tanstack-query-TQFfKAwZ.mjs"), tanstackQuery),
|
|
551
|
+
isAstroEnabled && unwrap(import("./astro-Cx6fITty.mjs"), astro),
|
|
552
|
+
isJestEnabled && unwrap(import("./jest-Dgx6RBQH.mjs"), jest),
|
|
553
|
+
isVitestEnabled && unwrap(import("./vitest-CQTl1RfB.mjs"), vitest),
|
|
554
|
+
isTestingLibraryEnabled && unwrap(import("./testing-library-3qEUjAPR.mjs"), testingLibrary),
|
|
555
|
+
isPlaywrightEnabled && unwrap(import("./playwright-Bhw2bvHF.mjs"), playwright),
|
|
556
|
+
isStorybookEnabled && unwrap(import("./storybook-cMDF1zHD.mjs"), storybook),
|
|
557
|
+
isNextjsEnabled && unwrap(import("./nextjs-B0fXPHjQ.mjs"), nextjs)
|
|
569
558
|
]);
|
|
570
559
|
return [
|
|
571
560
|
...gitignore ? [gitignoreConfig({ strict: false })] : [],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GLOB_NEXTJS, GLOB_NEXTJS_ENV } from "./globs.mjs";
|
|
2
2
|
import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
|
|
3
|
-
import { t as upwarn } from "./upwarn-
|
|
3
|
+
import { t as upwarn } from "./upwarn-BFKZTYPG.mjs";
|
|
4
4
|
//#region src/rules/nextjs.ts
|
|
5
5
|
const nextjsRules = async (options) => {
|
|
6
6
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GLOB_PLAYWRIGHT } from "./globs.mjs";
|
|
2
2
|
import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
|
|
3
|
-
import { t as upwarn } from "./upwarn-
|
|
3
|
+
import { t as upwarn } from "./upwarn-BFKZTYPG.mjs";
|
|
4
4
|
//#region src/rules/playwright.ts
|
|
5
5
|
const playwrightRules = async (options) => {
|
|
6
6
|
return {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { GLOB_JSX, GLOB_TSX } from "./globs.mjs";
|
|
2
|
-
import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-
|
|
2
|
+
import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-B7hGqVJZ.mjs";
|
|
3
3
|
import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
|
|
4
|
-
import { t as
|
|
4
|
+
import { t as rebrand } from "./rebrand-DXAl5XCF.mjs";
|
|
5
|
+
import { t as upwarn } from "./upwarn-BFKZTYPG.mjs";
|
|
5
6
|
import globals from "globals";
|
|
6
7
|
//#region src/rules/react.ts
|
|
7
8
|
const nextAllowedExportNames = [
|
|
@@ -25,9 +26,9 @@ const nextAllowedExportNames = [
|
|
|
25
26
|
"contentType"
|
|
26
27
|
];
|
|
27
28
|
const reactRules = async (options) => {
|
|
28
|
-
const [{ configs: reactConfigs }, {
|
|
29
|
+
const [{ configs: reactConfigs }, { configs: jsxA11yConfigs }, { configs: reactDomConfigs }, { configs: reactHooksExtraConfigs }, { configs: reactWebApiConfigs }, { configs: reactNamingConventionConfigs }, { configs: reactRscConfigs }] = await Promise.all([
|
|
29
30
|
unwrapDefault(import("eslint-plugin-react-x")),
|
|
30
|
-
unwrapDefault(import("eslint-plugin-jsx-a11y")),
|
|
31
|
+
unwrapDefault(import("eslint-plugin-jsx-a11y-x")),
|
|
31
32
|
unwrapDefault(import("eslint-plugin-react-dom")),
|
|
32
33
|
unwrapDefault(import("eslint-plugin-react-hooks-extra")),
|
|
33
34
|
unwrapDefault(import("eslint-plugin-react-web-api")),
|
|
@@ -48,7 +49,7 @@ const reactRules = async (options) => {
|
|
|
48
49
|
"react-dom/no-unknown-property": ["error", { requireDataLowercase: true }]
|
|
49
50
|
};
|
|
50
51
|
return {
|
|
51
|
-
...jsxA11yConfigs.recommended.rules,
|
|
52
|
+
...rebrand(jsxA11yConfigs.recommended.rules, "jsx-a11y-x", "jsx-a11y"),
|
|
52
53
|
...upwarn(reactPluginRules),
|
|
53
54
|
...upwarn(reactDomPluginRules),
|
|
54
55
|
...upwarn(reactHooksExtraConfigs.recommended.rules),
|
|
@@ -95,7 +96,7 @@ async function reactConfig(options) {
|
|
|
95
96
|
const extractedOptions = extractOptions(options);
|
|
96
97
|
const [reactPlugin, jsxA11yPlugin, reactHooksPlugin, reactRefreshPlugin, reactCompilerPlugin, reactHooksExtraPlugin, reactDomPlugin, reactWebApiPlugin, reactNamingConventionPlugin, reactRscPlugin] = await Promise.all([
|
|
97
98
|
unwrapDefault(import("eslint-plugin-react-x")),
|
|
98
|
-
unwrapDefault(import("eslint-plugin-jsx-a11y")),
|
|
99
|
+
unwrapDefault(import("eslint-plugin-jsx-a11y-x")),
|
|
99
100
|
unwrapDefault(import("eslint-plugin-react-hooks")),
|
|
100
101
|
unwrapDefault(import("eslint-plugin-react-refresh")),
|
|
101
102
|
unwrapDefault(import("eslint-plugin-react-compiler")),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/utils/rebrand.ts
|
|
2
|
+
/**
|
|
3
|
+
* Renames the prefix of ESLint rule keys.
|
|
4
|
+
*
|
|
5
|
+
* @param rules - A partial set of ESLint rules.
|
|
6
|
+
*
|
|
7
|
+
* @param from - The current rule prefix to replace (without trailing slash).
|
|
8
|
+
*
|
|
9
|
+
* @param to - The new rule prefix (without trailing slash).
|
|
10
|
+
*
|
|
11
|
+
* @returns A new rules object with matching prefixes renamed.
|
|
12
|
+
*/
|
|
13
|
+
const rebrand = (rules = {}, from, to) => {
|
|
14
|
+
return Object.fromEntries(Object.entries(rules).map(([rule, option]) => {
|
|
15
|
+
return [rule.startsWith(`${from}/`) ? rule.replace(`${from}/`, `${to}/`) : rule, option];
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { rebrand as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
|
|
2
|
-
import { t as upwarn } from "./upwarn-
|
|
2
|
+
import { t as upwarn } from "./upwarn-BFKZTYPG.mjs";
|
|
3
3
|
//#region src/configs/storybook.ts
|
|
4
4
|
async function storybookConfig(options) {
|
|
5
5
|
const extractedOptions = extractOptions(options);
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
import { GLOB_E2E, GLOB_TESTS } from "./globs.mjs";
|
|
2
2
|
import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Renames the prefix of ESLint rule keys.
|
|
6
|
-
*
|
|
7
|
-
* @param rules - A partial set of ESLint rules.
|
|
8
|
-
*
|
|
9
|
-
* @param from - The current rule prefix to replace (without trailing slash).
|
|
10
|
-
*
|
|
11
|
-
* @param to - The new rule prefix (without trailing slash).
|
|
12
|
-
*
|
|
13
|
-
* @returns A new rules object with matching prefixes renamed.
|
|
14
|
-
*/
|
|
15
|
-
const rebrand = (rules = {}, from, to) => {
|
|
16
|
-
return Object.fromEntries(Object.entries(rules).map(([rule, option]) => {
|
|
17
|
-
return [rule.startsWith(`${from}/`) ? rule.replace(`${from}/`, `${to}/`) : rule, option];
|
|
18
|
-
}));
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
3
|
+
import { t as rebrand } from "./rebrand-DXAl5XCF.mjs";
|
|
21
4
|
//#region src/rules/testing-library.ts
|
|
22
5
|
const testingLibraryRules = async (options) => {
|
|
23
6
|
const [jestDom, testingLibrary] = await Promise.all([import("eslint-plugin-jest-dom-ya"), unwrapDefault(import("eslint-plugin-testing-library"))]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.9.0",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
53
53
|
"eslint-config-prettier": "^10.1.8",
|
|
54
54
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
55
|
-
"eslint-plugin-arrow-return-style-x": "^1.2.6",
|
|
56
55
|
"eslint-plugin-astro": "^1.7.0",
|
|
57
56
|
"eslint-plugin-de-morgan": "^2.1.1",
|
|
58
57
|
"eslint-plugin-erasable-syntax-only": "0.4.1",
|
|
@@ -60,7 +59,7 @@
|
|
|
60
59
|
"eslint-plugin-jest": "^29.15.2",
|
|
61
60
|
"eslint-plugin-jest-dom-ya": "^1.0.0",
|
|
62
61
|
"eslint-plugin-jsdoc": "^62.9.0",
|
|
63
|
-
"eslint-plugin-jsx-a11y": "
|
|
62
|
+
"eslint-plugin-jsx-a11y-x": "0.2.0",
|
|
64
63
|
"eslint-plugin-n": "^17.24.0",
|
|
65
64
|
"eslint-plugin-perfectionist": "^5.9.0",
|
|
66
65
|
"eslint-plugin-playwright": "^2.10.2",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|