-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(actions): add lint and changelog (#146)
- Loading branch information
Showing
10 changed files
with
1,219 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"root": true, | ||
"plugins": ["unicorn"], | ||
"extends": ["eslint:recommended"], | ||
"rules": { | ||
"no-console": "off", | ||
"no-use-before-define": ["error", "nofunc"], | ||
"no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^(e|_.*)$", | ||
"vars": "local", | ||
"varsIgnorePattern": "(debug|^_)" | ||
} | ||
], | ||
"prefer-const": "error", | ||
"react/jsx-boolean-value": ["error", "always"], | ||
"unicorn/better-regex": "warn", | ||
"unicorn/expiring-todo-comments": "error", | ||
"unicorn/no-abusive-eslint-disable": "error" | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
"settings": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"categories": [ | ||
{ | ||
"title": "## 🚀 Features", | ||
"labels": ["feature"] | ||
}, | ||
{ | ||
"title": "## 🐛 Fixes", | ||
"labels": ["fix"] | ||
}, | ||
{ | ||
"title": "## 🧪 Tests", | ||
"labels": ["test"] | ||
} | ||
], | ||
"ignore_labels": ["ignore_changelog"], | ||
"sort": "ASC", | ||
"template": "${{CHANGELOG}}\n\n<details open>\n<summary>Uncategorized</summary>\n\n${{UNCATEGORIZED}}\n</details>", | ||
"pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}", | ||
"empty_template": "- no changes", | ||
"label_extractor": [ | ||
{ | ||
"pattern": "\\[Issue\\]", | ||
"on_property": "title", | ||
"method": "match" | ||
} | ||
], | ||
"transformers": [], | ||
"max_tags_to_fetch": 200, | ||
"max_pull_requests": 200, | ||
"max_back_track_time_days": 365, | ||
"exclude_merge_branches": [], | ||
"tag_resolver": {}, | ||
"base_branches": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "changelog" | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
release: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build Changelog | ||
id: github_release | ||
uses: mikepenz/release-changelog-builder-action@v2 | ||
with: | ||
configuration: ".github/changelog-configuration.json" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: ${{steps.github_release.outputs.changelog}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Lint | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the master branch | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
run-linters: | ||
name: Run linters | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install Node.js dependencies | ||
run: yarn | ||
|
||
- name: Run ESLint/Flow/Prettier | ||
run: yarn lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": false, | ||
"quoteProps": "as-needed", | ||
"jsxSingleQuote": false, | ||
"trailingComma": "none", | ||
"bracketSpacing": true, | ||
"arrowParens": "avoid", | ||
"requirePragma": false, | ||
"insertPragma": false, | ||
"proseWrap": "preserve", | ||
"htmlWhitespaceSensitivity": "css", | ||
"endOfLine": "auto" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.