From 7ccdb8f9a0fb373e2511e485c6f6d65b60acb9d4 Mon Sep 17 00:00:00 2001 From: divlo Date: Sun, 14 Feb 2021 19:28:15 +0100 Subject: [PATCH] chore: general improvements of config files --- .commitlintrc.json | 1 + .github/ISSUE_TEMPLATE/BUG.md | 1 + .github/ISSUE_TEMPLATE/DOCUMENTATION.md | 14 ++++++++------ .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 7 ++++--- .github/ISSUE_TEMPLATE/IMPROVEMENT.md | 17 ++++++++++------- .github/ISSUE_TEMPLATE/QUESTION.md | 1 + .github/PULL_REQUEST_TEMPLATE.md | 17 +++-------------- .github/workflows/commitlint.yml | 2 +- .github/workflows/nodejs.yml | 8 +++++--- .husky/pre-commit | 1 + .markdownlint.json | 7 +++++++ .yarnrc | 2 +- commitlint.config.js | 1 - package.json | 12 +++++++++--- 14 files changed, 52 insertions(+), 39 deletions(-) create mode 100644 .commitlintrc.json create mode 100644 .markdownlint.json delete mode 100644 commitlint.config.js diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 0000000..d3d7f0c --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1 @@ +{ "extends": ["@commitlint/config-conventional"] } diff --git a/.github/ISSUE_TEMPLATE/BUG.md b/.github/ISSUE_TEMPLATE/BUG.md index 5e562d9..e1fc7e7 100644 --- a/.github/ISSUE_TEMPLATE/BUG.md +++ b/.github/ISSUE_TEMPLATE/BUG.md @@ -1,6 +1,7 @@ --- name: '🐛 Bug Report' about: 'Report an unexpected problem or unintended behavior.' +title: '[Bug]' labels: 'bug' --- diff --git a/.github/ISSUE_TEMPLATE/DOCUMENTATION.md b/.github/ISSUE_TEMPLATE/DOCUMENTATION.md index 4405fb7..68659e3 100644 --- a/.github/ISSUE_TEMPLATE/DOCUMENTATION.md +++ b/.github/ISSUE_TEMPLATE/DOCUMENTATION.md @@ -1,6 +1,7 @@ --- name: '📜 Documentation' about: 'Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...).' +title: '[Documentation]' labels: 'documentation' --- @@ -10,11 +11,12 @@ Please make sure your issue has not already been fixed. Please place an x (no spaces - [x]) in all [ ] that apply. --> -### Documentation : +## Documentation -- [ ] Is Missing -- [ ] Is Confusing -- [ ] Has Typo errors -- [ ] Not Sure? + -### Proposal + + + + +## Proposal diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md index e41c331..3307418 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -1,19 +1,20 @@ --- name: '✨ Feature Request' about: 'Suggest a new feature idea.' +title: '[Feature]' labels: 'feature request' --- -### Description +## Description -### Describe the solution you'd like +## Describe the solution you'd like -### Describe alternatives you've considered +## Describe alternatives you've considered diff --git a/.github/ISSUE_TEMPLATE/IMPROVEMENT.md b/.github/ISSUE_TEMPLATE/IMPROVEMENT.md index cec5b46..26bfcf3 100644 --- a/.github/ISSUE_TEMPLATE/IMPROVEMENT.md +++ b/.github/ISSUE_TEMPLATE/IMPROVEMENT.md @@ -1,6 +1,7 @@ --- name: '🔧 Improvement' about: 'Improve structure/format/performance/refactor/tests of the code.' +title: '[Improvement]' labels: 'improvement' --- @@ -10,12 +11,14 @@ Please make sure your issue has not already been fixed. Please place an x (no spaces - [x]) in all [ ] that apply. --> -### Type of Improvement : +## Type of Improvement -- [ ] Files and Folders Structure -- [ ] Performance -- [ ] Refactoring code -- [ ] Tests -- [ ] Not Sure? + -### Proposal + + + + + + +## Proposal diff --git a/.github/ISSUE_TEMPLATE/QUESTION.md b/.github/ISSUE_TEMPLATE/QUESTION.md index a0945ea..c18eaa3 100644 --- a/.github/ISSUE_TEMPLATE/QUESTION.md +++ b/.github/ISSUE_TEMPLATE/QUESTION.md @@ -1,6 +1,7 @@ --- name: '🙋 Question' about: 'Further information is requested.' +title: '[Question]' labels: 'question' --- diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b29d07e..d359135 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -9,19 +9,8 @@ Please place an x (no spaces - [x]) in all [ ] that apply. --> -### What type of change does this PR introduce? +## What changes this PR introduce? -- [ ] Bugfix -- [ ] Feature -- [ ] Refactor -- [ ] Documentation -- [ ] Not Sure? +## List any relevant issue numbers -### Does this PR introduce breaking changes? - -- [ ] Yes -- [ ] No - -### List any relevant issue numbers: - -### Description: +## Is there anything you'd like reviewers to focus on? diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 4d92cc6..3322115 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -12,7 +12,7 @@ on: jobs: commitlint: if: ${{ (github.event_name == 'push') || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved' && (github.event.review.author_association == 'COLLABORATOR' || github.event.review.author_association == 'MEMBER' || github.event.review.author_association == 'OWNER') && !github.event.pull_request.draft && github.event.pull_request.state == 'open') }} - runs-on: ubuntu-latest + runs-on: 'ubuntu-latest' steps: - uses: 'actions/checkout@v2' with: diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 4c64671..2716a4b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -12,7 +12,7 @@ on: jobs: ci_app: if: ${{ (github.event_name == 'push') || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved' && (github.event.review.author_association == 'COLLABORATOR' || github.event.review.author_association == 'MEMBER' || github.event.review.author_association == 'OWNER') && !github.event.pull_request.draft && github.event.pull_request.state == 'open') }} - runs-on: ubuntu-latest + runs-on: 'ubuntu-latest' strategy: matrix: node-version: [14.x] @@ -27,8 +27,7 @@ jobs: - name: 'Cache dependencies' uses: 'actions/cache@v2.1.4' with: - path: | - **/node_modules + path: '**/node_modules' key: ${{ runner.os }}-${{ hashFiles('**/package.json') }} - name: 'Install dependencies' @@ -37,6 +36,9 @@ jobs: - name: 'Lint' run: 'npm run lint' + - name: 'MarkdownLint' + run: 'npm run markdownlint' + - name: 'Build' run: 'npm run build' diff --git a/.husky/pre-commit b/.husky/pre-commit index 20d0d06..8d8e8b3 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,3 +2,4 @@ . "$(dirname "$0")/_/husky.sh" npm run lint +npm run markdownlint diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..a2622fc --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,7 @@ +{ + "default": true, + "MD013": false, + "MD024": false, + "MD033": false, + "MD041": false +} diff --git a/.yarnrc b/.yarnrc index 4fc1bf6..da05d0c 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1,2 +1,2 @@ -install.no-lockfile true +--install.no-lockfile true save-exact true diff --git a/commitlint.config.js b/commitlint.config.js deleted file mode 100644 index 4fedde6..0000000 --- a/commitlint.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { extends: ['@commitlint/config-conventional'] } diff --git a/package.json b/package.json index d799c13..2a7f6e9 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,9 @@ "homepage": "https://github.com/Thream/socketio-jwt#readme", "release-it": { "git": { - "commitMessage": "chore(release): v${version}" + "commit": false, + "push": false, + "tag": false }, "github": { "release": false @@ -38,6 +40,8 @@ "hooks": { "before:init": [ "npm run lint", + "npm run markdownlint", + "npm run build", "npm run test" ] }, @@ -66,6 +70,7 @@ }, "scripts": { "build": "rimraf ./build && tsc", + "markdownlint": "markdownlint '**/*.md' --ignore node_modules", "lint": "ts-standard | snazzy", "format": "ts-standard --fix | snazzy", "release": "release-it", @@ -89,14 +94,15 @@ "@types/express": "4.17.11", "@types/jest": "26.0.20", "@types/jsonwebtoken": "8.5.0", - "@types/node": "14.14.26", + "@types/node": "14.14.27", "@types/server-destroy": "1.0.1", "axios": "0.21.1", "express": "4.17.1", "husky": "5.0.9", "jest": "26.6.3", + "markdownlint-cli": "0.26.0", "pinst": "2.1.4", - "release-it": "14.3.0", + "release-it": "14.4.0", "rimraf": "3.0.2", "server-destroy": "1.0.1", "snazzy": "9.0.0",