Skip to content

Commit bf06542

Browse files
Update dependencies and eslint rules
1 parent a01ec50 commit bf06542

File tree

3 files changed

+1301
-1367
lines changed

3 files changed

+1301
-1367
lines changed

eslint.config.mjs

+12-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default [
4545
{
4646
linterOptions: {
4747
reportUnusedDisableDirectives: "warn",
48+
reportUnusedInlineConfigs: "warn",
4849
},
4950
languageOptions: {
5051
parser: typescriptEsLintParser,
@@ -286,6 +287,7 @@ export default [
286287
"error",
287288
{
288289
extensions: [".jsx", ".tsx"],
290+
allow: "as-needed",
289291
},
290292
],
291293
// Import - https://github.com/import-js/eslint-plugin-import
@@ -454,6 +456,7 @@ export default [
454456
"@typescript-eslint/no-meaningless-void-operator": "warn",
455457
"@typescript-eslint/no-misused-new": "error",
456458
"@typescript-eslint/no-misused-promises": "error",
459+
"@typescript-eslint/no-misused-spread": "error",
457460
"@typescript-eslint/no-namespace": "warn",
458461
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
459462
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
@@ -592,6 +595,15 @@ export default [
592595
"@typescript-eslint/require-await": "error",
593596
},
594597
},
598+
{
599+
files: ["**/*.jsx", "**/*.tsx"],
600+
ignores: ["**/*.test.jsx", "**/*.test.tsx"],
601+
plugins: { "jsx-a11y": jsxA11yPlugin },
602+
rules: {
603+
// JSX A11y - This plugin is being extended because there's an extensive amount of custom options automatically configured. - https://github.com/jsx-eslint/eslint-plugin-jsx-a11y
604+
...jsxA11yPlugin.flatConfigs.recommended.rules,
605+
},
606+
},
595607
{
596608
settings: {
597609
react: {
@@ -604,8 +616,6 @@ export default [
604616
"jsx-a11y": jsxA11yPlugin,
605617
},
606618
rules: {
607-
// JSX A11y - This plugin is being extended because there's an extensive amount of custom options automatically configured. - https://github.com/jsx-eslint/eslint-plugin-jsx-a11y
608-
...jsxA11yPlugin.flatConfigs.recommended.rules,
609619
// React - https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules
610620
"react/checked-requires-onchange-or-readonly": "error",
611621
"react/function-component-definition": [

0 commit comments

Comments
 (0)