Skip to content

Commit 84eb280

Browse files
authored
fix(linter): add {options.outputFile} to outputs for inferred targets (#23173)
1 parent 7303b7a commit 84eb280

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

packages/eslint/src/plugins/plugin.spec.ts

+27
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ describe('@nx/eslint/plugin', () => {
109109
"options": {
110110
"cwd": ".",
111111
},
112+
"outputs": [
113+
"{options.outputFile}",
114+
],
112115
},
113116
},
114117
},
@@ -178,6 +181,9 @@ describe('@nx/eslint/plugin', () => {
178181
"options": {
179182
"cwd": "apps/my-app",
180183
},
184+
"outputs": [
185+
"{options.outputFile}",
186+
],
181187
},
182188
},
183189
},
@@ -216,6 +222,9 @@ describe('@nx/eslint/plugin', () => {
216222
"options": {
217223
"cwd": "apps/my-app",
218224
},
225+
"outputs": [
226+
"{options.outputFile}",
227+
],
219228
},
220229
},
221230
},
@@ -326,6 +335,9 @@ describe('@nx/eslint/plugin', () => {
326335
"options": {
327336
"cwd": "apps/my-app",
328337
},
338+
"outputs": [
339+
"{options.outputFile}",
340+
],
329341
},
330342
},
331343
},
@@ -348,6 +360,9 @@ describe('@nx/eslint/plugin', () => {
348360
"options": {
349361
"cwd": "libs/my-lib",
350362
},
363+
"outputs": [
364+
"{options.outputFile}",
365+
],
351366
},
352367
},
353368
},
@@ -430,6 +445,9 @@ describe('@nx/eslint/plugin', () => {
430445
"options": {
431446
"cwd": "apps/my-app",
432447
},
448+
"outputs": [
449+
"{options.outputFile}",
450+
],
433451
},
434452
},
435453
},
@@ -453,6 +471,9 @@ describe('@nx/eslint/plugin', () => {
453471
"options": {
454472
"cwd": "libs/my-lib",
455473
},
474+
"outputs": [
475+
"{options.outputFile}",
476+
],
456477
},
457478
},
458479
},
@@ -493,6 +514,9 @@ describe('@nx/eslint/plugin', () => {
493514
"options": {
494515
"cwd": "apps/myapp",
495516
},
517+
"outputs": [
518+
"{options.outputFile}",
519+
],
496520
},
497521
},
498522
},
@@ -538,6 +562,9 @@ describe('@nx/eslint/plugin', () => {
538562
"options": {
539563
"cwd": "apps/myapp/nested/mylib",
540564
},
565+
"outputs": [
566+
"{options.outputFile}",
567+
],
541568
},
542569
},
543570
},

packages/eslint/src/plugins/plugin.ts

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ function buildEslintTargets(
187187
'{workspaceRoot}/tools/eslint-rules/**/*',
188188
{ externalDependencies: ['eslint'] },
189189
],
190+
outputs: ['{options.outputFile}'],
190191
};
191192
if (eslintConfigs.some((config) => isFlatConfig(config))) {
192193
targetConfig.options.env = {

0 commit comments

Comments
 (0)