Skip to content

Commit 0d3a6e2

Browse files
committed
Add eslint rule to enforce components not using stores.
1 parent dd54df4 commit 0d3a6e2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.eslintrc.cjs

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = {
1212
"plugin:import/recommended",
1313
"plugin:import/typescript",
1414
"plugin:vue/vue3-essential",
15+
// When this is active eslint complains.
1516
// "plugin:@typescript-eslint/recommended",
1617
"@vue/eslint-config-prettier",
1718
"@vue/eslint-config-typescript",
@@ -45,6 +46,12 @@ module.exports = {
4546
from: "apps/backend/",
4647
message: "Frontend should not import from backend. Move code to libs and import from there instead.",
4748
},
49+
50+
{
51+
target: "apps/frontend/**/components/*",
52+
from: "**/stores/*",
53+
message: "Components should not import stores.",
54+
},
4855
],
4956
},
5057
],

tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"files": [],
32
"compilerOptions": {
43
"strict": true,
54
"forceConsistentCasingInFileNames": true,

0 commit comments

Comments
 (0)