-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
71 lines (67 loc) · 1.8 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
require("@rushstack/eslint-patch/modern-module-resolution");
/* eslint-env node */
module.exports = {
root: true,
parser: "vue-eslint-parser",
plugins: ["import", "prettier"],
extends: [
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:vue/vue3-essential",
// When this is active eslint complains.
// "plugin:@typescript-eslint/recommended",
"@vue/eslint-config-prettier",
"@vue/eslint-config-typescript",
],
parserOptions: {
ecmaVersion: "latest",
},
settings: {
"import/resolver": {
typescript: true,
node: true,
},
},
ignorePatterns: ["**/dist/*", "**/node_modules/*"],
rules: {
"prettier/prettier": ["error"],
// Fix annoying CRLF vs LF error.
"linebreak-style": ["error", process.platform === "win32" ? "windows" : "unix"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
allowExpressions: true,
},
],
"import/no-restricted-paths": [
"error",
{
zones: [
{
target: "apps/backend/",
from: "apps/frontend/",
message: "Backend should not import from frontend. Move code to libs and import from there instead.",
},
{
target: "apps/frontend/",
from: "apps/backend/",
message: "Frontend should not import from backend. Move code to libs and import from there instead.",
},
{
target: "apps/frontend/**/components/*",
from: "**/stores/*",
message: "Components should not import stores.",
},
],
},
],
},
// overrides: [
// {
// files: ["**/*.{ts,vue}"],
// },
// ],
};