chore: add lint-staged and husky
This commit is contained in:
parent
edd662ce44
commit
90de51914d
1
.commitlintrc.json
Normal file
1
.commitlintrc.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": ["@commitlint/config-conventional"] }
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -37,6 +37,7 @@ yarn-error.*
|
||||
|
||||
# tests
|
||||
coverage/
|
||||
junit.xml
|
||||
|
||||
# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
|
||||
# The following patterns were generated by expo-cli
|
||||
|
3
.husky/commit-msg
Executable file
3
.husky/commit-msg
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
npm run lint:commit -- --edit
|
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
npm run lint:staged
|
||||
npm run lint:typescript
|
4
.lintstagedrc.json
Normal file
4
.lintstagedrc.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"**/*": ["prettier --write --ignore-unknown"],
|
||||
"**/*.{js,jsx,ts,tsx}": ["eslint --fix --report-unused-disable-directives"]
|
||||
}
|
@ -22,7 +22,7 @@ exports[`<HomePage /> renders correctly 1`] = `
|
||||
style={
|
||||
{
|
||||
"color": "#006CFF",
|
||||
"fontFamily": "Georama",
|
||||
"fontFamily": "Canterbury",
|
||||
"fontSize": 36,
|
||||
"marginVertical": 20,
|
||||
}
|
||||
|
1946
package-lock.json
generated
1946
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -8,10 +8,13 @@
|
||||
"android": "expo start --android",
|
||||
"ios": "expo start --ios",
|
||||
"web": "expo start --web",
|
||||
"lint:commit": "commitlint",
|
||||
"lint:prettier": "prettier . --check",
|
||||
"lint:eslint": "eslint . --max-warnings 0 --report-unused-disable-directives --ignore-path .gitignore",
|
||||
"lint:typescript": "tsc --noEmit",
|
||||
"test": "jest"
|
||||
"lint:staged": "lint-staged",
|
||||
"test": "jest --coverage --reporters=default --reporters=jest-junit",
|
||||
"postinstall": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/vector-icons": "14.0.0",
|
||||
@ -34,6 +37,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.23.9",
|
||||
"@commitlint/cli": "18.6.1",
|
||||
"@commitlint/config-conventional": "18.6.2",
|
||||
"@testing-library/react-native": "12.4.3",
|
||||
"@total-typescript/ts-reset": "0.5.1",
|
||||
"@tsconfig/strictest": "2.0.3",
|
||||
@ -52,8 +57,11 @@
|
||||
"eslint-plugin-react-hooks": "4.6.0",
|
||||
"eslint-plugin-react-native": "4.1.0",
|
||||
"eslint-plugin-unicorn": "51.0.1",
|
||||
"husky": "9.0.11",
|
||||
"jest": "29.7.0",
|
||||
"jest-expo": "50.0.2",
|
||||
"jest-junit": "16.0.0",
|
||||
"lint-staged": "15.2.2",
|
||||
"react-test-renderer": "18.2.0",
|
||||
"typescript": "5.3.3"
|
||||
}
|
||||
|
Reference in New Issue
Block a user