1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 19:01:54 +02:00

Add syntax highlighting example to menu

This commit is contained in:
Sunny Hirai
2021-07-01 17:10:35 -07:00
parent ea5e3e4ebf
commit 506d9bce53
4 changed files with 20 additions and 1 deletions

16
.lintstagedrc.js Normal file
View File

@@ -0,0 +1,16 @@
const escape = require('shell-quote').quote
/**
* Need this to fix a bug where we can't commit `pages/examples/[example].tsx`
*
* <https://github.com/okonet/lint-staged/issues/676#issuecomment-574764713>
*/
module.exports = {
'*.{ts,tsx,js,json,css}': filenames => [
...filenames.map(filename => `prettier --check "${escape([filename])}"`),
...filenames.map(filename => `git add "${filename}"`),
],
'*.{ts,tsx,js}': ['eslint'],
'*.{ts,tsx,css}': ['stylelint'],
}