-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
47 lines (45 loc) · 1.2 KB
/
Copy patheslint.config.js
File metadata and controls
47 lines (45 loc) · 1.2 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
// Intentionally narrow: ESLint is here only to enforce the
// commands → backend → shared dependency rule via
// eslint-plugin-boundaries. Formatting and general lint are Biome's job.
//
// See BBC2-34 for the rationale.
import tsParser from "@typescript-eslint/parser";
import boundaries from "eslint-plugin-boundaries";
export default [
{
files: ["src/**/*.ts"],
ignores: ["src/shared/bitbucket-http/generated.d.ts", "src/**/*.test.ts"],
languageOptions: {
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
},
plugins: { boundaries },
settings: {
"boundaries/elements": [
{ type: "commands", pattern: "src/commands/*", mode: "folder" },
{ type: "backend", pattern: "src/backend/*", mode: "folder" },
{ type: "shared", pattern: "src/shared/*", mode: "folder" },
],
},
rules: {
"boundaries/dependencies": [
"error",
{
default: "disallow",
rules: [
{ from: "commands", allow: ["commands", "backend", "shared"] },
{
from: "backend",
allow: [
["backend", { elementName: "{{from.elementName}}" }],
"shared",
],
},
{ from: "shared", allow: ["shared"] },
],
},
],
},
},
];