-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy patheslint.config.mjs
More file actions
63 lines (60 loc) · 1.76 KB
/
eslint.config.mjs
File metadata and controls
63 lines (60 loc) · 1.76 KB
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
import eslint from "@eslint/js";
import prettierPlugin from "eslint-plugin-prettier";
import unusedImportsPlugin from "eslint-plugin-unused-imports";
import prettierExtends from "eslint-config-prettier";
import { fixupPluginRules } from "@eslint/compat";
import globals from "globals";
import tseslint from "typescript-eslint";
import { globalIgnores } from "eslint/config";
const globalToUse = {
...globals.browser,
...globals.serviceworker,
...globals.es2021,
...globals.worker,
...globals.node,
};
export default tseslint.config([
{
extends: [
{
ignores: ["dist/**", "bin/**", "docs/**", ".yarn/**"],
},
prettierExtends,
eslint.configs.recommended,
...tseslint.configs.recommended,
],
plugins: {
prettierPlugin,
"unused-imports": fixupPluginRules(unusedImportsPlugin),
},
rules: {
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unused-expressions": "off",
"no-useless-escape": "off",
"no-prototype-builtins": "off",
"no-undef": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-unused-vars": "off",
"linebreak-style": ["error", "unix"],
semi: ["error", "always"],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
},
],
"@typescript-eslint/no-explicit-any": "off",
},
languageOptions: {
globals: globalToUse,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
},
globalIgnores([".yarn/", ".expo/", ".idea/", "android/", "ios/"]),
]);