generated from cyrus01337/astro-app-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
66 lines (61 loc) · 2.02 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import globals from "globals";
import javascript from "@eslint/js";
import prettier from "eslint-config-prettier";
import astro from "eslint-plugin-astro";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import typescript from "typescript-eslint";
export default typescript.config(
javascript.configs.recommended,
prettier,
...typescript.configs.recommended,
...typescript.configs.stylistic,
...astro.configs.recommended,
{
...react.configs.flat.recommended,
...react.configs.flat["jsx-runtime"],
files: ["**/*.{jsx,tsx}"],
languageOptions: {
...react.configs.flat.recommended.languageOptions,
...react.configs.flat["jsx-runtime"].languageOptions,
globals: {
...globals.browser,
...globals.serviceworker,
},
},
rules: {
...react.configs.flat.recommended.rules,
...react.configs.flat["jsx-runtime"].rules,
"react/display-name": "off",
"react/no-unknown-property": "error",
},
settings: {
react: {
version: "detect",
},
},
},
{
plugins: {
"react-hooks": reactHooks,
},
rules: reactHooks.configs.recommended.rules,
},
{
ignores: [".astro/", ".husky/", "dist/", "external/", "node_modules/"],
},
{
rules: {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/triple-slash-reference": "off",
"import/no-anonymous-default-export": "off",
"no-console": "warn",
"no-control-regex": "off",
},
},
);