Skip to content

Commit

Permalink
fix(linter): skip verifying deps of deps by default in package.json (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo authored Jul 13, 2023
1 parent da2674d commit ae773d5
Show file tree
Hide file tree
Showing 6 changed files with 739 additions and 133 deletions.
12 changes: 7 additions & 5 deletions e2e/linter/src/linter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,12 @@ describe('Linter', () => {
];
return json;
});
// Set this to false for now until the `@nx/js:lib` generator is updated to include ts/swc helpers by default.
// TODO(jack): Remove this once the above is addressed in another PR.
updateJson(`libs/${mylib}/tsconfig.lib.json`, (json) => {
json.compilerOptions.importHelpers = false;
return json;
});
updateJson(`libs/${mylib}/project.json`, (json) => {
json.targets.lint.options.lintFilePatterns = [
`libs/${mylib}/**/*.ts`,
Expand All @@ -465,8 +471,7 @@ describe('Linter', () => {
it('should report dependency check issues', () => {
const rootPackageJson = readJson('package.json');
const nxVersion = rootPackageJson.devDependencies.nx;
const swcCoreVersion = rootPackageJson.devDependencies['@swc/core'];
const swcHelpersVersion = rootPackageJson.dependencies['@swc/helpers'];
const tslibVersion = rootPackageJson.devDependencies['tslib'];

let out = runCLI(`lint ${mylib}`, { silenceError: true });
expect(out).toContain('All files pass linting');
Expand Down Expand Up @@ -495,9 +500,6 @@ describe('Linter', () => {
{
"dependencies": {
"@nx/devkit": "${nxVersion}",
"@swc/core": "${swcCoreVersion}",
"@swc/helpers": "${swcHelpersVersion}",
"nx": "${nxVersion}",
},
"name": "@proj/${mylib}",
"type": "commonjs",
Expand Down
Loading

1 comment on commit ae773d5

@vercel
Copy link

@vercel vercel bot commented on ae773d5 Jul 13, 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-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.