-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gsa/issue 703 redos vulnerability (#718)
* Update USWDS library version from 3.9.0 to 3.10.0 * Update eslint library * Update eslint config and fixed errors * Adding eslint.config.mjs file as it is required with eslint version 9. * Update eslint.config.mjs file. Removed incorrect rules.
- Loading branch information
Showing
14 changed files
with
1,243 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import globals from "globals"; | ||
import astro from "eslint-plugin-astro"; | ||
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import vueParser from "vue-eslint-parser"; | ||
import astroParser from "astro-eslint-parser"; | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
import js from "@eslint/js"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}); | ||
|
||
export default [...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), { | ||
|
||
plugins: { | ||
"@typescript-eslint": typescriptEslint, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
Fragment: "readonly", | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
}, { | ||
files: ["**/*.js"], | ||
|
||
languageOptions: { | ||
globals: { | ||
global: "writeable", | ||
}, | ||
}, | ||
}, ...compat.extends( | ||
"eslint:recommended", | ||
"plugin:astro/recommended", | ||
"plugin:astro/jsx-a11y-strict", | ||
).map(config => ({ | ||
...config, | ||
files: ["**/*.astro"], | ||
})), { | ||
files: ["**/*.astro"], | ||
|
||
languageOptions: { | ||
parser: astroParser, | ||
ecmaVersion: 5, | ||
sourceType: "script", | ||
|
||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
extraFileExtensions: [".astro"], | ||
}, | ||
}, | ||
|
||
rules: { | ||
"astro/jsx-a11y/anchor-is-valid": "off", | ||
}, | ||
}, ...compat.extends("plugin:vue/vue3-recommended", "plugin:vuejs-accessibility/recommended").map(config => ({ | ||
...config, | ||
files: ["**/*.vue"], | ||
})), { | ||
files: ["**/*.vue"], | ||
|
||
languageOptions: { | ||
parser: vueParser, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
|
||
rules: { | ||
"vuejs-accessibility/label-has-for": ["error", { | ||
required: { | ||
some: ["id"], | ||
}, | ||
}], | ||
}, | ||
}]; |
Oops, something went wrong.