-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fc7dd8
commit 26875df
Showing
3 changed files
with
96 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { exec } from 'child_process'; | ||
|
||
exec('node scripts/markdown-js-snippets-linter.mjs "main/**/*.md" && prettier --check "**/*.md" --config .prettierrc.json', (err, stdout, stderr) => { | ||
if (err) { | ||
const modifiedStderr = stderr.replace( | ||
'Run Prettier with --write to fix', | ||
'Run `yarn format` to fix' | ||
); | ||
console.warn(modifiedStderr); | ||
process.exit(1); | ||
} | ||
}); | ||
exec( | ||
'node scripts/markdown-js-snippets-linter.mjs "main/**/*.md" && prettier --check "**/*.md" --config .prettierrc.json', | ||
(err, stdout, stderr) => { | ||
if (err) { | ||
const modifiedStderr = stderr.replace( | ||
'Run Prettier with --write to fix', | ||
'Run `yarn format` to fix', | ||
); | ||
console.warn(modifiedStderr); | ||
process.exit(1); | ||
} | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters