mirror of
https://github.com/cloudflare/cloudflare-docs.git
synced 2026-01-11 20:06:58 +00:00
* [Docs Site] Adopt eslint * Demonstrate a fixable suggestion, add VSCode plugin and package.json script * Fix slice in ModelCatalog * Remove test error in AnchorHeading * recreate package-lock.json * update new .jsx components to .tsx * amend deps, fix react types, organise ec plugins * another attempt at fixing platform-specific deps * fix FieldCatalog filters, remove test block from code.mdx * use opacity instead of brightness for ruleid * fix lockfile * amend ruleid opacity styling * test onetrust * enable prefer const rule, remove onetrust test * add save-dev
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
import pluginJavaScript from "@eslint/js";
|
|
import pluginTypeScript from "typescript-eslint";
|
|
import pluginReact from "eslint-plugin-react";
|
|
import pluginAstro from "eslint-plugin-astro";
|
|
import pluginReactA11y from "eslint-plugin-jsx-a11y";
|
|
|
|
import globals from "globals";
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default [
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node,
|
|
},
|
|
},
|
|
},
|
|
pluginJavaScript.configs.recommended,
|
|
...pluginTypeScript.configs.recommended,
|
|
...pluginAstro.configs.recommended,
|
|
...pluginAstro.configs["jsx-a11y-recommended"],
|
|
{
|
|
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
|
...pluginReact.configs.flat.recommended,
|
|
...pluginReactA11y.flatConfigs.recommended,
|
|
...pluginReact.configs.flat["jsx-runtime"],
|
|
},
|
|
{
|
|
ignores: [".astro/", ".wrangler/", "dist/", ".github/"],
|
|
},
|
|
{
|
|
rules: {
|
|
"no-var": "error",
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/triple-slash-reference": "off",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{ ignoreRestSiblings: true },
|
|
],
|
|
},
|
|
},
|
|
];
|