Skip to content

Commit 66bfb8e

Browse files
authored
test: enable import/no-extraneous-dependencies (#983)
* test: enable import/no-extraneous-dependencies * chore: fix all new eslint errors * fix: correct required chalk dependency
1 parent b244246 commit 66bfb8e

File tree

10 files changed

+29
-17
lines changed

10 files changed

+29
-17
lines changed

.eslintrc.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ module.exports = {
2727
// Forbid a module from importing itself
2828
'import/no-self-import': 'error',
2929

30-
// Enable after https://github.com/benmosher/eslint-plugin-import/issues/1650 is fixed
3130
// Forbid the use of extraneous packages
32-
// 'import/no-extraneous-dependencies': [
33-
// 'error',
34-
// {devDependencies: ['**/*.test.js']}
35-
// ]
31+
'import/no-extraneous-dependencies': [
32+
'error',
33+
{
34+
devDependencies: ['**/*.test.js', '**/*.test.ts'],
35+
},
36+
],
3637
},
3738
overrides: [
3839
{

@alias/commitlint/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@
3434
},
3535
"license": "MIT",
3636
"dependencies": {
37-
"@commitlint/cli": "^11.0.0"
37+
"@commitlint/cli": "^11.0.0",
38+
"@commitlint/types": "^11.0.0"
3839
},
3940
"devDependencies": {
4041
"@commitlint/test": "^11.0.0",
41-
"@commitlint/utils": "^11.0.0"
42+
"@commitlint/utils": "^11.0.0",
43+
"execa": "^5.0.0"
4244
},
4345
"gitHead": "cb565dfcca3128380b9b3dc274aedbcae34ce5ca"
4446
}

@commitlint/cli/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"@commitlint/lint": "^11.0.0",
4848
"@commitlint/load": "^11.0.0",
4949
"@commitlint/read": "^11.0.0",
50+
"@commitlint/types": "^11.0.0",
5051
"get-stdin": "8.0.0",
5152
"lodash": "^4.17.19",
5253
"resolve-from": "5.0.0",

@commitlint/load/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@commitlint/execute-rule": "^11.0.0",
4444
"@commitlint/resolve-extends": "^11.0.0",
4545
"@commitlint/types": "^11.0.0",
46-
"chalk": "4.1.0",
46+
"chalk": "^4.0.0",
4747
"cosmiconfig": "^7.0.0",
4848
"lodash": "^4.17.19",
4949
"resolve-from": "^5.0.0"

@commitlint/parse/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@commitlint/utils": "^11.0.0"
3939
},
4040
"dependencies": {
41+
"@commitlint/types": "^11.0.0",
4142
"conventional-changelog-angular": "^5.0.11",
4243
"conventional-commits-parser": "^3.0.0"
4344
},

@commitlint/prompt/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
},
4242
"dependencies": {
4343
"@commitlint/load": "^11.0.0",
44+
"@commitlint/types": "^11.0.0",
4445
"chalk": "^4.0.0",
4546
"lodash": "^4.17.19",
4647
"throat": "^5.0.0",

@commitlint/read/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@
3737
"@commitlint/test": "^11.0.0",
3838
"@commitlint/utils": "^11.0.0",
3939
"@types/fs-extra": "^9.0.1",
40-
"@types/git-raw-commits": "^2.0.0"
40+
"@types/git-raw-commits": "^2.0.0",
41+
"execa": "^5.0.0"
4142
},
4243
"dependencies": {
4344
"@commitlint/top-level": "^11.0.0",
45+
"@commitlint/types": "^11.0.0",
4446
"fs-extra": "^9.0.0",
4547
"git-raw-commits": "^2.0.0"
4648
},

@commitlint/types/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"email": "[email protected]"
2727
},
2828
"license": "MIT",
29+
"dependencies": {
30+
"chalk": "^4.0.0"
31+
},
2932
"devDependencies": {
3033
"@commitlint/utils": "^11.0.0"
3134
},

@packages/test-environment/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"license": "MIT",
2929
"dependencies": {
3030
"@types/tmp": "^0.2.0",
31+
"jest-environment-node": "^26.6.2",
3132
"tmp": "0.2.1"
3233
},
3334
"gitHead": "71f0194f33943954a8dac1c458be47e5049717cd"

yarn.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -3033,14 +3033,6 @@ caseless@~0.12.0:
30333033
resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
30343034
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
30353035

3036-
[email protected], chalk@^4.0.0, chalk@^4.1.0:
3037-
version "4.1.0"
3038-
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
3039-
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
3040-
dependencies:
3041-
ansi-styles "^4.1.0"
3042-
supports-color "^7.1.0"
3043-
30443036
chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1:
30453037
version "1.1.3"
30463038
resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
@@ -3069,6 +3061,14 @@ chalk@^3.0.0:
30693061
ansi-styles "^4.1.0"
30703062
supports-color "^7.1.0"
30713063

3064+
chalk@^4.0.0, chalk@^4.1.0:
3065+
version "4.1.0"
3066+
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
3067+
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
3068+
dependencies:
3069+
ansi-styles "^4.1.0"
3070+
supports-color "^7.1.0"
3071+
30723072
char-regex@^1.0.2:
30733073
version "1.0.2"
30743074
resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"

0 commit comments

Comments
 (0)