- This allows us to quickly run this for specific
file paths
- Also updates previous references (i.e. CI) to
add "."
- Also removes lefthook reference to
`yarn run internal...`
- Also adds `:all` and `:all:fix` scripts
We are currently overloading the `eslint` command with our custom eslint
logic. Unfortunately this causes us to run `eslint` on all js/vue files
and makes it hard to run custom eslint commands. One has to resort to
running e.g. `node_modules/.bin/eslint` directly.
In an effort to consolidate the situation we are renaming the commands
(borrowing from our rake syntax) as follows:
- `eslint` => `lint:eslint`
- `eslint-fix` => `lint:eslint:fix`
- `eslint-staged` => `lint:eslint:staged`
- `eslint-staged-fix` => `lint:eslint:staged:fix`
- `eslint-report` => `lint:eslint:report`
All but the `eslint` command have been replaced with a command that
errors out immediately and hints folks to the new command.
- This adds a configuration file for Lefthook which is more flexible
and powerful than Overcommit.
- The only downside is that if gather the diff between `origin/master`
and `HEAD` so if you didn't fetch `origin/master` for a long time,
the checks might be done on more files than the one that you updated.
- Also, that means you need a origin remote.
Signed-off-by: Rémy Coutable <remy@rymai.me>