22module . exports = {
33 forbidden : [
44 {
5- name : ' no-circular' ,
6- severity : ' warn' ,
5+ name : " no-circular" ,
6+ severity : " warn" ,
77 comment :
8- ' This dependency is part of a circular relationship. You might want to revise ' +
9- ' your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ' ,
8+ " This dependency is part of a circular relationship. You might want to revise " +
9+ " your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) " ,
1010 from : { } ,
1111 to : {
12- circular : true
13- }
12+ circular : true ,
13+ } ,
1414 } ,
1515 {
16- name : ' no-orphans' ,
16+ name : " no-orphans" ,
1717 comment :
1818 "This is an orphan module - it's likely not used (anymore?). Either use it or " +
1919 "remove it. If it's logical this module is an orphan (i.e. it's a config file), " +
2020 "add an exception for it in your dependency-cruiser configuration. By default " +
2121 "this rule does not scrutinize dot-files, TypeScript declaration " +
2222 "files (.d.ts), tsconfig.json and some of the babel and webpack configs." ,
23- severity : ' warn' ,
23+ severity : " warn" ,
2424 from : {
2525 orphan : true ,
2626 pathNot : [
27- ' (^|/)[.][^/]+[.](js|cjs|mjs|ts|json)$' , // dot files
28- ' [.]d[.]ts$' , // TypeScript declaration files
29- ' (^|/)tsconfig[.]json$' , // TypeScript config
30- ' (^|/)(babel|webpack)[.]config[.](js|cjs|mjs|ts|json)$' // other configs
31- ]
27+ " (^|/)[.][^/]+[.](js|cjs|mjs|ts|json)$" , // dot files
28+ " [.]d[.]ts$" , // TypeScript declaration files
29+ " (^|/)tsconfig[.]json$" , // TypeScript config
30+ " (^|/)(babel|webpack)[.]config[.](js|cjs|mjs|ts|json)$" , // other configs
31+ ] ,
3232 } ,
3333 to : { } ,
3434 } ,
3535 {
36- name : ' no-deprecated-core' ,
36+ name : " no-deprecated-core" ,
3737 comment :
38- ' A module depends on a node core module that has been deprecated. Find an alternative - these are ' +
38+ " A module depends on a node core module that has been deprecated. Find an alternative - these are " +
3939 "bound to exist - node doesn't deprecate lightly." ,
40- severity : ' warn' ,
40+ severity : " warn" ,
4141 from : { } ,
4242 to : {
43- dependencyTypes : [
44- 'core'
45- ] ,
43+ dependencyTypes : [ "core" ] ,
4644 path : [
47- ' ^(v8/tools/codemap)$' ,
48- ' ^(v8/tools/consarray)$' ,
49- ' ^(v8/tools/csvparser)$' ,
50- ' ^(v8/tools/logreader)$' ,
51- ' ^(v8/tools/profile_view)$' ,
52- ' ^(v8/tools/profile)$' ,
53- ' ^(v8/tools/SourceMap)$' ,
54- ' ^(v8/tools/splaytree)$' ,
55- ' ^(v8/tools/tickprocessor-driver)$' ,
56- ' ^(v8/tools/tickprocessor)$' ,
57- ' ^(node-inspect/lib/_inspect)$' ,
58- ' ^(node-inspect/lib/internal/inspect_client)$' ,
59- ' ^(node-inspect/lib/internal/inspect_repl)$' ,
60- ' ^(async_hooks)$' ,
61- ' ^(punycode)$' ,
62- ' ^(domain)$' ,
63- ' ^(constants)$' ,
64- ' ^(sys)$' ,
65- ' ^(_linklist)$' ,
66- ' ^(_stream_wrap)$'
45+ " ^(v8/tools/codemap)$" ,
46+ " ^(v8/tools/consarray)$" ,
47+ " ^(v8/tools/csvparser)$" ,
48+ " ^(v8/tools/logreader)$" ,
49+ " ^(v8/tools/profile_view)$" ,
50+ " ^(v8/tools/profile)$" ,
51+ " ^(v8/tools/SourceMap)$" ,
52+ " ^(v8/tools/splaytree)$" ,
53+ " ^(v8/tools/tickprocessor-driver)$" ,
54+ " ^(v8/tools/tickprocessor)$" ,
55+ " ^(node-inspect/lib/_inspect)$" ,
56+ " ^(node-inspect/lib/internal/inspect_client)$" ,
57+ " ^(node-inspect/lib/internal/inspect_repl)$" ,
58+ " ^(async_hooks)$" ,
59+ " ^(punycode)$" ,
60+ " ^(domain)$" ,
61+ " ^(constants)$" ,
62+ " ^(sys)$" ,
63+ " ^(_linklist)$" ,
64+ " ^(_stream_wrap)$" ,
6765 ] ,
68- }
66+ } ,
6967 } ,
7068 {
71- name : ' not-to-deprecated' ,
69+ name : " not-to-deprecated" ,
7270 comment :
73- ' This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later ' +
74- ' version of that module, or find an alternative. Deprecated modules are a security risk.' ,
75- severity : ' warn' ,
71+ " This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later " +
72+ " version of that module, or find an alternative. Deprecated modules are a security risk." ,
73+ severity : " warn" ,
7674 from : { } ,
7775 to : {
78- dependencyTypes : [
79- 'deprecated'
80- ]
81- }
76+ dependencyTypes : [ "deprecated" ] ,
77+ } ,
8278 } ,
8379 {
84- name : ' no-non-package-json' ,
85- severity : ' error' ,
80+ name : " no-non-package-json" ,
81+ severity : " error" ,
8682 comment :
8783 "This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " +
8884 "That's problematic as the package either (1) won't be available on live (2 - worse) will be " +
8985 "available on live with an non-guaranteed version. Fix it by adding the package to the dependencies " +
9086 "in your package.json." ,
9187 from : { } ,
9288 to : {
93- dependencyTypes : [
94- 'npm-no-pkg' ,
95- 'npm-unknown'
96- ]
97- }
89+ dependencyTypes : [ "npm-no-pkg" , "npm-unknown" ] ,
90+ } ,
9891 } ,
9992 {
100- name : ' not-to-unresolvable' ,
93+ name : " not-to-unresolvable" ,
10194 comment :
10295 "This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " +
103- ' module: add it to your package.json. In all other cases you likely already know what to do.' ,
104- severity : ' error' ,
96+ " module: add it to your package.json. In all other cases you likely already know what to do." ,
97+ severity : " error" ,
10598 from : { } ,
10699 to : {
107- couldNotResolve : true
108- }
100+ couldNotResolve : true ,
101+ } ,
109102 } ,
110103 {
111- name : ' no-duplicate-dep-types' ,
104+ name : " no-duplicate-dep-types" ,
112105 comment :
113106 "Likely this module depends on an external ('npm') package that occurs more than once " +
114107 "in your package.json i.e. bot as a devDependencies and in dependencies. This will cause " +
115108 "maintenance problems later on." ,
116- severity : ' warn' ,
109+ severity : " warn" ,
117110 from : { } ,
118111 to : {
119112 moreThanOneDependencyType : true ,
120113 // as it's pretty common to have a type import be a type only import
121114 // _and_ (e.g.) a devDependency - don't consider type-only dependency
122115 // types for this rule
123- dependencyTypesNot : [ "type-only" ]
124- }
116+ dependencyTypesNot : [ "type-only" ] ,
117+ } ,
125118 } ,
126119
127120 /* rules you might want to tweak for your specific situation: */
128121
129122 {
130- name : ' not-to-spec' ,
123+ name : " not-to-spec" ,
131124 comment :
132- ' This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. ' +
125+ " This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. " +
133126 "If there's something in a spec that's of use to other modules, it doesn't have that single " +
134- ' responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.' ,
135- severity : ' error' ,
127+ " responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock." ,
128+ severity : " error" ,
136129 from : { } ,
137130 to : {
138- path : ' [.](spec|test)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$'
139- }
131+ path : " [.](spec|test)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$" ,
132+ } ,
140133 } ,
141134 {
142- name : ' not-to-dev-dep' ,
143- severity : ' error' ,
135+ name : " not-to-dev-dep" ,
136+ severity : " error" ,
144137 comment :
145138 "This module depends on an npm package from the 'devDependencies' section of your " +
146- ' package.json. It looks like something that ships to production, though. To prevent problems ' +
139+ " package.json. It looks like something that ships to production, though. To prevent problems " +
147140 "with npm packages that aren't there on production declare it (only!) in the 'dependencies'" +
148- ' section of your package.json. If this module is development only - add it to the ' +
149- ' from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration' ,
141+ " section of your package.json. If this module is development only - add it to the " +
142+ " from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration" ,
150143 from : {
151- path : ' ^(client-app)' ,
152- pathNot : ' [.](spec|test|test-d|mock)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$'
144+ path : " ^(client-app)" ,
145+ pathNot : " [.](spec|test|test-d|mock)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$" ,
153146 } ,
154147 to : {
155- dependencyTypes : [
156- 'npm-dev' ,
157- ] ,
148+ dependencyTypes : [ "npm-dev" ] ,
158149 // type only dependencies are not a problem as they don't end up in the
159150 // production code or are ignored by the runtime.
160- dependencyTypesNot : [
161- 'type-only'
162- ] ,
163- pathNot : [
164- 'node_modules/@types/'
165- ]
166- }
151+ dependencyTypesNot : [ "type-only" ] ,
152+ pathNot : [ "node_modules/@types/" ] ,
153+ } ,
167154 } ,
168155 {
169- name : ' optional-deps-used' ,
170- severity : ' info' ,
156+ name : " optional-deps-used" ,
157+ severity : " info" ,
171158 comment :
172159 "This module depends on an npm package that is declared as an optional dependency " +
173160 "in your package.json. As this makes sense in limited situations only, it's flagged here. " +
174161 "If you're using an optional dependency here by design - add an exception to your" +
175162 "dependency-cruiser configuration." ,
176163 from : { } ,
177164 to : {
178- dependencyTypes : [
179- 'npm-optional'
180- ]
181- }
165+ dependencyTypes : [ "npm-optional" ] ,
166+ } ,
182167 } ,
183168 {
184- name : ' peer-deps-used' ,
169+ name : " peer-deps-used" ,
185170 comment :
186171 "This module depends on an npm package that is declared as a peer dependency " +
187172 "in your package.json. This makes sense if your package is e.g. a plugin, but in " +
188173 "other cases - maybe not so much. If the use of a peer dependency is intentional " +
189174 "add an exception to your dependency-cruiser configuration." ,
190- severity : ' warn' ,
175+ severity : " warn" ,
191176 from : { } ,
192177 to : {
193- dependencyTypes : [
194- 'npm-peer'
195- ]
196- }
197- }
178+ dependencyTypes : [ "npm-peer" ] ,
179+ } ,
180+ } ,
198181 ] ,
199182 options : {
200183 doNotFollow : {
201- path : ' node_modules'
184+ path : " node_modules" ,
202185 } ,
203186 tsConfig : {
204- fileName : ' tsconfig.app.json'
187+ fileName : " tsconfig.app.json" ,
205188 } ,
206189 enhancedResolveOptions : {
207190 exportsFields : [ "exports" ] ,
@@ -210,15 +193,15 @@ module.exports = {
210193 } ,
211194 reporterOptions : {
212195 dot : {
213- collapsePattern : ' node_modules/(@[^/]+/[^/]+|[^/]+)' ,
196+ collapsePattern : " node_modules/(@[^/]+/[^/]+|[^/]+)" ,
214197 } ,
215198 archi : {
216- collapsePattern : ' ^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)' ,
199+ collapsePattern : " ^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)" ,
217200 } ,
218- " text" : {
219- " highlightFocused" : true
201+ text : {
202+ highlightFocused : true ,
220203 } ,
221- }
222- }
204+ } ,
205+ } ,
223206} ;
224207// generated: [email protected] on 2024-01-18T18:07:53.520Z
0 commit comments