mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
chore: add commitlint git hook
This commit is contained in:
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx commitlint --edit "\${1}"
|
||||||
3
AUTHORS
Normal file
3
AUTHORS
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Notesnook is written & maintained by:
|
||||||
|
- Abdullah Atta <abdullahatta@streetwriters.co>
|
||||||
|
- Ammar Ahmed <ammarahmed6506@gmail.com>
|
||||||
17
commitlint.config.js
Normal file
17
commitlint.config.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
|
|
||||||
|
const { execSync } = require("child_process");
|
||||||
|
const { readFileSync } = require("fs");
|
||||||
|
|
||||||
|
const authorEmail = execSync(`git show -s --format='%ae' HEAD`)
|
||||||
|
.toString("utf-8")
|
||||||
|
.trim();
|
||||||
|
|
||||||
|
const authors = readFileSync("AUTHORS", "utf-8");
|
||||||
|
const isAuthor = authors.includes(`<${authorEmail}>`);
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
rules: {
|
||||||
|
"signed-off-by": [isAuthor ? 0 : 2, "always", `Signed-off-by:`]
|
||||||
|
}
|
||||||
|
};
|
||||||
1035
package-lock.json
generated
1035
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
|||||||
"name": "notesnook",
|
"name": "notesnook",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"prepare": "husky install",
|
||||||
"bootstrap": "lerna bootstrap -- --legacy-peer-deps",
|
"bootstrap": "lerna bootstrap -- --legacy-peer-deps",
|
||||||
"build": "nx run-many --target=build --all --exclude=@notesnook/mobile,@notesnook/web",
|
"build": "nx run-many --target=build --all --exclude=@notesnook/mobile,@notesnook/web",
|
||||||
"build:web": "nx build @notesnook/web",
|
"build:web": "nx build @notesnook/web",
|
||||||
@@ -11,6 +12,8 @@
|
|||||||
"linc": "npx eslint ./apps/ ./packages/ --cache"
|
"linc": "npx eslint ./apps/ ./packages/ --cache"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@commitlint/cli": "^17.1.1",
|
||||||
|
"@types/node": "^18.7.13",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.35.1",
|
"@typescript-eslint/eslint-plugin": "^5.35.1",
|
||||||
"@typescript-eslint/parser": "^5.35.1",
|
"@typescript-eslint/parser": "^5.35.1",
|
||||||
"eslint": "^8.22.0",
|
"eslint": "^8.22.0",
|
||||||
@@ -21,6 +24,7 @@
|
|||||||
"eslint-plugin-react": "^7.31.0",
|
"eslint-plugin-react": "^7.31.0",
|
||||||
"eslint-plugin-react-native": "^4.0.0",
|
"eslint-plugin-react-native": "^4.0.0",
|
||||||
"eslint-plugin-unused-imports": "^2.0.0",
|
"eslint-plugin-unused-imports": "^2.0.0",
|
||||||
|
"husky": "^8.0.1",
|
||||||
"lerna": "^5.4.0",
|
"lerna": "^5.4.0",
|
||||||
"nx": "^14.5.4",
|
"nx": "^14.5.4",
|
||||||
"prettier": "^2.7.1"
|
"prettier": "^2.7.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user