-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
56 lines (54 loc) · 1.35 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
import { FlatCompat } from "@eslint/eslintrc";
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
const compat = new FlatCompat();
/** @type {import('eslint').Linter.Config[]} */
export default [
{
languageOptions: {
globals: { ...globals.browser, ...globals.node },
},
},
{ files: ["app/**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
{
ignores: [
"build",
"migrations",
// # Hack fix to override default behavior for ignore files linted by name
// # https://github.com/eslint/eslint/issues/15010
"!.*",
"node_modules",
"public",
".react-router",
],
},
{
settings: {
react: { version: "detect" },
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...compat.extends("plugin:prettier/recommended"),
...compat.extends("plugin:react-hooks/recommended"),
{
rules: {
"no-debugger": "warn",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/ban-ts-comment": [
"warn",
{ "ts-ignore": "allow-with-description" },
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
caughtErrors: "none",
},
],
},
},
];