-
Notifications
You must be signed in to change notification settings - Fork 5.6k
/
Copy patheslint.config.js
42 lines (40 loc) · 1.06 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 },
],
},
},
];