mirror of
https://github.com/facebook/react.git
synced 2026-02-23 20:23:02 +00:00
Allow running yarn lint on subset of paths (#34646)
This commit is contained in:
committed by
GitHub
parent
ba2214e571
commit
e6f2a8a376
@@ -16,9 +16,9 @@ async function main() {
|
||||
console.log('Hint: run `yarn linc` to only lint changed files.');
|
||||
}
|
||||
|
||||
const {_, ...cliOptions} = minimist(process.argv.slice(2));
|
||||
const {_: paths, ...cliOptions} = minimist(process.argv.slice(2));
|
||||
|
||||
if (await runESLint({onlyChanged: false, ...cliOptions})) {
|
||||
if (await runESLint({onlyChanged: false, ...cliOptions, paths})) {
|
||||
console.log('Lint passed.');
|
||||
} else {
|
||||
console.log('Lint failed.');
|
||||
|
||||
Reference in New Issue
Block a user