Skip to content

Commit d7903a6

Browse files
committed
Merge branch 'release/1.0.14'
2 parents 8fece72 + 4e020f2 commit d7903a6

File tree

5 files changed

+216
-9
lines changed

5 files changed

+216
-9
lines changed

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm run lint:staged
5+
pnpm test

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.0.14] - 2023-08-11
6+
7+
### <!-- 08 -->Miscellaneous Tasks
8+
9+
- Bump prettier-plugin-tailwindcss from 0.4.1 to 0.5.1
10+
- Add `husky` for git hooks
11+
- Add husky install to `prepare` script in `package.json`
12+
- Add `pre-commit` hook to run tests
13+
- Add `lint-staged` to project dependencies
14+
- Add `lint-staged` to scripts in `package.json`
15+
- Add `lint-staged` config and update `pre-commit` hook
16+
517
## [1.0.13] - 2023-08-10
618

719
### <!-- 08 -->Miscellaneous Tasks

lint-staged.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const path = require('path')
2+
3+
const buildEslintCommand = (filenames) =>
4+
`next lint --fix --file ${filenames
5+
.map((f) => path.relative(process.cwd(), f))
6+
.join(' --file ')}`
7+
8+
module.exports = {
9+
'*.{js,jsx,ts,tsx}': [buildEslintCommand, 'prettier --write'],
10+
'*.{md,mdx}': ['prettier --write'],
11+
}

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-lingui-template",
3-
"version": "1.0.13",
3+
"version": "1.0.14",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
@@ -9,11 +9,13 @@
99
"prestart": "pnpm run build",
1010
"start": "serve out",
1111
"lint": "next lint",
12+
"lint:staged": "lint-staged",
1213
"lingui:extract": "lingui extract --clean",
1314
"lingui:compile": "lingui compile",
1415
"format": "prettier --log-level error --write .",
1516
"test": "jest",
16-
"preinstall": "pnpx typesync || :"
17+
"preinstall": "pnpx typesync || :",
18+
"prepare": "husky install"
1719
},
1820
"dependencies": {
1921
"@headlessui/react": "1.7.16",
@@ -48,12 +50,14 @@
4850
"eslint": "8.46.0",
4951
"eslint-config-next": "13.4.13",
5052
"eslint-config-prettier": "9.0.0",
53+
"husky": "8.0.3",
5154
"jest": "29.6.2",
5255
"jest-environment-jsdom": "29.6.2",
56+
"lint-staged": "13.2.3",
5357
"postcss": "8.4.27",
5458
"prettier": "3.0.1",
5559
"prettier-plugin-organize-imports": "3.2.3",
56-
"prettier-plugin-tailwindcss": "0.4.1",
60+
"prettier-plugin-tailwindcss": "0.5.1",
5761
"serve": "14.2.0",
5862
"tailwindcss": "3.3.3",
5963
"typescript": "5.1.6"

0 commit comments

Comments
 (0)