-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
47 lines (46 loc) · 1.56 KB
/
eslint.config.mjs
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
43
44
45
46
47
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import pluginReactHooks from "eslint-plugin-react-hooks";
import pluginReactRefresh from "eslint-plugin-react-refresh";
import pluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import pluginAstro from "eslint-plugin-astro";
export default tseslint.config(
{
ignores: ["**/dist", "**/*.gen.ts", "apps/mockup/", "apps/backend/db/migrations"],
},
{
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
languageOptions: { ecmaVersion: 2020, parserOptions: { ecmaFeatures: { jsx: true } }, globals: { ...globals.browser, ...globals.node } },
settings: { react: { version: "19.0" } },
plugins: {
react: pluginReact,
"react-hooks": pluginReactHooks,
"react-refresh": pluginReactRefresh,
},
rules: {
"react/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn", // or "error"
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginAstro.configs.recommended,
pluginPrettierRecommended,
{
// Define the configuration for `<script>` tag.
// Script in `<script>` is assigned a virtual file name with the `.js` extension.
files: ["**/*.astro/*.js", "*.astro/*.js", "**/*.astro/*.ts", "*.astro/*.ts"],
rules: {
"prettier/prettier": "off",
},
}
);