Skip to content

Commit

Permalink
feat(internal): set up husky/lint-staged (#4387)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachkirsch authored Aug 22, 2024
1 parent 6bd9d9a commit cd638aa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
10 changes: 3 additions & 7 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
module.exports = {
"**/*.ts{,x}": [
"eslint --fix --max-warnings 0 --no-eslintrc --config .eslintrc.lint-staged.js --ignore-path .eslintignore",
"yarn format:fix",
],
"**/*.{js,json,yml,html,css,less,scss,md}": "yarn format",
"**": () => "yarn lint:monorepo",
"**/package.json": () => "yarn install --immutable",
"**/*.ts{,x}": "eslint --fix --max-warnings 0 --no-eslintrc --config .eslintrc.lint-staged.js --ignore-path .eslintignore",
"**/*.{ts,js,json,yaml,html,css,less,scss,md}": "pnpm format",
"**/package.json": () => "pnpm install --frozen-lockfile",
};
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"ir:generate": "pnpm --filter @fern-api/ir-sdk generate",
"openapi-ir:generate": "pnpm --filter @fern-api/openapi-ir-sdk generate",
"seed-config:generate": "pnpm --filter @fern-api/seed-cli generate",
"docs-config:generate": "pnpm --filter @fern-api/configuration generate"
"docs-config:generate": "pnpm --filter @fern-api/configuration generate",
"prepare": "husky"
},
"devDependencies": {
"@babel/core": "^7.23.2",
Expand All @@ -64,10 +65,10 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tailwindcss": "^3.15.1",
"execa": "^5.1.1",
"husky": "^9.1.5",
"immer": "^9.0.15",
"is-ci": "^3.0.1",
"jest": "^29.7.0",
"ts-jest": "^29.2.4",
"jsonc-parser": "~3.3.0",
"lint-staged": "^13.0.3",
"lodash-es": "^4.17.21",
Expand All @@ -78,6 +79,7 @@
"stylelint-config-prettier-scss": "^0.0.1",
"stylelint-config-standard-scss": "^5.0.0",
"tailwindcss": "^3.3.2",
"ts-jest": "^29.2.4",
"ts-node": "^10.9.2",
"typescript": "4.6.4"
},
Expand All @@ -98,4 +100,4 @@
"import-local": "^3.2.0",
"terminal-link": "^3.0.0"
}
}
}
12 changes: 10 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cd638aa

Please sign in to comment.