@@ -4,6 +4,7 @@ const path = require("path");
44
55const INTERNAL_FILES = {
66 CLI_ENGINE_PATTERN : "lib/cli-engine/**/*" ,
7+ INIT_PATTERN : "lib/init/**/*" ,
78 LINTER_PATTERN : "lib/linter/**/*" ,
89 RULE_TESTER_PATTERN : "lib/rule-tester/**/*" ,
910 RULES_PATTERN : "lib/rules/**/*" ,
@@ -113,7 +114,17 @@ module.exports = {
113114 files : [ INTERNAL_FILES . CLI_ENGINE_PATTERN ] ,
114115 rules : {
115116 "node/no-restricted-require" : [ "error" , [
116- ...createInternalFilesPatterns ( INTERNAL_FILES . CLI_ENGINE_PATTERN )
117+ ...createInternalFilesPatterns ( INTERNAL_FILES . CLI_ENGINE_PATTERN ) ,
118+ resolveAbsolutePath ( "lib/init/index.js" )
119+ ] ]
120+ }
121+ } ,
122+ {
123+ files : [ INTERNAL_FILES . INIT_PATTERN ] ,
124+ rules : {
125+ "node/no-restricted-require" : [ "error" , [
126+ ...createInternalFilesPatterns ( INTERNAL_FILES . INIT_PATTERN ) ,
127+ resolveAbsolutePath ( "lib/rule-tester/index.js" )
117128 ] ]
118129 }
119130 } ,
@@ -124,6 +135,7 @@ module.exports = {
124135 ...createInternalFilesPatterns ( INTERNAL_FILES . LINTER_PATTERN ) ,
125136 "fs" ,
126137 resolveAbsolutePath ( "lib/cli-engine/index.js" ) ,
138+ resolveAbsolutePath ( "lib/init/index.js" ) ,
127139 resolveAbsolutePath ( "lib/rule-tester/index.js" )
128140 ] ]
129141 }
@@ -135,6 +147,7 @@ module.exports = {
135147 ...createInternalFilesPatterns ( INTERNAL_FILES . RULES_PATTERN ) ,
136148 "fs" ,
137149 resolveAbsolutePath ( "lib/cli-engine/index.js" ) ,
150+ resolveAbsolutePath ( "lib/init/index.js" ) ,
138151 resolveAbsolutePath ( "lib/linter/index.js" ) ,
139152 resolveAbsolutePath ( "lib/rule-tester/index.js" ) ,
140153 resolveAbsolutePath ( "lib/source-code/index.js" )
@@ -147,6 +160,7 @@ module.exports = {
147160 "node/no-restricted-require" : [ "error" , [
148161 ...createInternalFilesPatterns ( ) ,
149162 resolveAbsolutePath ( "lib/cli-engine/index.js" ) ,
163+ resolveAbsolutePath ( "lib/init/index.js" ) ,
150164 resolveAbsolutePath ( "lib/linter/index.js" ) ,
151165 resolveAbsolutePath ( "lib/rule-tester/index.js" ) ,
152166 resolveAbsolutePath ( "lib/source-code/index.js" )
@@ -160,6 +174,7 @@ module.exports = {
160174 ...createInternalFilesPatterns ( INTERNAL_FILES . SOURCE_CODE_PATTERN ) ,
161175 "fs" ,
162176 resolveAbsolutePath ( "lib/cli-engine/index.js" ) ,
177+ resolveAbsolutePath ( "lib/init/index.js" ) ,
163178 resolveAbsolutePath ( "lib/linter/index.js" ) ,
164179 resolveAbsolutePath ( "lib/rule-tester/index.js" ) ,
165180 resolveAbsolutePath ( "lib/rules/index.js" )
@@ -171,7 +186,8 @@ module.exports = {
171186 rules : {
172187 "node/no-restricted-require" : [ "error" , [
173188 ...createInternalFilesPatterns ( INTERNAL_FILES . RULE_TESTER_PATTERN ) ,
174- resolveAbsolutePath ( "lib/cli-engine/index.js" )
189+ resolveAbsolutePath ( "lib/cli-engine/index.js" ) ,
190+ resolveAbsolutePath ( "lib/init/index.js" )
175191 ] ]
176192 }
177193 }
0 commit comments