From bf4d73f4a5c92d6425478cc29a93722cc09c02e9 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Wed, 22 Nov 2017 10:55:37 -0700 Subject: [PATCH] feat: move order of doctoc and other things --- install.js | 1 - jest.js | 1 + package.json | 9 ++++++++- prettier.js | 1 + src/config/lintstagedrc.js | 10 +++++----- uninstall.js | 1 - 6 files changed, 15 insertions(+), 8 deletions(-) delete mode 100644 install.js create mode 100644 jest.js create mode 100644 prettier.js delete mode 100644 uninstall.js diff --git a/install.js b/install.js deleted file mode 100644 index 393fa981..00000000 --- a/install.js +++ /dev/null @@ -1 +0,0 @@ -require('husky/bin/install') diff --git a/jest.js b/jest.js new file mode 100644 index 00000000..3a1bd4e9 --- /dev/null +++ b/jest.js @@ -0,0 +1 @@ +module.exports = require('./dist/config/jest.config') diff --git a/package.json b/package.json index a1b3d930..1b16ea38 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,14 @@ "validate": "node src validate", "precommit": "node src precommit" }, - "files": ["dist", "babel.js", "eslint.js", "config.js"], + "files": [ + "dist", + "babel.js", + "eslint.js", + "config.js", + "prettier.js", + "jest.js" + ], "keywords": [], "author": "Kent C. Dodds (http://kentcdodds.com/)", "license": "MIT", diff --git a/prettier.js b/prettier.js new file mode 100644 index 00000000..de4ba09d --- /dev/null +++ b/prettier.js @@ -0,0 +1 @@ +module.exports = require('./dist/config/prettierrc') diff --git a/src/config/lintstagedrc.js b/src/config/lintstagedrc.js index ca3997e1..9289f53b 100644 --- a/src/config/lintstagedrc.js +++ b/src/config/lintstagedrc.js @@ -6,16 +6,16 @@ const doctoc = resolveBin('doctoc') module.exports = { concurrent: false, linters: { + 'README.md': [`${doctoc} --maxlevel 3 --notitle`, 'git add'], + '.all-contributorsrc': [ + `${kcdScripts} contributors generate`, + 'git add README.md', + ], '**/*.+(js|json|less|css|ts)': [ isOptedOut('autoformat', null, `${kcdScripts} format`), `${kcdScripts} lint`, `${kcdScripts} test --findRelatedTests`, isOptedOut('autoformat', null, 'git add'), ].filter(Boolean), - '.all-contributorsrc': [ - `${kcdScripts} contributors generate`, - 'git add README.md', - ], - 'README.md': [`${doctoc} --maxlevel 2 --notitle`, 'git add'], }, } diff --git a/uninstall.js b/uninstall.js deleted file mode 100644 index a0fcd915..00000000 --- a/uninstall.js +++ /dev/null @@ -1 +0,0 @@ -require('husky/bin/uninstall')