This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renamed rule to require-dependencies-declared-at-appropriate-level
- Loading branch information
Showing
11 changed files
with
101 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/package-json-lint/src/rules/dev-dependency-set.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"devDependencySet": [ | ||
"@babel/cli", | ||
"@babel/core", | ||
"@babel/helpers", | ||
"@babel/plugin-proposal-object-rest-spread", | ||
"@babel/plugin-syntax-async-generators", | ||
"@babel/plugin-transform-object-assign", | ||
"@babel/plugin-transform-regenerator", | ||
"@babel/plugin-transform-runtime", | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
"@babel/register", | ||
"@cerner/browserslist-config-terra", | ||
"@cerner/eslint-config-terra", | ||
"@cerner/jest-config-terra", | ||
"@cerner/stylelint-config-terra", | ||
"@cerner/terra-aggregate-translations", | ||
"@cerner/terra-cli", | ||
"@cerner/terra-dev-site", | ||
"@cerner/terra-functional-testing", | ||
"@cerner/terra-open-source-scripts", | ||
"@cerner/webpack-config-terra", | ||
"jest" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
const requireThemeContextVersions = require('./require-theme-context-versions'); | ||
const requireNoTerraBasePeerDependencyVersions = require('./require-no-terra-base-peer-dependency-versions'); | ||
const requireNoUnnecessaryDependency = require('./require-no-unnecessary-dependency'); | ||
const requireDependenciesDeclaredAtAppropriateLevel = require('./require-dependencies-declared-at-appropriate-level'); | ||
const requireNoHardCodedDependencyVersions = require('./require-no-hard-coded-dependency-versions'); | ||
|
||
module.exports = { | ||
'require-dependencies-declared-at-appropriate-level': requireDependenciesDeclaredAtAppropriateLevel, | ||
'require-no-hard-coded-dependency-versions': requireNoHardCodedDependencyVersions, | ||
'require-no-terra-base-peer-dependency-versions': requireNoTerraBasePeerDependencyVersions, | ||
'require-no-unnecessary-dependency': requireNoUnnecessaryDependency, | ||
'require-theme-context-versions': requireThemeContextVersions, | ||
'require-no-hard-coded-dependency-versions': requireNoHardCodedDependencyVersions, | ||
}; |
63 changes: 2 additions & 61 deletions
63
...ules/require-no-unnecessary-dependency.js → ...ndencies-declared-at-appropriate-level.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
.../jest/rules/__snapshots__/require-dependencies-declared-at-appropriate-level.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is application fails as a warning when there unnecessary dependencies/peerDependencies 1`] = ` | ||
Array [ | ||
Object { | ||
"lintId": "require-dependencies-declared-at-appropriate-level", | ||
"lintMessage": "This project has unnecessary dependencies that violates the require-dependencies-declared-at-appropriate-level rule: | ||
@cerner/webpack-config-terra@^2.0.0 does not satisfy requirement for require-dependencies-declared-at-appropriate-level rule.", | ||
"projectType": "application", | ||
"severity": Object { | ||
"severityType": "warn", | ||
}, | ||
}, | ||
Object { | ||
"lintId": "require-dependencies-declared-at-appropriate-level", | ||
"lintMessage": "This project has unnecessary peerDependencies that violates the require-dependencies-declared-at-appropriate-level rule: | ||
jest@^26.6.2 does not satisfy requirement for require-dependencies-declared-at-appropriate-level rule.", | ||
"projectType": "application", | ||
"severity": Object { | ||
"severityType": "warn", | ||
}, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is application succeeds when there are no unnecessary dependencies/peerDependencies 1`] = `Array []`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is application succeeds when unnecessary dependencies/peerDependencies are passed in the allowList 1`] = `Array []`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is devModule succeeds when there no unnecessary dependencies/peerDependencies 1`] = `Array []`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is devModule succeeds when there unnecessary dependencies/peerDependencies 1`] = `Array []`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is module fails as a warning when there unnecessary dependencies/peerDependencies 1`] = ` | ||
Array [ | ||
Object { | ||
"lintId": "require-dependencies-declared-at-appropriate-level", | ||
"lintMessage": "This project has unnecessary peerDependencies that violates the require-dependencies-declared-at-appropriate-level rule: | ||
jest@^26.6.2 does not satisfy requirement for require-dependencies-declared-at-appropriate-level rule.", | ||
"projectType": "module", | ||
"severity": Object { | ||
"severityType": "warn", | ||
}, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is module succeeds when there are no unnecessary dependencies/peerDependencies 1`] = `Array []`; |
57 changes: 0 additions & 57 deletions
57
...e-json-lint/tests/jest/rules/__snapshots__/require-no-unnecessary-dependency.test.js.snap
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters