Skip to content

Commit

Permalink
fix(plugin): move lintFileGlob to command
Browse files Browse the repository at this point in the history
move lintFileGlob to TargetConfigurations command so that args can be used in targetDefaults
  • Loading branch information
Phillip9587 committed Apr 15, 2024
1 parent af61a5f commit 91e6016
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions nx-stylelint/src/plugins/plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('nx-stylelint/plugin', () => {
"targets": {
"stylelint": {
"cache": true,
"command": "stylelint",
"command": "stylelint "**/*.css"",
"inputs": [
"default",
"^default",
Expand All @@ -83,9 +83,6 @@ describe('nx-stylelint/plugin', () => {
},
],
"options": {
"args": [
""**/*.css"",
],
"cwd": "apps/my-app",
},
},
Expand Down
3 changes: 1 addition & 2 deletions nx-stylelint/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@ async function buildStylelintTargets(

return {
[options.targetName]: {
command: `stylelint`,
command: `stylelint "${getLintFileGlob(options.extensions)}"`,
cache: true,
options: {
cwd: projectRoot,
args: [`"${getLintFileGlob(options.extensions)}"`],
},
inputs: [
'default',
Expand Down

0 comments on commit 91e6016

Please sign in to comment.