Skip to content

Commit

Permalink
Add jsx-a11y plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparticuz committed Dec 12, 2024
1 parent 4d576dc commit afcebc2
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 2 deletions.
107 changes: 107 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-array-func": "^5.0.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-n": "^17.15.0",
"eslint-plugin-no-unsanitized": "^4.1.2",
"eslint-plugin-perfectionist": "^4.2.0",
Expand Down
8 changes: 8 additions & 0 deletions src/configs/jsx-a11y.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// @ts-expect-error There are no types
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
import tseslint, { type ConfigWithExtends } from "typescript-eslint";

export default tseslint.config(
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
jsxA11yPlugin.flatConfigs.recommended as ConfigWithExtends,
);
6 changes: 4 additions & 2 deletions src/eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import tseslint from "typescript-eslint";
import arrayFunctionConfig from "./configs/array-function.js";
import eslintCommentsConfig from "./configs/eslint-comments.js";
import eslintJSConfig from "./configs/eslint.js";
import importPlugin from "./configs/import.js";
import importConfig from "./configs/import.js";
import jsxA11yConfig from "./configs/jsx-a11y.js";
import nodeConfig from "./configs/n.js";
import noUnsanitizedConfig from "./configs/no-unsanitized.js";
import perfectionistConfig from "./configs/perfectionist.js";
Expand All @@ -20,7 +21,8 @@ export default tseslint.config(
...eslintJSConfig,
...tseslintConfig,
...nodeConfig,
...importPlugin,
...importConfig,
...jsxA11yConfig,
...eslintCommentsConfig,
...noUnsanitizedConfig,
...promiseConfig,
Expand Down

0 comments on commit afcebc2

Please sign in to comment.