diff --git a/.eslintignore b/.eslintignore index 3c3629e647..63750422dd 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ node_modules +deploy \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 0be733b75e..a144b556ba 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "root": true, - "ignorePatterns": ["**/*"], + "ignorePatterns": ["**/*", "deploy/**/*"], "plugins": ["@nx"], "overrides": [ { diff --git a/nx.json b/nx.json index 5ff4d7a666..bab1b1ea09 100644 --- a/nx.json +++ b/nx.json @@ -35,6 +35,11 @@ "@nx/eslint:lint": { "inputs": ["default", "{workspaceRoot}/.eslintrc.json"], "cache": true + }, + "@nx/js:tsc": { + "cache": true, + "dependsOn": ["^build"], + "inputs": ["production", "^production"] } }, "namedInputs": { diff --git a/packages/cli/src/lib/commands/create-piece.ts b/packages/cli/src/lib/commands/create-piece.ts index 2774a8d70a..da567c792d 100644 --- a/packages/cli/src/lib/commands/create-piece.ts +++ b/packages/cli/src/lib/commands/create-piece.ts @@ -127,18 +127,19 @@ const updateProjectJsonConfig = async ( projectJson.targets.build.options.updateBuildableProjectDepsInPackageJson = true; - if (projectJson.targets.lint) { - const lintFilePatterns = projectJson.targets.lint.options.lintFilePatterns; + const lintFilePatterns = projectJson.targets.lint?.options?.lintFilePatterns; + + if (lintFilePatterns) { const patternIndex = lintFilePatterns.findIndex((item) => item.endsWith('package.json') ); if (patternIndex !== -1) lintFilePatterns?.splice(patternIndex, 1); } else { - projectJson.targets.lint = { - executor: '@nx/eslint:lint', - outputs: ['{options.outputFile}'], - }; - } + projectJson.targets.lint = { + executor: '@nx/eslint:lint', + outputs: ['{options.outputFile}'], + }; +} await writeProjectJson( `packages/pieces/${pieceType}/${pieceName}`,