Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: remove lib/init from eslint config (#15748)
  • Loading branch information
mdjermanovic committed Apr 2, 2022
1 parent a59a4e6 commit d36f12f
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions .eslintrc.js
Expand Up @@ -4,7 +4,6 @@ const path = require("path");

const INTERNAL_FILES = {
CLI_ENGINE_PATTERN: "lib/cli-engine/**/*",
INIT_PATTERN: "lib/init/**/*",
LINTER_PATTERN: "lib/linter/**/*",
RULE_TESTER_PATTERN: "lib/rule-tester/**/*",
RULES_PATTERN: "lib/rules/**/*",
Expand Down Expand Up @@ -114,17 +113,7 @@ module.exports = {
files: [INTERNAL_FILES.CLI_ENGINE_PATTERN],
rules: {
"node/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.CLI_ENGINE_PATTERN),
resolveAbsolutePath("lib/init/index.js")
]]
}
},
{
files: [INTERNAL_FILES.INIT_PATTERN],
rules: {
"node/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.INIT_PATTERN),
resolveAbsolutePath("lib/rule-tester/index.js")
...createInternalFilesPatterns(INTERNAL_FILES.CLI_ENGINE_PATTERN)
]]
}
},
Expand All @@ -135,7 +124,6 @@ module.exports = {
...createInternalFilesPatterns(INTERNAL_FILES.LINTER_PATTERN),
"fs",
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js"),
resolveAbsolutePath("lib/rule-tester/index.js")
]]
}
Expand All @@ -147,7 +135,6 @@ module.exports = {
...createInternalFilesPatterns(INTERNAL_FILES.RULES_PATTERN),
"fs",
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js"),
resolveAbsolutePath("lib/linter/index.js"),
resolveAbsolutePath("lib/rule-tester/index.js"),
resolveAbsolutePath("lib/source-code/index.js")
Expand All @@ -160,7 +147,6 @@ module.exports = {
"node/no-restricted-require": ["error", [
...createInternalFilesPatterns(),
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js"),
resolveAbsolutePath("lib/linter/index.js"),
resolveAbsolutePath("lib/rule-tester/index.js"),
resolveAbsolutePath("lib/source-code/index.js")
Expand All @@ -174,7 +160,6 @@ module.exports = {
...createInternalFilesPatterns(INTERNAL_FILES.SOURCE_CODE_PATTERN),
"fs",
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js"),
resolveAbsolutePath("lib/linter/index.js"),
resolveAbsolutePath("lib/rule-tester/index.js"),
resolveAbsolutePath("lib/rules/index.js")
Expand All @@ -186,8 +171,7 @@ module.exports = {
rules: {
"node/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.RULE_TESTER_PATTERN),
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js")
resolveAbsolutePath("lib/cli-engine/index.js")
]]
}
}
Expand Down

0 comments on commit d36f12f

Please sign in to comment.