feat(linting): semantic commits and releases

This commit is contained in:
Alexander Shelepenok 2022-04-16 14:51:55 +00:00
parent 9e90f0a776
commit 872464bc13
8 changed files with 37670 additions and 163 deletions

4
.husky/commint-msg Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run lint:commit

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run lint:staged

4
.husky/pre-push Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run test

59
.releaserc Normal file
View File

@ -0,0 +1,59 @@
{
"branches": ["master"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{ "type": "chore", "release": "patch" },
{ "type": "chore", "scope": "release", "release": false },
{ "type": "refactor", "release": "patch" }
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "refactor",
"section": "Refactors"
},
{
"type": "revert",
"section": "Reverts"
}
]
}
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "npm version ${nextRelease.version} --no-git-tag-version --allow-same-version",
}
],
[
"@semantic-release/git",
{
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}

View File

@ -96,29 +96,29 @@ Development efforts are supported by the sponsors. I'm very grateful for their d
Thanks to these wonderful people!
[<img alt="vzhou842" src="https://avatars.githubusercontent.com/u/10209814?v=4&s=117" width="117">](https://github.com/vzhou842) |[<img alt="abisz" src="https://avatars.githubusercontent.com/u/7287780?v=4&s=117" width="117">](https://github.com/abisz) |[<img alt="remi-bruguier" src="https://avatars.githubusercontent.com/u/7031328?v=4&s=117" width="117">](https://github.com/remi-bruguier) |[<img alt="sparklesam" src="https://avatars.githubusercontent.com/u/10287995?v=4&s=117" width="117">](https://github.com/sparklesam) |[<img alt="vinnymac" src="https://avatars.githubusercontent.com/u/1832781?v=4&s=117" width="117">](https://github.com/vinnymac) |[<img alt="mariolopjr" src="https://avatars.githubusercontent.com/u/2067324?v=4&s=117" width="117">](https://github.com/mariolopjr) |
:---: |:---: |:---: |:---: |:---: |:---: |
[vzhou842](https://github.com/vzhou842) |[abisz](https://github.com/abisz) |[remi-bruguier](https://github.com/remi-bruguier) |[sparklesam](https://github.com/sparklesam) |[vinnymac](https://github.com/vinnymac) |[mariolopjr](https://github.com/mariolopjr) |
| [<img alt="vzhou842" src="https://avatars.githubusercontent.com/u/10209814?v=4&s=117" width="117">](https://github.com/vzhou842) | [<img alt="abisz" src="https://avatars.githubusercontent.com/u/7287780?v=4&s=117" width="117">](https://github.com/abisz) | [<img alt="remi-bruguier" src="https://avatars.githubusercontent.com/u/7031328?v=4&s=117" width="117">](https://github.com/remi-bruguier) | [<img alt="sparklesam" src="https://avatars.githubusercontent.com/u/10287995?v=4&s=117" width="117">](https://github.com/sparklesam) | [<img alt="vinnymac" src="https://avatars.githubusercontent.com/u/1832781?v=4&s=117" width="117">](https://github.com/vinnymac) | [<img alt="mariolopjr" src="https://avatars.githubusercontent.com/u/2067324?v=4&s=117" width="117">](https://github.com/mariolopjr) |
| :------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: |
| [vzhou842](https://github.com/vzhou842) | [abisz](https://github.com/abisz) | [remi-bruguier](https://github.com/remi-bruguier) | [sparklesam](https://github.com/sparklesam) | [vinnymac](https://github.com/vinnymac) | [mariolopjr](https://github.com/mariolopjr) |
[<img alt="ihororlovskyi" src="https://avatars.githubusercontent.com/u/7969737?v=4&s=117" width="117">](https://github.com/ihororlovskyi) |[<img alt="rtveitch" src="https://avatars.githubusercontent.com/u/25228001?v=4&s=117" width="117">](https://github.com/rtveitch) |[<img alt="timbroder" src="https://avatars.githubusercontent.com/u/121503?v=4&s=117" width="117">](https://github.com/timbroder) |[<img alt="yodahuang" src="https://avatars.githubusercontent.com/u/11242657?v=4&s=117" width="117">](https://github.com/yodahuang) |[<img alt="axelclark" src="https://avatars.githubusercontent.com/u/16856928?v=4&s=117" width="117">](https://github.com/axelclark) |[<img alt="tonyz0x0" src="https://avatars.githubusercontent.com/u/29159357?v=4&s=117" width="117">](https://github.com/tonyz0x0) |
:---: |:---: |:---: |:---: |:---: |:---: |
[ihororlovskyi](https://github.com/ihororlovskyi) |[rtveitch](https://github.com/rtveitch) |[timbroder](https://github.com/timbroder) |[yodahuang](https://github.com/yodahuang) |[axelclark](https://github.com/axelclark) |[tonyz0x0](https://github.com/tonyz0x0) |
| [<img alt="ihororlovskyi" src="https://avatars.githubusercontent.com/u/7969737?v=4&s=117" width="117">](https://github.com/ihororlovskyi) | [<img alt="rtveitch" src="https://avatars.githubusercontent.com/u/25228001?v=4&s=117" width="117">](https://github.com/rtveitch) | [<img alt="timbroder" src="https://avatars.githubusercontent.com/u/121503?v=4&s=117" width="117">](https://github.com/timbroder) | [<img alt="yodahuang" src="https://avatars.githubusercontent.com/u/11242657?v=4&s=117" width="117">](https://github.com/yodahuang) | [<img alt="axelclark" src="https://avatars.githubusercontent.com/u/16856928?v=4&s=117" width="117">](https://github.com/axelclark) | [<img alt="tonyz0x0" src="https://avatars.githubusercontent.com/u/29159357?v=4&s=117" width="117">](https://github.com/tonyz0x0) |
| :---------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: |
| [ihororlovskyi](https://github.com/ihororlovskyi) | [rtveitch](https://github.com/rtveitch) | [timbroder](https://github.com/timbroder) | [yodahuang](https://github.com/yodahuang) | [axelclark](https://github.com/axelclark) | [tonyz0x0](https://github.com/tonyz0x0) |
[<img alt="tranlehaiquan" src="https://avatars.githubusercontent.com/u/17347993?v=4&s=117" width="117">](https://github.com/tranlehaiquan) |[<img alt="seandearnaley" src="https://avatars.githubusercontent.com/u/5084762?v=4&s=117" width="117">](https://github.com/seandearnaley) |[<img alt="stigrune" src="https://avatars.githubusercontent.com/u/1052748?v=4&s=117" width="117">](https://github.com/stigrune) |[<img alt="ybbarng" src="https://avatars.githubusercontent.com/u/1793950?v=4&s=117" width="117">](https://github.com/ybbarng) |[<img alt="marktani" src="https://avatars.githubusercontent.com/u/1780597?v=4&s=117" width="117">](https://github.com/marktani) |[<img alt="concreted" src="https://avatars.githubusercontent.com/u/4016897?v=4&s=117" width="117">](https://github.com/concreted) |
:---: |:---: |:---: |:---: |:---: |:---: |
[tranlehaiquan](https://github.com/tranlehaiquan) |[seandearnaley](https://github.com/seandearnaley) |[stigrune](https://github.com/stigrune) |[ybbarng](https://github.com/ybbarng) |[marktani](https://github.com/marktani) |[concreted](https://github.com/concreted) |
| [<img alt="tranlehaiquan" src="https://avatars.githubusercontent.com/u/17347993?v=4&s=117" width="117">](https://github.com/tranlehaiquan) | [<img alt="seandearnaley" src="https://avatars.githubusercontent.com/u/5084762?v=4&s=117" width="117">](https://github.com/seandearnaley) | [<img alt="stigrune" src="https://avatars.githubusercontent.com/u/1052748?v=4&s=117" width="117">](https://github.com/stigrune) | [<img alt="ybbarng" src="https://avatars.githubusercontent.com/u/1793950?v=4&s=117" width="117">](https://github.com/ybbarng) | [<img alt="marktani" src="https://avatars.githubusercontent.com/u/1780597?v=4&s=117" width="117">](https://github.com/marktani) | [<img alt="concreted" src="https://avatars.githubusercontent.com/u/4016897?v=4&s=117" width="117">](https://github.com/concreted) |
| :----------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------: |
| [tranlehaiquan](https://github.com/tranlehaiquan) | [seandearnaley](https://github.com/seandearnaley) | [stigrune](https://github.com/stigrune) | [ybbarng](https://github.com/ybbarng) | [marktani](https://github.com/marktani) | [concreted](https://github.com/concreted) |
[<img alt="gipcompany" src="https://avatars.githubusercontent.com/u/130989?v=4&s=117" width="117">](https://github.com/gipcompany) |[<img alt="chmac" src="https://avatars.githubusercontent.com/u/690997?v=4&s=117" width="117">](https://github.com/chmac) |[<img alt="charandas" src="https://avatars.githubusercontent.com/u/542168?v=4&s=117" width="117">](https://github.com/charandas) |[<img alt="ibraheemdev" src="https://avatars.githubusercontent.com/u/34988408?v=4&s=117" width="117">](https://github.com/ibraheemdev) |[<img alt="sladinji" src="https://avatars.githubusercontent.com/u/8300799?v=4&s=117" width="117">](https://github.com/sladinji) |[<img alt="marcelabomfim" src="https://avatars.githubusercontent.com/u/6224547?v=4&s=117" width="117">](https://github.com/marcelabomfim) |
:---: |:---: |:---: |:---: |:---: |:---: |
[gipcompany](https://github.com/gipcompany) |[chmac](https://github.com/chmac) |[charandas](https://github.com/charandas) |[ibraheemdev](https://github.com/ibraheemdev) |[sladinji](https://github.com/sladinji) |[marcelabomfim](https://github.com/marcelabomfim) |
| [<img alt="gipcompany" src="https://avatars.githubusercontent.com/u/130989?v=4&s=117" width="117">](https://github.com/gipcompany) | [<img alt="chmac" src="https://avatars.githubusercontent.com/u/690997?v=4&s=117" width="117">](https://github.com/chmac) | [<img alt="charandas" src="https://avatars.githubusercontent.com/u/542168?v=4&s=117" width="117">](https://github.com/charandas) | [<img alt="ibraheemdev" src="https://avatars.githubusercontent.com/u/34988408?v=4&s=117" width="117">](https://github.com/ibraheemdev) | [<img alt="sladinji" src="https://avatars.githubusercontent.com/u/8300799?v=4&s=117" width="117">](https://github.com/sladinji) | [<img alt="marcelabomfim" src="https://avatars.githubusercontent.com/u/6224547?v=4&s=117" width="117">](https://github.com/marcelabomfim) |
| :--------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: |
| [gipcompany](https://github.com/gipcompany) | [chmac](https://github.com/chmac) | [charandas](https://github.com/charandas) | [ibraheemdev](https://github.com/ibraheemdev) | [sladinji](https://github.com/sladinji) | [marcelabomfim](https://github.com/marcelabomfim) |
[<img alt="zollillo" src="https://avatars.githubusercontent.com/u/8833904?v=4&s=117" width="117">](https://github.com/zollillo) |[<img alt="codejet" src="https://avatars.githubusercontent.com/u/802203?v=4&s=117" width="117">](https://github.com/codejet) |[<img alt="reed-jones" src="https://avatars.githubusercontent.com/u/11511864?v=4&s=117" width="117">](https://github.com/reed-jones) |[<img alt="SayakaOno" src="https://avatars.githubusercontent.com/u/33141219?v=4&s=117" width="117">](https://github.com/SayakaOno) |[<img alt="Puterism" src="https://avatars.githubusercontent.com/u/2542730?v=4&s=117" width="117">](https://github.com/Puterism) |[<img alt="swapnilmishra" src="https://avatars.githubusercontent.com/u/875450?v=4&s=117" width="117">](https://github.com/swapnilmishra) |
:---: |:---: |:---: |:---: |:---: |:---: |
[zollillo](https://github.com/zollillo) |[codejet](https://github.com/codejet) |[reed-jones](https://github.com/reed-jones) |[SayakaOno](https://github.com/SayakaOno) |[Puterism](https://github.com/Puterism) |[swapnilmishra](https://github.com/swapnilmishra) |
| [<img alt="zollillo" src="https://avatars.githubusercontent.com/u/8833904?v=4&s=117" width="117">](https://github.com/zollillo) | [<img alt="codejet" src="https://avatars.githubusercontent.com/u/802203?v=4&s=117" width="117">](https://github.com/codejet) | [<img alt="reed-jones" src="https://avatars.githubusercontent.com/u/11511864?v=4&s=117" width="117">](https://github.com/reed-jones) | [<img alt="SayakaOno" src="https://avatars.githubusercontent.com/u/33141219?v=4&s=117" width="117">](https://github.com/SayakaOno) | [<img alt="Puterism" src="https://avatars.githubusercontent.com/u/2542730?v=4&s=117" width="117">](https://github.com/Puterism) | [<img alt="swapnilmishra" src="https://avatars.githubusercontent.com/u/875450?v=4&s=117" width="117">](https://github.com/swapnilmishra) |
| :-----------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------: |
| [zollillo](https://github.com/zollillo) | [codejet](https://github.com/codejet) | [reed-jones](https://github.com/reed-jones) | [SayakaOno](https://github.com/SayakaOno) | [Puterism](https://github.com/Puterism) | [swapnilmishra](https://github.com/swapnilmishra) |
[<img alt="vvasiloud" src="https://avatars.githubusercontent.com/u/5891530?v=4&s=117" width="117">](https://github.com/vvasiloud) |[<img alt="lune-sta" src="https://avatars.githubusercontent.com/u/1887764?v=4&s=117" width="117">](https://github.com/lune-sta) |[<img alt="yaaooo" src="https://avatars.githubusercontent.com/u/16640310?v=4&s=117" width="117">](https://github.com/yaaooo) |[<img alt="vstoms" src="https://avatars.githubusercontent.com/u/22646173?v=4&s=117" width="117">](https://github.com/vstoms) |[<img alt="wichopy" src="https://avatars.githubusercontent.com/u/24414632?v=4&s=117" width="117">](https://github.com/wichopy) |[<img alt="yairmark" src="https://avatars.githubusercontent.com/u/28291977?v=4&s=117" width="117">](https://github.com/yairmark) |
:---: |:---: |:---: |:---: |:---: |:---: |
[vvasiloud](https://github.com/vvasiloud) |[lune-sta](https://github.com/lune-sta) |[yaaooo](https://github.com/yaaooo) |[vstoms](https://github.com/vstoms) |[wichopy](https://github.com/wichopy) |[yairmark](https://github.com/yairmark) |
| [<img alt="vvasiloud" src="https://avatars.githubusercontent.com/u/5891530?v=4&s=117" width="117">](https://github.com/vvasiloud) | [<img alt="lune-sta" src="https://avatars.githubusercontent.com/u/1887764?v=4&s=117" width="117">](https://github.com/lune-sta) | [<img alt="yaaooo" src="https://avatars.githubusercontent.com/u/16640310?v=4&s=117" width="117">](https://github.com/yaaooo) | [<img alt="vstoms" src="https://avatars.githubusercontent.com/u/22646173?v=4&s=117" width="117">](https://github.com/vstoms) | [<img alt="wichopy" src="https://avatars.githubusercontent.com/u/24414632?v=4&s=117" width="117">](https://github.com/wichopy) | [<img alt="yairmark" src="https://avatars.githubusercontent.com/u/28291977?v=4&s=117" width="117">](https://github.com/yairmark) |
| :-------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: |
| [vvasiloud](https://github.com/vvasiloud) | [lune-sta](https://github.com/lune-sta) | [yaaooo](https://github.com/yaaooo) | [vstoms](https://github.com/vstoms) | [wichopy](https://github.com/wichopy) | [yairmark](https://github.com/yairmark) |
## License

37693
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,14 +21,31 @@
"format:scss": "stylelint \"src/**/*.scss\" --fix",
"format:ts": "prettier --write .",
"lint": "npm run lint:ts && npm run lint:scss",
"lint:staged": "lint-staged",
"lint:commit": "commitlint --edit",
"lint:scss": "stylelint \"src/**/*.scss\"",
"lint:ts": "eslint \"src\" --ext .tsx,.ts && prettier --check .",
"start": "npm run clean && gatsby develop",
"prepare": "husky install",
"semantic-release": "semantic-release",
"serve": "gatsby serve",
"start": "npm run clean && gatsby develop",
"test": "jest --config ./internal/testing/jest-config.ts",
"test:coverage": "jest --coverage --config ./internal/testing/jest-config.ts",
"test:watch": "jest --watch --config ./internal/testing/jest-config.ts"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": {
"*.{tsx?,ts?}": [
"npm run format:ts"
],
"*.{css?,scss?}": [
"npm run format:scss"
]
},
"dependencies": {
"@sentry/gatsby": "^6.19.6",
"@sentry/tracing": "^6.19.6",
@ -65,7 +82,11 @@
},
"devDependencies": {
"@alxshelepenok/eslint-config": "^1.0.27",
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@jest/globals": "^27.5.1",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1",
"@swc/core": "^1.2.165",
"@swc/jest": "^0.2.20",
"@types/gatsby-transformer-remark": "^2.9.1",
@ -82,6 +103,7 @@
"browserslist": "^4.20.2",
"codecov": "^3.8.3",
"concurrently": "^7.1.0",
"conventional-changelog-conventionalcommits": "4.6.3",
"eslint": "^8.13.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
@ -93,10 +115,12 @@
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"husky": "7.0.4",
"identity-obj-proxy": "3.0.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"jest-svg-transformer": "^1.0.0",
"lint-staged": "^12.3.8",
"lost": "8.3.1",
"postcss": "^8.4.12",
"postcss-scss": "^4.0.3",
@ -105,6 +129,7 @@
"react-test-renderer": "^18.0.0",
"rimraf": "3.0.2",
"sass": "^1.50.0",
"semantic-release": "^19.0.2",
"source-map-support": "^0.5.21",
"stylelint": "^14.7.0",
"stylelint-config-recommended-scss": "^6.0.0",
@ -112,5 +137,8 @@
"stylelint-scss": "^4.2.0",
"ts-node": "^10.7.0",
"typescript": "^4.6.3"
},
"engines": {
"node": ">=14.15.0"
}
}

View File

@ -30,5 +30,6 @@
"labels": ["renovate"],
"prHourlyLimit": 4,
"prConcurrentLimit": 16,
"rangeStrategy": "bump"
"rangeStrategy": "bump",
"semanticCommits": "enabled"
}