1+ /** @format */
2+
13// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
24import storybook from "eslint-plugin-storybook" ;
35
@@ -9,157 +11,165 @@ import prettier from "eslint-config-prettier";
911import boundaries from "eslint-plugin-boundaries" ;
1012import globals from "globals" ;
1113
12- export default ts . config ( {
13- ignores : [ "**/node_modules/**" , "**/dist/**" , "**/coverage/**" , "**/.angular/**" , "**/*.scss" ] ,
14- } , js . configs . recommended , ...ts . configs . recommended , prettier , {
15- languageOptions : {
16- ecmaVersion : "latest" ,
17- sourceType : "module" ,
18- globals : {
19- ...globals . browser ,
20- ...globals . jasmine ,
21- } ,
14+ export default ts . config (
15+ {
16+ ignores : [ "**/node_modules/**" , "**/dist/**" , "**/coverage/**" , "**/.angular/**" , "**/*.scss" ] ,
2217 } ,
23- plugins : {
24- boundaries,
25- } ,
26- settings : {
27- "boundaries/dependency-nodes" : [ "import" ] ,
28- "boundaries/include" : [ "projects/**/*.ts" ] ,
29- "boundaries/elements" : [
30- {
31- type : "domain" ,
32- pattern : "projects/social_platform/src/app/domain/**" ,
33- mode : "full" ,
34- } ,
35- {
36- type : "infrastructure" ,
37- pattern : "projects/social_platform/src/app/infrastructure/**" ,
38- mode : "full" ,
39- } ,
40- {
41- type : "api" ,
42- pattern : "projects/social_platform/src/app/api/**" ,
43- mode : "full" ,
44- } ,
45- {
46- type : "ui" ,
47- pattern : "projects/social_platform/src/app/ui/**" ,
48- mode : "full" ,
49- } ,
50- {
51- type : "utils" ,
52- pattern : "projects/social_platform/src/app/utils/**" ,
53- mode : "full" ,
54- } ,
55- {
56- type : "testing" ,
57- pattern : "projects/social_platform/src/app/testing/**" ,
58- mode : "full" ,
59- } ,
60- {
61- type : "core-lib" ,
62- pattern : "projects/core/src/**" ,
63- mode : "full" ,
64- } ,
65- {
66- type : "ui-lib" ,
67- pattern : "projects/ui/src/**" ,
68- mode : "full" ,
18+ js . configs . recommended ,
19+ ...ts . configs . recommended ,
20+ prettier ,
21+ {
22+ languageOptions : {
23+ ecmaVersion : "latest" ,
24+ sourceType : "module" ,
25+ globals : {
26+ ...globals . browser ,
27+ ...globals . jasmine ,
6928 } ,
70- {
71- type : "env" ,
72- pattern : "projects/social_platform/src/environments/**" ,
73- mode : "full" ,
74- } ,
75- {
76- type : "root" ,
77- pattern : [
78- "projects/social_platform/src/app/app.component.ts" ,
79- "projects/social_platform/src/app/app.component.spec.ts" ,
80- "projects/social_platform/src/app/app.config.ts" ,
81- "projects/social_platform/src/app/app.routes.ts" ,
82- "projects/social_platform/src/app/sentry.config.ts" ,
83- "projects/social_platform/src/main.ts" ,
84- "projects/social_platform/src/test.ts" ,
85- ] ,
86- mode : "full" ,
87- } ,
88- ] ,
89- "import/resolver" : {
90- typescript : {
91- alwaysTryTypes : true ,
92- project : [ "./tsconfig.json" ] ,
29+ } ,
30+ plugins : {
31+ boundaries,
32+ } ,
33+ settings : {
34+ "boundaries/dependency-nodes" : [ "import" ] ,
35+ "boundaries/include" : [ "projects/**/*.ts" ] ,
36+ "boundaries/elements" : [
37+ {
38+ type : "domain" ,
39+ pattern : "projects/social_platform/src/app/domain/**" ,
40+ mode : "full" ,
41+ } ,
42+ {
43+ type : "infrastructure" ,
44+ pattern : "projects/social_platform/src/app/infrastructure/**" ,
45+ mode : "full" ,
46+ } ,
47+ {
48+ type : "api" ,
49+ pattern : "projects/social_platform/src/app/api/**" ,
50+ mode : "full" ,
51+ } ,
52+ {
53+ type : "ui" ,
54+ pattern : "projects/social_platform/src/app/ui/**" ,
55+ mode : "full" ,
56+ } ,
57+ {
58+ type : "utils" ,
59+ pattern : "projects/social_platform/src/app/utils/**" ,
60+ mode : "full" ,
61+ } ,
62+ {
63+ type : "testing" ,
64+ pattern : "projects/social_platform/src/app/testing/**" ,
65+ mode : "full" ,
66+ } ,
67+ {
68+ type : "core-lib" ,
69+ pattern : "projects/core/src/**" ,
70+ mode : "full" ,
71+ } ,
72+ {
73+ type : "ui-lib" ,
74+ pattern : "projects/ui/src/**" ,
75+ mode : "full" ,
76+ } ,
77+ {
78+ type : "env" ,
79+ pattern : "projects/social_platform/src/environments/**" ,
80+ mode : "full" ,
81+ } ,
82+ {
83+ type : "root" ,
84+ pattern : [
85+ "projects/social_platform/src/app/app.component.ts" ,
86+ "projects/social_platform/src/app/app.component.spec.ts" ,
87+ "projects/social_platform/src/app/app.config.ts" ,
88+ "projects/social_platform/src/app/app.routes.ts" ,
89+ "projects/social_platform/src/app/sentry.config.ts" ,
90+ "projects/social_platform/src/main.ts" ,
91+ "projects/social_platform/src/test.ts" ,
92+ ] ,
93+ mode : "full" ,
94+ } ,
95+ ] ,
96+ "import/resolver" : {
97+ typescript : {
98+ alwaysTryTypes : true ,
99+ project : [ "./tsconfig.json" ] ,
100+ } ,
93101 } ,
94102 } ,
95- } ,
96- rules : {
97- "no-useless-constructor" : "off" ,
98- "@typescript-eslint/no-empty-function" : "off" ,
99- "no-empty" : "off" ,
100- "dot-notation" : "off" ,
101- "lines-between-class-members" : "off" ,
102- "@typescript-eslint/no-explicit-any" : "off" ,
103- "@typescript-eslint/no-unused-vars" : "off" ,
104- "@typescript-eslint/no-unused-expressions" : "off" ,
103+ rules : {
104+ "no-useless-constructor" : "off" ,
105+ "@typescript-eslint/no-empty-function" : "off" ,
106+ "no-empty" : "off" ,
107+ "dot-notation" : "off" ,
108+ "lines-between-class-members" : "off" ,
109+ "@typescript-eslint/no-explicit-any" : "off" ,
110+ "@typescript-eslint/no-unused-vars" : "off" ,
111+ "@typescript-eslint/no-unused-expressions" : "off" ,
105112
106- "boundaries/no-unknown" : [ "error" ] ,
107- "boundaries/no-unknown-files" : [ "error" ] ,
108- "boundaries/dependencies" : [
109- "error" ,
110- {
111- default : "disallow" ,
112- rules : [
113- { from : { type : "domain" } , allow : { to : { type : [ "domain" , "core-lib" ] } } } ,
114- {
115- from : { type : "infrastructure" } ,
116- allow : { to : { type : [ "domain" , "infrastructure" , "core-lib" , "utils" ] } } ,
117- } ,
118- {
119- from : { type : "api" } ,
120- allow : {
121- to : { type : [ "domain" , "infrastructure" , "api" , "core-lib" , "utils" , "env" ] } ,
113+ "boundaries/no-unknown" : [ "error" ] ,
114+ "boundaries/no-unknown-files" : [ "error" ] ,
115+ "boundaries/dependencies" : [
116+ "error" ,
117+ {
118+ default : "disallow" ,
119+ rules : [
120+ { from : { type : "domain" } , allow : { to : { type : [ "domain" , "core-lib" ] } } } ,
121+ {
122+ from : { type : "infrastructure" } ,
123+ allow : { to : { type : [ "domain" , "infrastructure" , "core-lib" , "utils" ] } } ,
122124 } ,
123- } ,
124- {
125- from : { type : "ui" } ,
126- allow : {
127- to : {
128- type : [ "domain" , "infrastructure" , "api" , "ui" , "core-lib" , "ui-lib" , "utils" ] ,
125+ {
126+ from : { type : "api" } ,
127+ allow : {
128+ to : { type : [ "domain" , "infrastructure" , "api" , "core-lib" , "utils" , "env" ] } ,
129129 } ,
130130 } ,
131- } ,
132- { from : { type : "utils" } , allow : { to : { type : [ "domain" , "core-lib" , "utils" ] } } } ,
133- {
134- from : { type : "core-lib" } ,
135- allow : { to : { type : [ "core-lib" , "domain" , "utils" , "env" ] } } ,
136- } ,
137- { from : { type : "ui-lib" } , allow : { to : { type : [ "core-lib" , "domain" , "ui-lib" ] } } } ,
138- {
139- from : { type : "root" } ,
140- allow : {
141- to : {
142- type : [
143- "domain" ,
144- "infrastructure" ,
145- "api" ,
146- "ui" ,
147- "core-lib" ,
148- "ui-lib" ,
149- "utils" ,
150- "env" ,
151- "root" ,
152- ] ,
131+ {
132+ from : { type : "ui" } ,
133+ allow : {
134+ to : {
135+ type : [ "domain" , "infrastructure" , "api" , "ui" , "core-lib" , "ui-lib" , "utils" ] ,
136+ } ,
153137 } ,
154138 } ,
155- } ,
156- ] ,
157- } ,
158- ] ,
139+ { from : { type : "utils" } , allow : { to : { type : [ "domain" , "core-lib" , "utils" ] } } } ,
140+ {
141+ from : { type : "core-lib" } ,
142+ allow : { to : { type : [ "core-lib" , "domain" , "utils" , "env" ] } } ,
143+ } ,
144+ { from : { type : "ui-lib" } , allow : { to : { type : [ "core-lib" , "domain" , "ui-lib" ] } } } ,
145+ {
146+ from : { type : "root" } ,
147+ allow : {
148+ to : {
149+ type : [
150+ "domain" ,
151+ "infrastructure" ,
152+ "api" ,
153+ "ui" ,
154+ "core-lib" ,
155+ "ui-lib" ,
156+ "utils" ,
157+ "env" ,
158+ "root" ,
159+ ] ,
160+ } ,
161+ } ,
162+ } ,
163+ ] ,
164+ } ,
165+ ] ,
166+ } ,
159167 } ,
160- } , {
161- files : [ "**/*.spec.ts" ] ,
162- rules : {
163- "boundaries/dependencies" : "off" ,
168+ {
169+ files : [ "**/*.spec.ts" ] ,
170+ rules : {
171+ "boundaries/dependencies" : "off" ,
172+ } ,
164173 } ,
165- } , storybook . configs [ "flat/recommended" ] ) ;
174+ storybook . configs [ "flat/recommended" ] ,
175+ ) ;
0 commit comments