Skip to content

Commit

Permalink
Fix lint-staged to only check staged plugin files
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed May 31, 2024
1 parent 368c247 commit f30541c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ module.exports = {
);

if ( pluginFiles.length ) {
// Note: The lint command has to be used directly because the plugin-specific lint command includes the entire plugin directory as an argument.
commands.push(
`composer lint:${ plugin } ${ joinFiles( pluginFiles ) }`
`composer lint -- --standard=./plugins/${ plugin }/phpcs.xml.dist ${ joinFiles(
pluginFiles
) }`
);
}
} );
Expand Down

0 comments on commit f30541c

Please sign in to comment.