chore: Move i18n generation, pre-commit hooks (#3410)

This commit is contained in:
Tom Moor
2022-04-17 13:29:08 -07:00
committed by GitHub
parent b10802a0aa
commit 1b913054e8
7 changed files with 297 additions and 60 deletions

12
lint-staged.config.mjs Normal file
View File

@@ -0,0 +1,12 @@
export default {
// Efficiently run prettier and translation updates on changes to JS and
// TypeScript files
"**/*.[tj]s?(x)": [
(f) => (f.length > 20 ? `yarn lint --fix` : `eslint ${f.join(" ")} --fix`),
() => `yarn build:i18n`,
() => "git add shared/i18n/locales/en_US/translation.json",
],
// Automatically de-duplicate packages as yarn is terrible at it
"(yarn.lock|package.json)": () => `yarn yarn-deduplicate yarn.lock`,
};