UNPKG

431 BJavaScriptView Raw
1// This file is referenced in src/commands/lint.tsx, where it is passed to the
2// lint-staged function. It needs a file path, that it then tries to load.
3const newLintCommand = process.argv.filter(a => a !== '--staged').join(' ');
4
5const commands = [newLintCommand];
6
7if (newLintCommand.includes('--fix') || newLintCommand.includes('-f')) {
8 commands.push('git add');
9}
10
11module.exports = {
12 linters: {
13 '*': commands,
14 },
15};