Skip to content

Commit

Permalink
fix(linter): add {options.outputFile} to outputs for inferred targets (
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry authored May 3, 2024
1 parent 7303b7a commit 84eb280
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions packages/eslint/src/plugins/plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ describe('@nx/eslint/plugin', () => {
"options": {
"cwd": ".",
},
"outputs": [
"{options.outputFile}",
],
},
},
},
Expand Down Expand Up @@ -178,6 +181,9 @@ describe('@nx/eslint/plugin', () => {
"options": {
"cwd": "apps/my-app",
},
"outputs": [
"{options.outputFile}",
],
},
},
},
Expand Down Expand Up @@ -216,6 +222,9 @@ describe('@nx/eslint/plugin', () => {
"options": {
"cwd": "apps/my-app",
},
"outputs": [
"{options.outputFile}",
],
},
},
},
Expand Down Expand Up @@ -326,6 +335,9 @@ describe('@nx/eslint/plugin', () => {
"options": {
"cwd": "apps/my-app",
},
"outputs": [
"{options.outputFile}",
],
},
},
},
Expand All @@ -348,6 +360,9 @@ describe('@nx/eslint/plugin', () => {
"options": {
"cwd": "libs/my-lib",
},
"outputs": [
"{options.outputFile}",
],
},
},
},
Expand Down Expand Up @@ -430,6 +445,9 @@ describe('@nx/eslint/plugin', () => {
"options": {
"cwd": "apps/my-app",
},
"outputs": [
"{options.outputFile}",
],
},
},
},
Expand All @@ -453,6 +471,9 @@ describe('@nx/eslint/plugin', () => {
"options": {
"cwd": "libs/my-lib",
},
"outputs": [
"{options.outputFile}",
],
},
},
},
Expand Down Expand Up @@ -493,6 +514,9 @@ describe('@nx/eslint/plugin', () => {
"options": {
"cwd": "apps/myapp",
},
"outputs": [
"{options.outputFile}",
],
},
},
},
Expand Down Expand Up @@ -538,6 +562,9 @@ describe('@nx/eslint/plugin', () => {
"options": {
"cwd": "apps/myapp/nested/mylib",
},
"outputs": [
"{options.outputFile}",
],
},
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/eslint/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ function buildEslintTargets(
'{workspaceRoot}/tools/eslint-rules/**/*',
{ externalDependencies: ['eslint'] },
],
outputs: ['{options.outputFile}'],
};
if (eslintConfigs.some((config) => isFlatConfig(config))) {
targetConfig.options.env = {
Expand Down

0 comments on commit 84eb280

Please sign in to comment.