Skip to content

Commit

Permalink
test: enable import/no-extraneous-dependencies (#983)
Browse files Browse the repository at this point in the history
* test: enable import/no-extraneous-dependencies

* chore: fix all new eslint errors

* fix: correct required chalk dependency
  • Loading branch information
armano2 authored Jan 11, 2021
1 parent b244246 commit 66bfb8e
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 17 deletions.
11 changes: 6 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ module.exports = {
// Forbid a module from importing itself
'import/no-self-import': 'error',

// Enable after https://github.com/benmosher/eslint-plugin-import/issues/1650 is fixed
// Forbid the use of extraneous packages
// 'import/no-extraneous-dependencies': [
// 'error',
// {devDependencies: ['**/*.test.js']}
// ]
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.test.js', '**/*.test.ts'],
},
],
},
overrides: [
{
Expand Down
6 changes: 4 additions & 2 deletions @alias/commitlint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@
},
"license": "MIT",
"dependencies": {
"@commitlint/cli": "^11.0.0"
"@commitlint/cli": "^11.0.0",
"@commitlint/types": "^11.0.0"
},
"devDependencies": {
"@commitlint/test": "^11.0.0",
"@commitlint/utils": "^11.0.0"
"@commitlint/utils": "^11.0.0",
"execa": "^5.0.0"
},
"gitHead": "cb565dfcca3128380b9b3dc274aedbcae34ce5ca"
}
1 change: 1 addition & 0 deletions @commitlint/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@commitlint/lint": "^11.0.0",
"@commitlint/load": "^11.0.0",
"@commitlint/read": "^11.0.0",
"@commitlint/types": "^11.0.0",
"get-stdin": "8.0.0",
"lodash": "^4.17.19",
"resolve-from": "5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/load/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@commitlint/execute-rule": "^11.0.0",
"@commitlint/resolve-extends": "^11.0.0",
"@commitlint/types": "^11.0.0",
"chalk": "4.1.0",
"chalk": "^4.0.0",
"cosmiconfig": "^7.0.0",
"lodash": "^4.17.19",
"resolve-from": "^5.0.0"
Expand Down
1 change: 1 addition & 0 deletions @commitlint/parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@commitlint/utils": "^11.0.0"
},
"dependencies": {
"@commitlint/types": "^11.0.0",
"conventional-changelog-angular": "^5.0.11",
"conventional-commits-parser": "^3.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions @commitlint/prompt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
},
"dependencies": {
"@commitlint/load": "^11.0.0",
"@commitlint/types": "^11.0.0",
"chalk": "^4.0.0",
"lodash": "^4.17.19",
"throat": "^5.0.0",
Expand Down
4 changes: 3 additions & 1 deletion @commitlint/read/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@
"@commitlint/test": "^11.0.0",
"@commitlint/utils": "^11.0.0",
"@types/fs-extra": "^9.0.1",
"@types/git-raw-commits": "^2.0.0"
"@types/git-raw-commits": "^2.0.0",
"execa": "^5.0.0"
},
"dependencies": {
"@commitlint/top-level": "^11.0.0",
"@commitlint/types": "^11.0.0",
"fs-extra": "^9.0.0",
"git-raw-commits": "^2.0.0"
},
Expand Down
3 changes: 3 additions & 0 deletions @commitlint/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"email": "[email protected]"
},
"license": "MIT",
"dependencies": {
"chalk": "^4.0.0"
},
"devDependencies": {
"@commitlint/utils": "^11.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions @packages/test-environment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"license": "MIT",
"dependencies": {
"@types/tmp": "^0.2.0",
"jest-environment-node": "^26.6.2",
"tmp": "0.2.1"
},
"gitHead": "71f0194f33943954a8dac1c458be47e5049717cd"
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3033,14 +3033,6 @@ caseless@~0.12.0:
resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=

[email protected], chalk@^4.0.0, chalk@^4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1:
version "1.1.3"
resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
Expand Down Expand Up @@ -3069,6 +3061,14 @@ chalk@^3.0.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

chalk@^4.0.0, chalk@^4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

char-regex@^1.0.2:
version "1.0.2"
resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
Expand Down

0 comments on commit 66bfb8e

Please sign in to comment.