Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
feat(upgrade): update config
Browse files Browse the repository at this point in the history
  • Loading branch information
phamhongphuc committed Feb 26, 2022
2 parents c1dbb4a + 58390f6 commit 1224e6d
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json",
"version": "0.1",
"version": "0.2",
"language": "en",
"allowCompoundWords": true,
"words": [
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,10 @@ jobs:
uses: actions/checkout@v2

- name: Use Node.js 14.x
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2.1.3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: 'yarn'

- run: yarn
- run: yarn build
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,10 @@ jobs:
uses: actions/checkout@v2

- name: Use Node.js 14.x
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2.1.3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: 'yarn'

- run: yarn --frozen-lockfile
- run: yarn build
Expand Down
17 changes: 16 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down Expand Up @@ -54,6 +55,9 @@ web_modules/
# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
Expand All @@ -69,10 +73,14 @@ web_modules/
# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
# dotenv environment variable files
.env
.env.build
.env.test
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand All @@ -95,6 +103,13 @@ dist
# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ logs
*.log

# Linter
.browserslistrc
.editorconfig
.eslintignore
.markdownlintignore
Expand Down
57 changes: 54 additions & 3 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,11 +1,62 @@
{
"branches": ["master", "next"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{ "type": "docs", "release": "patch" },
{ "type": "build", "scope": "deps", "release": "minor" },
{ "type": "refactor", "release": "patch" },
{ "type": "style", "release": "patch" }
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{ "type": "feat", "section": "Features" },
{ "type": "feature", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{
"type": "perf",
"section": "Performance Improvements"
},
{ "type": "revert", "section": "Reverts" },
{
"type": "docs",
"section": "Documentation",
"hidden": true
},
{
"type": "style",
"section": "Styles",
"hidden": true
},
{
"type": "chore",
"section": "Miscellaneous Chores",
"hidden": true
},
{ "type": "refactor", "section": "Code Refactoring" },
{ "type": "test", "section": "Tests", "hidden": true },
{
"type": "build",
"section": "Build System",
"hidden": true
},
{ "type": "ci", "section": "CI", "hidden": true }
]
}
}
],
[
"@semantic-release/changelog",
{ "changelogTitle": "# Typescript Library Changelog." }
{ "changelogTitle": "# `@culur/prettier-config` changelog." }
],
[
"@semantic-release/exec",
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Typescript Library Changelog.
# `@culur/prettier-config` changelog.

# [0.2.0](https://github.com/culur/prettier-config/compare/v0.1.0...v0.2.0) (2021-06-22)

Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ copy "node_modules\@culur\prettier-config\.prettierignore" ".prettierignore"

It will copy the `.prettierignore` from `@culur/prettier-config` to your project root folder.

### Scripts

Some commonly used scripts in `package.json`.

```json
{
"scripts": {
"fix:prettier": "prettier ** --write",
"test:prettier": "prettier ** --list-different"
}
}
```

## Related

- [Prettier](https://github.com/prettier/prettier) - an opinionated code formatter.
Expand Down

0 comments on commit 1224e6d

Please sign in to comment.