Skip to content

Commit

Permalink
Replace eslint-plugin-import with eslint-plugin-i #2138
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz committed Jul 14, 2023
1 parent e691c93 commit 834be80
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 78 deletions.
23 changes: 6 additions & 17 deletions packages/eslint-plugin-swissquote/build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ module.exports = [
fs.copyFileSync(src, "dist/eslint-plugin-react-hooks/index.js");
},
builder => builder("estraverse").package(),
builder =>
builder("is-core-module")
.externals({
has: "../has/index.js"
})
.package(),
builder => builder("is-core-module").package(),
builder => builder("is-glob").package(),
builder => builder("path-parse").package(),
builder => builder("has").package(),
builder => builder("get-tsconfig").package(),
builder =>
builder("eslint-module-utils")
.packages(pkgBuilder => {
Expand Down Expand Up @@ -78,10 +73,11 @@ module.exports = [
"is-core-module": "../is-core-module/index.js",
"is-glob": "../is-glob/index.js",
"eslint-module-utils/hash.js": "../eslint-module-utils/hash",
"get-tsconfig": "../get-tsconfig/index.js",

// TODO :: is enhanced-resolve already exported somewhere ?

// no code path leverages this library
// no code path uses this library
open: "open"
}),

Expand All @@ -92,7 +88,7 @@ module.exports = [
.sourceFile(`module.exports = require("comment-parser/parser/index");`),

builder =>
builder("eslint-plugin-import")
builder("eslint-plugin-i")
.package()
.externals({
...externals,
Expand All @@ -105,21 +101,14 @@ module.exports = [
"eslint/use-at-your-own-risk": "eslint/use-at-your-own-risk",
"eslint/package.json": "eslint/package.json",
"/eslint/lib(/.*)/": "eslint/lib$1",
"is-core-module": "../is-core-module/index.js",
"is-glob": "../is-glob/index.js",
has: "../has/index.js",
"get-tsconfig": "../get-tsconfig/index.js",
"eslint-module-utils/readPkgUp": "../eslint-module-utils/readPkgUp.js",
"eslint-module-utils/pkgUp": "../eslint-module-utils/pkgUp.js",
"eslint-module-utils/resolve": "../eslint-module-utils/resolve.js",
"eslint-module-utils/hash": "../eslint-module-utils/hash.js",
"eslint-module-utils/ModuleCache":
"../eslint-module-utils/ModuleCache.js",

// Replace polyfills that aren't needed
"array-includes": "../../src/shims/array-includes.js",
"array.prototype.flat": "../../src/shims/array-prototype-flat.js",
"array.prototype.flatmap": "../../src/shims/array-prototype-flatmap.js",
"object.values": "../../src/shims/object-values.js"
}),

builder =>
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-swissquote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"eslint": "8.45.0",
"eslint-config-prettier": "8.8.0",
"eslint-import-resolver-typescript": "3.5.5",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-i": "2.27.5-4",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"prettier": "2.8.8",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../dist/eslint-plugin-i/index.js");

This file was deleted.

2 changes: 1 addition & 1 deletion packages/eslint-plugin-swissquote/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {};
const plugins = {
react: require("./packages/eslint-plugin-react"),
"react-hooks": require("./packages/eslint-plugin-react-hooks"),
import: require("./packages/eslint-plugin-import"),
import: require("./packages/eslint-plugin-i"),
prettier: require("./src/eslint-plugin-prettier/index.js"),
"@typescript-eslint": require("./packages/typescript-eslint_eslint-plugin")
};
Expand Down
73 changes: 15 additions & 58 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2977,7 +2977,7 @@ __metadata:
eslint: 8.45.0
eslint-config-prettier: 8.8.0
eslint-import-resolver-typescript: 3.5.5
eslint-plugin-import: 2.27.5
eslint-plugin-i: 2.27.5-4
eslint-plugin-react: 7.32.2
eslint-plugin-react-hooks: 4.6.0
prettier: 2.8.8
Expand Down Expand Up @@ -3375,13 +3375,6 @@ __metadata:
languageName: node
linkType: hard

"@types/json5@npm:^0.0.29":
version: 0.0.29
resolution: "@types/json5@npm:0.0.29"
checksum: e60b153664572116dfea673c5bda7778dbff150498f44f998e34b5886d8afc47f16799280e4b6e241c0472aef1bc36add771c569c68fc5125fc2ae519a3eb9ac
languageName: node
linkType: hard

"@types/minimatch@npm:^3.0.3":
version: 3.0.5
resolution: "@types/minimatch@npm:3.0.5"
Expand Down Expand Up @@ -6514,7 +6507,7 @@ __metadata:
languageName: node
linkType: hard

"eslint-module-utils@npm:^2.7.4":
"eslint-module-utils@npm:^2.7.4, eslint-module-utils@npm:^2.8.0":
version: 2.8.0
resolution: "eslint-module-utils@npm:2.8.0"
dependencies:
Expand All @@ -6526,28 +6519,22 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-import@npm:2.27.5":
version: 2.27.5
resolution: "eslint-plugin-import@npm:2.27.5"
"eslint-plugin-i@npm:2.27.5-4":
version: 2.27.5-4
resolution: "eslint-plugin-i@npm:2.27.5-4"
dependencies:
array-includes: ^3.1.6
array.prototype.flat: ^1.3.1
array.prototype.flatmap: ^1.3.1
debug: ^3.2.7
doctrine: ^2.1.0
eslint-import-resolver-node: ^0.3.7
eslint-module-utils: ^2.7.4
has: ^1.0.3
is-core-module: ^2.11.0
eslint-module-utils: ^2.8.0
get-tsconfig: ^4.6.0
is-glob: ^4.0.3
minimatch: ^3.1.2
object.values: ^1.1.6
resolve: ^1.22.1
semver: ^6.3.0
tsconfig-paths: ^3.14.1
resolve: ^1.22.3
semver: ^7.5.3
peerDependencies:
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
checksum: f500571a380167e25d72a4d925ef9a7aae8899eada57653e5f3051ec3d3c16d08271fcefe41a30a9a2f4fefc232f066253673ee4ea77b30dba65ae173dade85d
eslint: ^7.2.0 || ^8
checksum: 0bc69f211d8fe839a3e9779db3fbb9c09e385e0bdbce59495786d723481dff367997ec4b62a6967ec7c5095a5d8d67b874dbea7ff6c0893f2b03e983c84cca3f
languageName: node
linkType: hard

Expand Down Expand Up @@ -7420,7 +7407,7 @@ __metadata:
languageName: node
linkType: hard

"get-tsconfig@npm:^4.5.0":
"get-tsconfig@npm:^4.5.0, get-tsconfig@npm:^4.6.0":
version: 4.6.2
resolution: "get-tsconfig@npm:4.6.2"
dependencies:
Expand Down Expand Up @@ -9501,17 +9488,6 @@ __metadata:
languageName: node
linkType: hard

"json5@npm:^1.0.2":
version: 1.0.2
resolution: "json5@npm:1.0.2"
dependencies:
minimist: ^1.2.0
bin:
json5: lib/cli.js
checksum: 866458a8c58a95a49bef3adba929c625e82532bcff1fe93f01d29cb02cac7c3fe1f4b79951b7792c2da9de0b32871a8401a6e3c5b36778ad852bf5b8a61165d7
languageName: node
linkType: hard

"jsonc-parser@npm:^3.2.0":
version: 3.2.0
resolution: "jsonc-parser@npm:3.2.0"
Expand Down Expand Up @@ -10423,7 +10399,7 @@ __metadata:
languageName: node
linkType: hard

"minimist@npm:^1.2.0, minimist@npm:^1.2.6":
"minimist@npm:^1.2.0":
version: 1.2.8
resolution: "minimist@npm:1.2.8"
checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0
Expand Down Expand Up @@ -12354,7 +12330,7 @@ __metadata:
languageName: node
linkType: hard

"resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.22.1":
"resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.3":
version: 1.22.3
resolution: "resolve@npm:1.22.3"
dependencies:
Expand All @@ -12380,7 +12356,7 @@ __metadata:
languageName: node
linkType: hard

"resolve@patch:resolve@^1.1.7#~builtin<compat/resolve>, resolve@patch:resolve@^1.10.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.14.2#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.22.1#~builtin<compat/resolve>":
"resolve@patch:resolve@^1.1.7#~builtin<compat/resolve>, resolve@patch:resolve@^1.10.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.14.2#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.22.1#~builtin<compat/resolve>, resolve@patch:resolve@^1.22.3#~builtin<compat/resolve>":
version: 1.22.3
resolution: "resolve@patch:resolve@npm%3A1.22.3#~builtin<compat/resolve>::version=1.22.3&hash=c3c19d"
dependencies:
Expand Down Expand Up @@ -13217,13 +13193,6 @@ __metadata:
languageName: node
linkType: hard

"strip-bom@npm:^3.0.0":
version: 3.0.0
resolution: "strip-bom@npm:3.0.0"
checksum: 8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b
languageName: node
linkType: hard

"strip-bom@npm:^4.0.0":
version: 4.0.0
resolution: "strip-bom@npm:4.0.0"
Expand Down Expand Up @@ -13876,18 +13845,6 @@ __metadata:
languageName: node
linkType: hard

"tsconfig-paths@npm:^3.14.1":
version: 3.14.2
resolution: "tsconfig-paths@npm:3.14.2"
dependencies:
"@types/json5": ^0.0.29
json5: ^1.0.2
minimist: ^1.2.6
strip-bom: ^3.0.0
checksum: a6162eaa1aed680537f93621b82399c7856afd10ec299867b13a0675e981acac4e0ec00896860480efc59fc10fd0b16fdc928c0b885865b52be62cadac692447
languageName: node
linkType: hard

"tslib@npm:2.6.0, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.6.0":
version: 2.6.0
resolution: "tslib@npm:2.6.0"
Expand Down

0 comments on commit 834be80

Please sign in to comment.