Skip to content

Commit

Permalink
Upgrade: @eslint/[email protected] (#14865)
Browse files Browse the repository at this point in the history
* Upgrade: @eslint/eslintrc with `exports` field

* Use environments from @eslint/eslintrc Legacy API

* Use eslint/eslintrc main branch

* Use universal entry point

* @eslint/[email protected]
  • Loading branch information
mdjermanovic authored Aug 14, 2021
1 parent 1f5d088 commit ec9db63
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 511 deletions.
6 changes: 5 additions & 1 deletion lib/init/autoconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@

const equal = require("fast-deep-equal"),
recConfig = require("../../conf/eslint-recommended"),
ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"),
{
Legacy: {
ConfigOps
}
} = require("@eslint/eslintrc"),
{ Linter } = require("../linter"),
configRule = require("./config-rule");

Expand Down
8 changes: 6 additions & 2 deletions lib/init/config-initializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ const util = require("util"),
semver = require("semver"),
espree = require("espree"),
recConfig = require("../../conf/eslint-recommended"),
ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"),
{
Legacy: {
ConfigOps,
naming
}
} = require("@eslint/eslintrc"),
log = require("../shared/logging"),
naming = require("@eslint/eslintrc/lib/shared/naming"),
ModuleResolver = require("../shared/relative-module-resolver"),
autoconfig = require("./autoconfig.js"),
ConfigFile = require("./config-file"),
Expand Down
6 changes: 5 additions & 1 deletion lib/linter/config-comment-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
//------------------------------------------------------------------------------

const levn = require("levn"),
ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops");
{
Legacy: {
ConfigOps
}
} = require("@eslint/eslintrc/universal"); // eslint-disable-line node/no-missing-require -- false positive

const debug = require("debug")("eslint:config-comment-parser");

Expand Down
10 changes: 7 additions & 3 deletions lib/linter/linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ const
evk = require("eslint-visitor-keys"),
espree = require("espree"),
merge = require("lodash.merge"),
BuiltInEnvironments = require("@eslint/eslintrc/conf/environments"),
pkg = require("../../package.json"),
astUtils = require("../shared/ast-utils"),
ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"),
ConfigValidator = require("@eslint/eslintrc/lib/shared/config-validator"),
{
Legacy: {
ConfigOps,
ConfigValidator,
environments: BuiltInEnvironments
}
} = require("@eslint/eslintrc/universal"), // eslint-disable-line node/no-missing-require -- false positive
Traverser = require("../shared/traverser"),
{ SourceCode } = require("../source-code"),
CodePathAnalyzer = require("./code-path-analysis/code-path-analyzer"),
Expand Down
8 changes: 6 additions & 2 deletions lib/shared/config-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
const
util = require("util"),
configSchema = require("../../conf/config-schema"),
BuiltInEnvironments = require("@eslint/eslintrc/conf/environments"),
BuiltInRules = require("../rules"),
ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"),
{
Legacy: {
ConfigOps,
environments: BuiltInEnvironments
}
} = require("@eslint/eslintrc"),
{ emitDeprecationWarning } = require("./deprecation-warnings");

const ajv = require("./ajv")();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"homepage": "https://eslint.org",
"bugs": "https://github.com/eslint/eslint/issues/",
"dependencies": {
"@eslint/eslintrc": "^0.4.3",
"@eslint/eslintrc": "^1.0.0",
"@humanwhocodes/config-array": "^0.6.0",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
Expand Down
Loading

0 comments on commit ec9db63

Please sign in to comment.