@jimmy.codes/eslint-config 7.8.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 -1
- package/dist/{astro-BMlbg_8j.mjs → astro-Cx6fITty.mjs} +3 -2
- package/dist/index.d.mts +56 -137
- package/dist/index.mjs +10 -10
- 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-qDMgdbVJ.mjs → react-CEyLW1lt.mjs} +6 -5
- 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 -2
- /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
|
@@ -277,7 +277,7 @@ This config includes the following plugins:
|
|
|
277
277
|
| [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest) | Jest support |
|
|
278
278
|
| [`eslint-plugin-jest-dom`](https://github.com/testing-library/eslint-plugin-jest-dom) | DOM assertions for tests |
|
|
279
279
|
| [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc) | JSDoc comment rules |
|
|
280
|
-
| [`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 |
|
|
281
281
|
| [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n) | Node.js-specific rules |
|
|
282
282
|
| [`eslint-plugin-perfectionist`](https://perfectionist.dev) | Sorting and consistency |
|
|
283
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",
|
package/dist/index.d.mts
CHANGED
|
@@ -2967,204 +2967,186 @@ interface RuleOptions {
|
|
|
2967
2967
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header
|
|
2968
2968
|
*/
|
|
2969
2969
|
'jsdoc/valid-types'?: Linter.RuleEntry<JsdocValidTypes>;
|
|
2970
|
-
/**
|
|
2971
|
-
* Enforce emojis are wrapped in `<span>` and provide screen reader access.
|
|
2972
|
-
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md
|
|
2973
|
-
* @deprecated
|
|
2974
|
-
*/
|
|
2975
|
-
'jsx-a11y/accessible-emoji'?: Linter.RuleEntry<JsxA11YAccessibleEmoji>;
|
|
2976
2970
|
/**
|
|
2977
2971
|
* Enforce all elements that require alternative text have meaningful information to relay back to end user.
|
|
2978
|
-
* @see https://github.com/
|
|
2972
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/alt-text.md
|
|
2979
2973
|
*/
|
|
2980
2974
|
'jsx-a11y/alt-text'?: Linter.RuleEntry<JsxA11YAltText>;
|
|
2981
2975
|
/**
|
|
2982
2976
|
* Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link".
|
|
2983
|
-
* @see https://github.com/
|
|
2977
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/anchor-ambiguous-text.md
|
|
2984
2978
|
*/
|
|
2985
2979
|
'jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry<JsxA11YAnchorAmbiguousText>;
|
|
2986
2980
|
/**
|
|
2987
2981
|
* Enforce all anchors to contain accessible content.
|
|
2988
|
-
* @see https://github.com/
|
|
2982
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/anchor-has-content.md
|
|
2989
2983
|
*/
|
|
2990
2984
|
'jsx-a11y/anchor-has-content'?: Linter.RuleEntry<JsxA11YAnchorHasContent>;
|
|
2991
2985
|
/**
|
|
2992
2986
|
* Enforce all anchors are valid, navigable elements.
|
|
2993
|
-
* @see https://github.com/
|
|
2987
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/anchor-is-valid.md
|
|
2994
2988
|
*/
|
|
2995
2989
|
'jsx-a11y/anchor-is-valid'?: Linter.RuleEntry<JsxA11YAnchorIsValid>;
|
|
2996
2990
|
/**
|
|
2997
2991
|
* Enforce elements with aria-activedescendant are tabbable.
|
|
2998
|
-
* @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
|
|
2999
2993
|
*/
|
|
3000
|
-
'jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<
|
|
2994
|
+
'jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<[]>;
|
|
3001
2995
|
/**
|
|
3002
2996
|
* Enforce all `aria-*` props are valid.
|
|
3003
|
-
* @see https://github.com/
|
|
2997
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/aria-props.md
|
|
3004
2998
|
*/
|
|
3005
|
-
'jsx-a11y/aria-props'?: Linter.RuleEntry<
|
|
2999
|
+
'jsx-a11y/aria-props'?: Linter.RuleEntry<[]>;
|
|
3006
3000
|
/**
|
|
3007
3001
|
* Enforce ARIA state and property values are valid.
|
|
3008
|
-
* @see https://github.com/
|
|
3002
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/aria-proptypes.md
|
|
3009
3003
|
*/
|
|
3010
|
-
'jsx-a11y/aria-proptypes'?: Linter.RuleEntry<
|
|
3004
|
+
'jsx-a11y/aria-proptypes'?: Linter.RuleEntry<[]>;
|
|
3011
3005
|
/**
|
|
3012
3006
|
* Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
|
|
3013
|
-
* @see https://github.com/
|
|
3007
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/aria-role.md
|
|
3014
3008
|
*/
|
|
3015
3009
|
'jsx-a11y/aria-role'?: Linter.RuleEntry<JsxA11YAriaRole>;
|
|
3016
3010
|
/**
|
|
3017
3011
|
* Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
|
|
3018
|
-
* @see https://github.com/
|
|
3012
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/aria-unsupported-elements.md
|
|
3019
3013
|
*/
|
|
3020
|
-
'jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<
|
|
3014
|
+
'jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<[]>;
|
|
3021
3015
|
/**
|
|
3022
3016
|
* Enforce that autocomplete attributes are used correctly.
|
|
3023
|
-
* @see https://github.com/
|
|
3017
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/autocomplete-valid.md
|
|
3024
3018
|
*/
|
|
3025
3019
|
'jsx-a11y/autocomplete-valid'?: Linter.RuleEntry<JsxA11YAutocompleteValid>;
|
|
3026
3020
|
/**
|
|
3027
3021
|
* Enforce a clickable non-interactive element has at least one keyboard event listener.
|
|
3028
|
-
* @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
|
|
3029
3023
|
*/
|
|
3030
|
-
'jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<
|
|
3024
|
+
'jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<[]>;
|
|
3031
3025
|
/**
|
|
3032
3026
|
* Enforce that a control (an interactive element) has a text label.
|
|
3033
|
-
* @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
|
|
3034
3028
|
*/
|
|
3035
3029
|
'jsx-a11y/control-has-associated-label'?: Linter.RuleEntry<JsxA11YControlHasAssociatedLabel>;
|
|
3036
3030
|
/**
|
|
3037
3031
|
* Enforce heading (`h1`, `h2`, etc) elements contain accessible content.
|
|
3038
|
-
* @see https://github.com/
|
|
3032
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/heading-has-content.md
|
|
3039
3033
|
*/
|
|
3040
3034
|
'jsx-a11y/heading-has-content'?: Linter.RuleEntry<JsxA11YHeadingHasContent>;
|
|
3041
3035
|
/**
|
|
3042
3036
|
* Enforce `<html>` element has `lang` prop.
|
|
3043
|
-
* @see https://github.com/
|
|
3037
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/html-has-lang.md
|
|
3044
3038
|
*/
|
|
3045
|
-
'jsx-a11y/html-has-lang'?: Linter.RuleEntry<
|
|
3039
|
+
'jsx-a11y/html-has-lang'?: Linter.RuleEntry<[]>;
|
|
3046
3040
|
/**
|
|
3047
3041
|
* Enforce iframe elements have a title attribute.
|
|
3048
|
-
* @see https://github.com/
|
|
3042
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/iframe-has-title.md
|
|
3049
3043
|
*/
|
|
3050
|
-
'jsx-a11y/iframe-has-title'?: Linter.RuleEntry<
|
|
3044
|
+
'jsx-a11y/iframe-has-title'?: Linter.RuleEntry<[]>;
|
|
3051
3045
|
/**
|
|
3052
3046
|
* Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo".
|
|
3053
|
-
* @see https://github.com/
|
|
3047
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/img-redundant-alt.md
|
|
3054
3048
|
*/
|
|
3055
3049
|
'jsx-a11y/img-redundant-alt'?: Linter.RuleEntry<JsxA11YImgRedundantAlt>;
|
|
3056
3050
|
/**
|
|
3057
3051
|
* Enforce that elements with interactive handlers like `onClick` must be focusable.
|
|
3058
|
-
* @see https://github.com/
|
|
3052
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/interactive-supports-focus.md
|
|
3059
3053
|
*/
|
|
3060
3054
|
'jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry<JsxA11YInteractiveSupportsFocus>;
|
|
3061
3055
|
/**
|
|
3062
3056
|
* Enforce that a `label` tag has a text label and an associated control.
|
|
3063
|
-
* @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
|
|
3064
3058
|
*/
|
|
3065
3059
|
'jsx-a11y/label-has-associated-control'?: Linter.RuleEntry<JsxA11YLabelHasAssociatedControl>;
|
|
3066
|
-
/**
|
|
3067
|
-
* Enforce that `<label>` elements have the `htmlFor` prop.
|
|
3068
|
-
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md
|
|
3069
|
-
* @deprecated
|
|
3070
|
-
*/
|
|
3071
|
-
'jsx-a11y/label-has-for'?: Linter.RuleEntry<JsxA11YLabelHasFor>;
|
|
3072
3060
|
/**
|
|
3073
3061
|
* Enforce lang attribute has a valid value.
|
|
3074
|
-
* @see https://github.com/
|
|
3062
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/lang.md
|
|
3075
3063
|
*/
|
|
3076
|
-
'jsx-a11y/lang'?: Linter.RuleEntry<
|
|
3064
|
+
'jsx-a11y/lang'?: Linter.RuleEntry<[]>;
|
|
3077
3065
|
/**
|
|
3078
3066
|
* Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.
|
|
3079
|
-
* @see https://github.com/
|
|
3067
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/media-has-caption.md
|
|
3080
3068
|
*/
|
|
3081
3069
|
'jsx-a11y/media-has-caption'?: Linter.RuleEntry<JsxA11YMediaHasCaption>;
|
|
3082
3070
|
/**
|
|
3083
3071
|
* Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users.
|
|
3084
|
-
* @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
|
|
3085
3073
|
*/
|
|
3086
3074
|
'jsx-a11y/mouse-events-have-key-events'?: Linter.RuleEntry<JsxA11YMouseEventsHaveKeyEvents>;
|
|
3087
3075
|
/**
|
|
3088
3076
|
* Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader.
|
|
3089
|
-
* @see https://github.com/
|
|
3077
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-access-key.md
|
|
3090
3078
|
*/
|
|
3091
|
-
'jsx-a11y/no-access-key'?: Linter.RuleEntry<
|
|
3079
|
+
'jsx-a11y/no-access-key'?: Linter.RuleEntry<[]>;
|
|
3092
3080
|
/**
|
|
3093
3081
|
* Disallow `aria-hidden="true"` from being set on focusable elements.
|
|
3094
|
-
* @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
|
|
3095
3083
|
*/
|
|
3096
|
-
'jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<
|
|
3084
|
+
'jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<[]>;
|
|
3097
3085
|
/**
|
|
3098
|
-
* Enforce autoFocus prop is not
|
|
3099
|
-
* @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
|
|
3100
3088
|
*/
|
|
3101
3089
|
'jsx-a11y/no-autofocus'?: Linter.RuleEntry<JsxA11YNoAutofocus>;
|
|
3102
3090
|
/**
|
|
3103
3091
|
* Enforce distracting elements are not used.
|
|
3104
|
-
* @see https://github.com/
|
|
3092
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-distracting-elements.md
|
|
3105
3093
|
*/
|
|
3106
3094
|
'jsx-a11y/no-distracting-elements'?: Linter.RuleEntry<JsxA11YNoDistractingElements>;
|
|
3107
3095
|
/**
|
|
3108
|
-
*
|
|
3109
|
-
* @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
|
|
3110
3098
|
*/
|
|
3111
3099
|
'jsx-a11y/no-interactive-element-to-noninteractive-role'?: Linter.RuleEntry<JsxA11YNoInteractiveElementToNoninteractiveRole>;
|
|
3112
3100
|
/**
|
|
3113
|
-
*
|
|
3114
|
-
* @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
|
|
3115
3103
|
*/
|
|
3116
3104
|
'jsx-a11y/no-noninteractive-element-interactions'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementInteractions>;
|
|
3117
3105
|
/**
|
|
3118
|
-
*
|
|
3119
|
-
* @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
|
|
3120
3108
|
*/
|
|
3121
3109
|
'jsx-a11y/no-noninteractive-element-to-interactive-role'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementToInteractiveRole>;
|
|
3122
3110
|
/**
|
|
3123
|
-
* `tabIndex`
|
|
3124
|
-
* @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
|
|
3125
3113
|
*/
|
|
3126
3114
|
'jsx-a11y/no-noninteractive-tabindex'?: Linter.RuleEntry<JsxA11YNoNoninteractiveTabindex>;
|
|
3127
|
-
/**
|
|
3128
|
-
* Enforce usage of `onBlur` over `onChange` on select menus for accessibility.
|
|
3129
|
-
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md
|
|
3130
|
-
* @deprecated
|
|
3131
|
-
*/
|
|
3132
|
-
'jsx-a11y/no-onchange'?: Linter.RuleEntry<JsxA11YNoOnchange>;
|
|
3133
3115
|
/**
|
|
3134
3116
|
* Enforce explicit role property is not the same as implicit/default role property on element.
|
|
3135
|
-
* @see https://github.com/
|
|
3117
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/no-redundant-roles.md
|
|
3136
3118
|
*/
|
|
3137
3119
|
'jsx-a11y/no-redundant-roles'?: Linter.RuleEntry<JsxA11YNoRedundantRoles>;
|
|
3138
3120
|
/**
|
|
3139
3121
|
* Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute.
|
|
3140
|
-
* @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
|
|
3141
3123
|
*/
|
|
3142
3124
|
'jsx-a11y/no-static-element-interactions'?: Linter.RuleEntry<JsxA11YNoStaticElementInteractions>;
|
|
3143
3125
|
/**
|
|
3144
3126
|
* Enforces using semantic DOM elements over the ARIA `role` property.
|
|
3145
|
-
* @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
|
|
3146
3128
|
*/
|
|
3147
|
-
'jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<
|
|
3129
|
+
'jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<[]>;
|
|
3148
3130
|
/**
|
|
3149
3131
|
* Enforce that elements with ARIA roles must have all required attributes for that role.
|
|
3150
|
-
* @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
|
|
3151
3133
|
*/
|
|
3152
|
-
'jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<
|
|
3134
|
+
'jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<[]>;
|
|
3153
3135
|
/**
|
|
3154
3136
|
* Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.
|
|
3155
|
-
* @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
|
|
3156
3138
|
*/
|
|
3157
|
-
'jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<
|
|
3139
|
+
'jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<[]>;
|
|
3158
3140
|
/**
|
|
3159
3141
|
* Enforce `scope` prop is only used on `<th>` elements.
|
|
3160
|
-
* @see https://github.com/
|
|
3142
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/scope.md
|
|
3161
3143
|
*/
|
|
3162
|
-
'jsx-a11y/scope'?: Linter.RuleEntry<
|
|
3144
|
+
'jsx-a11y/scope'?: Linter.RuleEntry<[]>;
|
|
3163
3145
|
/**
|
|
3164
3146
|
* Enforce `tabIndex` value is not greater than zero.
|
|
3165
|
-
* @see https://github.com/
|
|
3147
|
+
* @see https://github.com/es-tooling/eslint-plugin-jsx-a11y-x/tree/HEAD/docs/rules/tabindex-no-positive.md
|
|
3166
3148
|
*/
|
|
3167
|
-
'jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<
|
|
3149
|
+
'jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<[]>;
|
|
3168
3150
|
/**
|
|
3169
3151
|
* Enforce the consistent use of either double or single quotes in JSX attributes
|
|
3170
3152
|
* @see https://eslint.org/docs/latest/rules/jsx-quotes
|
|
@@ -10750,9 +10732,6 @@ type JsdocTypeFormatting = [] | [{
|
|
|
10750
10732
|
}]; // ----- jsdoc/valid-types -----
|
|
10751
10733
|
type JsdocValidTypes = [] | [{
|
|
10752
10734
|
allowEmptyNamepaths?: boolean;
|
|
10753
|
-
}]; // ----- jsx-a11y/accessible-emoji -----
|
|
10754
|
-
type JsxA11YAccessibleEmoji = [] | [{
|
|
10755
|
-
[k: string]: unknown | undefined;
|
|
10756
10735
|
}]; // ----- jsx-a11y/alt-text -----
|
|
10757
10736
|
type JsxA11YAltText = [] | [{
|
|
10758
10737
|
elements?: string[];
|
|
@@ -10775,30 +10754,15 @@ type JsxA11YAnchorIsValid = [] | [{
|
|
|
10775
10754
|
specialLink?: string[];
|
|
10776
10755
|
aspects?: [("noHref" | "invalidHref" | "preferButton"), ...(("noHref" | "invalidHref" | "preferButton"))[]];
|
|
10777
10756
|
[k: string]: unknown | undefined;
|
|
10778
|
-
}]; // ----- jsx-a11y/aria-activedescendant-has-tabindex -----
|
|
10779
|
-
type JsxA11YAriaActivedescendantHasTabindex = [] | [{
|
|
10780
|
-
[k: string]: unknown | undefined;
|
|
10781
|
-
}]; // ----- jsx-a11y/aria-props -----
|
|
10782
|
-
type JsxA11YAriaProps = [] | [{
|
|
10783
|
-
[k: string]: unknown | undefined;
|
|
10784
|
-
}]; // ----- jsx-a11y/aria-proptypes -----
|
|
10785
|
-
type JsxA11YAriaProptypes = [] | [{
|
|
10786
|
-
[k: string]: unknown | undefined;
|
|
10787
10757
|
}]; // ----- jsx-a11y/aria-role -----
|
|
10788
10758
|
type JsxA11YAriaRole = [] | [{
|
|
10789
10759
|
allowedInvalidRoles?: string[];
|
|
10790
10760
|
ignoreNonDOM?: boolean;
|
|
10791
10761
|
[k: string]: unknown | undefined;
|
|
10792
|
-
}]; // ----- jsx-a11y/aria-unsupported-elements -----
|
|
10793
|
-
type JsxA11YAriaUnsupportedElements = [] | [{
|
|
10794
|
-
[k: string]: unknown | undefined;
|
|
10795
10762
|
}]; // ----- jsx-a11y/autocomplete-valid -----
|
|
10796
10763
|
type JsxA11YAutocompleteValid = [] | [{
|
|
10797
10764
|
inputComponents?: string[];
|
|
10798
10765
|
[k: string]: unknown | undefined;
|
|
10799
|
-
}]; // ----- jsx-a11y/click-events-have-key-events -----
|
|
10800
|
-
type JsxA11YClickEventsHaveKeyEvents = [] | [{
|
|
10801
|
-
[k: string]: unknown | undefined;
|
|
10802
10766
|
}]; // ----- jsx-a11y/control-has-associated-label -----
|
|
10803
10767
|
type JsxA11YControlHasAssociatedLabel = [] | [{
|
|
10804
10768
|
labelAttributes?: string[];
|
|
@@ -10811,12 +10775,6 @@ type JsxA11YControlHasAssociatedLabel = [] | [{
|
|
|
10811
10775
|
type JsxA11YHeadingHasContent = [] | [{
|
|
10812
10776
|
components?: string[];
|
|
10813
10777
|
[k: string]: unknown | undefined;
|
|
10814
|
-
}]; // ----- jsx-a11y/html-has-lang -----
|
|
10815
|
-
type JsxA11YHtmlHasLang = [] | [{
|
|
10816
|
-
[k: string]: unknown | undefined;
|
|
10817
|
-
}]; // ----- jsx-a11y/iframe-has-title -----
|
|
10818
|
-
type JsxA11YIframeHasTitle = [] | [{
|
|
10819
|
-
[k: string]: unknown | undefined;
|
|
10820
10778
|
}]; // ----- jsx-a11y/img-redundant-alt -----
|
|
10821
10779
|
type JsxA11YImgRedundantAlt = [] | [{
|
|
10822
10780
|
components?: string[];
|
|
@@ -10834,21 +10792,6 @@ type JsxA11YLabelHasAssociatedControl = [] | [{
|
|
|
10834
10792
|
assert?: ("htmlFor" | "nesting" | "both" | "either");
|
|
10835
10793
|
depth?: number;
|
|
10836
10794
|
[k: string]: unknown | undefined;
|
|
10837
|
-
}]; // ----- jsx-a11y/label-has-for -----
|
|
10838
|
-
type JsxA11YLabelHasFor = [] | [{
|
|
10839
|
-
components?: string[];
|
|
10840
|
-
required?: (("nesting" | "id") | {
|
|
10841
|
-
some: ("nesting" | "id")[];
|
|
10842
|
-
[k: string]: unknown | undefined;
|
|
10843
|
-
} | {
|
|
10844
|
-
every: ("nesting" | "id")[];
|
|
10845
|
-
[k: string]: unknown | undefined;
|
|
10846
|
-
});
|
|
10847
|
-
allowChildren?: boolean;
|
|
10848
|
-
[k: string]: unknown | undefined;
|
|
10849
|
-
}]; // ----- jsx-a11y/lang -----
|
|
10850
|
-
type JsxA11YLang = [] | [{
|
|
10851
|
-
[k: string]: unknown | undefined;
|
|
10852
10795
|
}]; // ----- jsx-a11y/media-has-caption -----
|
|
10853
10796
|
type JsxA11YMediaHasCaption = [] | [{
|
|
10854
10797
|
audio?: string[];
|
|
@@ -10860,12 +10803,6 @@ type JsxA11YMouseEventsHaveKeyEvents = [] | [{
|
|
|
10860
10803
|
hoverInHandlers?: string[];
|
|
10861
10804
|
hoverOutHandlers?: string[];
|
|
10862
10805
|
[k: string]: unknown | undefined;
|
|
10863
|
-
}]; // ----- jsx-a11y/no-access-key -----
|
|
10864
|
-
type JsxA11YNoAccessKey = [] | [{
|
|
10865
|
-
[k: string]: unknown | undefined;
|
|
10866
|
-
}]; // ----- jsx-a11y/no-aria-hidden-on-focusable -----
|
|
10867
|
-
type JsxA11YNoAriaHiddenOnFocusable = [] | [{
|
|
10868
|
-
[k: string]: unknown | undefined;
|
|
10869
10806
|
}]; // ----- jsx-a11y/no-autofocus -----
|
|
10870
10807
|
type JsxA11YNoAutofocus = [] | [{
|
|
10871
10808
|
ignoreNonDOM?: boolean;
|
|
@@ -10889,9 +10826,6 @@ type JsxA11YNoNoninteractiveTabindex = [] | [{
|
|
|
10889
10826
|
roles?: string[];
|
|
10890
10827
|
tags?: string[];
|
|
10891
10828
|
[k: string]: unknown | undefined;
|
|
10892
|
-
}]; // ----- jsx-a11y/no-onchange -----
|
|
10893
|
-
type JsxA11YNoOnchange = [] | [{
|
|
10894
|
-
[k: string]: unknown | undefined;
|
|
10895
10829
|
}]; // ----- jsx-a11y/no-redundant-roles -----
|
|
10896
10830
|
type JsxA11YNoRedundantRoles = [] | [{
|
|
10897
10831
|
[k: string]: string[] | undefined;
|
|
@@ -10899,21 +10833,6 @@ type JsxA11YNoRedundantRoles = [] | [{
|
|
|
10899
10833
|
type JsxA11YNoStaticElementInteractions = [] | [{
|
|
10900
10834
|
handlers?: string[];
|
|
10901
10835
|
[k: string]: unknown | undefined;
|
|
10902
|
-
}]; // ----- jsx-a11y/prefer-tag-over-role -----
|
|
10903
|
-
type JsxA11YPreferTagOverRole = [] | [{
|
|
10904
|
-
[k: string]: unknown | undefined;
|
|
10905
|
-
}]; // ----- jsx-a11y/role-has-required-aria-props -----
|
|
10906
|
-
type JsxA11YRoleHasRequiredAriaProps = [] | [{
|
|
10907
|
-
[k: string]: unknown | undefined;
|
|
10908
|
-
}]; // ----- jsx-a11y/role-supports-aria-props -----
|
|
10909
|
-
type JsxA11YRoleSupportsAriaProps = [] | [{
|
|
10910
|
-
[k: string]: unknown | undefined;
|
|
10911
|
-
}]; // ----- jsx-a11y/scope -----
|
|
10912
|
-
type JsxA11YScope = [] | [{
|
|
10913
|
-
[k: string]: unknown | undefined;
|
|
10914
|
-
}]; // ----- jsx-a11y/tabindex-no-positive -----
|
|
10915
|
-
type JsxA11YTabindexNoPositive = [] | [{
|
|
10916
|
-
[k: string]: unknown | undefined;
|
|
10917
10836
|
}]; // ----- jsx-quotes -----
|
|
10918
10837
|
type JsxQuotes = [] | [("prefer-single" | "prefer-double")]; // ----- key-spacing -----
|
|
10919
10838
|
type KeySpacing = [] | [({
|
package/dist/index.mjs
CHANGED
|
@@ -545,16 +545,16 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
|
|
|
545
545
|
stylisticConfig()
|
|
546
546
|
];
|
|
547
547
|
const featureConfigs = await Promise.all([
|
|
548
|
-
isTypescriptEnabled && unwrap(import("./typescript-
|
|
549
|
-
isReactEnabled && unwrap(import("./react-
|
|
550
|
-
isTanstackQueryEnabled && unwrap(import("./tanstack-query-
|
|
551
|
-
isAstroEnabled && unwrap(import("./astro-
|
|
552
|
-
isJestEnabled && unwrap(import("./jest-
|
|
553
|
-
isVitestEnabled && unwrap(import("./vitest-
|
|
554
|
-
isTestingLibraryEnabled && unwrap(import("./testing-library-
|
|
555
|
-
isPlaywrightEnabled && unwrap(import("./playwright-
|
|
556
|
-
isStorybookEnabled && unwrap(import("./storybook-
|
|
557
|
-
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)
|
|
558
558
|
]);
|
|
559
559
|
return [
|
|
560
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
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",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"eslint-plugin-jest": "^29.15.2",
|
|
60
60
|
"eslint-plugin-jest-dom-ya": "^1.0.0",
|
|
61
61
|
"eslint-plugin-jsdoc": "^62.9.0",
|
|
62
|
-
"eslint-plugin-jsx-a11y": "
|
|
62
|
+
"eslint-plugin-jsx-a11y-x": "0.2.0",
|
|
63
63
|
"eslint-plugin-n": "^17.24.0",
|
|
64
64
|
"eslint-plugin-perfectionist": "^5.9.0",
|
|
65
65
|
"eslint-plugin-playwright": "^2.10.2",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|