Skip to content

Commit

Permalink
fix(linter): fix messages on deps checks (#18484)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Aug 4, 2023
1 parent bdbc111 commit 3565643
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions packages/eslint-plugin/src/rules/dependency-checks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ describe('Dependency checks (eslint)', () => {
);
expect(failures.length).toEqual(1);
expect(failures[0].message).toMatchInlineSnapshot(`
"The "liba" uses the following packages, but they are missing from the "dependencies":
"The "liba" project uses the following packages, but they are missing from the "dependencies":
- external2"
`);
expect(failures[0].line).toEqual(3);
Expand Down Expand Up @@ -805,7 +805,7 @@ describe('Dependency checks (eslint)', () => {
);
expect(failures.length).toEqual(1);
expect(failures[0].message).toMatchInlineSnapshot(
`"The "unneeded" package is not used by "liba"."`
`"The "unneeded" package is not used by "liba" project."`
);
expect(failures[0].line).toEqual(7);

Expand Down Expand Up @@ -884,7 +884,7 @@ describe('Dependency checks (eslint)', () => {
);
expect(failures.length).toEqual(1);
expect(failures[0].message).toMatchInlineSnapshot(
`"The "unneeded" package is not used by "liba"."`
`"The "unneeded" package is not used by "liba" project."`
);
expect(failures[0].line).toEqual(5);

Expand Down Expand Up @@ -963,7 +963,7 @@ describe('Dependency checks (eslint)', () => {
);
expect(failures.length).toEqual(1);
expect(failures[0].message).toMatchInlineSnapshot(
`"The "unneeded" package is not used by "liba"."`
`"The "unneeded" package is not used by "liba" project."`
);
expect(failures[0].line).toEqual(4);

Expand Down Expand Up @@ -1042,7 +1042,7 @@ describe('Dependency checks (eslint)', () => {
);
expect(failures.length).toEqual(1);
expect(failures[0].message).toMatchInlineSnapshot(
`"The "unneeded" package is not used by "liba"."`
`"The "unneeded" package is not used by "liba" project."`
);

// should apply fixer
Expand Down Expand Up @@ -1462,7 +1462,7 @@ describe('Dependency checks (eslint)', () => {
);
expect(failures.length).toEqual(1);
expect(failures[0].message).toMatchInlineSnapshot(`
"The "liba" uses the following packages, but they are missing from the "dependencies":
"The "liba" project uses the following packages, but they are missing from the "dependencies":
- tslib"
`);
expect(failures[0].line).toEqual(3);
Expand Down Expand Up @@ -1525,7 +1525,7 @@ it('should require swc if @nx/js:swc executor', () => {
);
expect(failures.length).toEqual(1);
expect(failures[0].message).toMatchInlineSnapshot(`
"The "liba" uses the following packages, but they are missing from the "dependencies":
"The "liba" project uses the following packages, but they are missing from the "dependencies":
- @swc/helpers"
`);
expect(failures[0].line).toEqual(3);
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin/src/rules/dependency-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export default createESLintRule<Options, MessageIds>({
},
],
messages: {
missingDependency: `The "{{projectName}}" uses the following packages, but they are missing from the "{{section}}":{{packageNames}}`,
obsoleteDependency: `The "{{packageName}}" package is not used by "{{projectName}}".`,
missingDependency: `The "{{projectName}}" project uses the following packages, but they are missing from the "{{section}}":{{packageNames}}`,
obsoleteDependency: `The "{{packageName}}" package is not used by "{{projectName}}" project.`,
versionMismatch: `The version specifier does not contain the installed version of "{{packageName}}" package: {{version}}.`,
missingDependencySection: `Dependency sections are missing from the "package.json" but following dependencies were detected:{{dependencies}}`,
},
Expand Down

1 comment on commit 3565643

@vercel
Copy link

@vercel vercel bot commented on 3565643 Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.