-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
79 lines (78 loc) · 1.86 KB
/
.eslintrc.cjs
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
67
68
69
70
71
72
73
74
75
76
77
78
79
/* eslint-env node */
// require("@rushstack/eslint-patch/modern-module-resolution")
module.exports = {
env: {
node: true,
es6: true,
},
extends: [
"airbnb-base",
"plugin:import/typescript",
"eslint:recommended",
"prettier",
],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
defineProps: "readonly",
defineEmits: "readonly",
defineExpose: "readonly",
withDefaults: "readonly",
},
parserOptions: {
ecmaVersion: 6,
parser: "@typescript-eslint/parser",
sourceType: "module",
tsconfigRootDir: __dirname,
},
plugins: ["@typescript-eslint", "prettier", "import"],
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx", ".json"],
},
typescript: {
alwaysTryTypes: true,
project: ["src/frontend/tsconfig.json", "src/backend/tsconfig.json"],
},
},
},
ignorePatterns: ["node_modules/", "dist/", "**/local_db/"],
rules: {
"no-plusplus": "off",
"prettier/prettier": "warn",
"no-var": "error",
"comma-dangle": ["error", "only-multiline"],
"id-length": "off",
"no-unused-vars": [2, { args: "all", argsIgnorePattern: "^_" }],
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"security/detect-object-injection": "off",
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: ["**/*.test.ts", "**/tests/*.ts"],
},
],
"import/prefer-default-export": "off",
"import/extensions": [
"warn",
"ignorePackages",
{
ts: "never",
},
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)",
],
env: {
jest: true,
},
},
],
}