-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(project): add initial package.json file * chore(package): update package.json config - Remove unnecessary fields (version, main, keywords, author, license) - Add `sideEffects` field set to false to enable better bundling optimizations. - Specify package as an ES module by setting the `type` field to "module". - Mark the package as private to prevent accidental publication. * feat(npm-config): enforce installation of exact version dependencies Add `.npmrc` file with `save-exact` set to `true` to enforce that the exact versions of dependencies are saved in package.json * chore(dependencies): add `prettier` and `prettier-plugin-packagejson` as dev. dependencies * feat(project): add Prettier config file * chore: add .gitignore and .prettierignore files Add .gitignore and .prettierignore files to prevent 'node_modules' and 'package-lock.json' from being tracked by git and formatted by Prettier. * feat(package-scripts): add linting and formatting npm scripts Added new `lint` and `fix` scripts in the package.json, allowing for code linting and auto-fixing issues using Prettier. It also includes `concurrently` as a dev. dependency enabling running multiple npm scripts in parallel. * style: add formatting changes made by Prettier * chore(dependencies): add husky and lint-staged for pre-commit hooks This commit adds two new development dependencies to the project: `husky` and `lint-staged`. Husky is used to configure Git hooks, and lint-staged allows running linters on staged files in Git * chore(husky): add 'prepare' script for husky install This commit ensures that Husky's git hooks are installed after running `npm install`. * feat(husky): add pre-commit hook * feat(lint-staged): add code formatting on commit Added `.lintstagedrc.js` with a default export setting up Prettier to run against all matched files. The `--ignore-unknown` flag allows Prettier to skip files it does not recognize. * ci(github-actions): add `node` setup in prettify workflow This commit updates the code formatting's workflow. The 'Checkout' action is upgraded from v3 to v4. Additionally, this update introduces the setup-node action, specifying the `lts` version of Node.js, followed by `npm ci` to install dependencies based on the lock file. * feat(environment): specify lts version of node in package.json This commit introduces a `.nvmrc` file with the version `20.10.0`, and updates the `package.json` to include both `engines` and `volta` fields that enforce the use of the long-term support (LTS) of Node.js. * ci(workflow): add names to new CI steps * chore(dependencies): update `prettier-plugin-packagejson` to 2.4.9
- Loading branch information
Showing
24 changed files
with
2,637 additions
and
832 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
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
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 |
---|---|---|
@@ -1,28 +1,37 @@ | ||
<!--- Provide a general summary of your changes in the Title above --> | ||
|
||
## Motivation and Context | ||
|
||
<!--- Why is this change required? What problem does it solve? --> | ||
<!--- If it fixes an open issue, please link to the issue here. --> | ||
|
||
Fixes # | ||
|
||
## Description | ||
|
||
<!--- Describe your changes in detail --> | ||
|
||
## How Has This Been Tested? | ||
|
||
<!--- Please describe in detail how you tested your changes. --> | ||
<!--- Include details of your testing environment, the tests you ran to --> | ||
<!--- see how your change affects other areas of the code, etc. --> | ||
|
||
## Screenshots (if appropriate): | ||
|
||
## Types of Changes | ||
|
||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
|
||
- [ ] Bug fix (non-breaking change that fixes an issue) | ||
- [ ] New feature (non-breaking change that adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
|
||
## Checklist: | ||
|
||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> | ||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> | ||
|
||
- [ ] My code follows the code style of this project. | ||
- [ ] My change requires a change to the documentation. | ||
- [ ] I have updated the documentation accordingly. |
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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
name: Prettier Action | ||
|
||
on: | ||
push | ||
on: push | ||
|
||
jobs: | ||
prettier: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
|
@@ -19,8 +18,17 @@ jobs: | |
- name: Commit URL | ||
run: git remote set-url origin https://github-actions:${{github.token}}@github.com/rbjks/rbjks.github.io.git | ||
|
||
- name: Prettify code | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Prettify Code | ||
uses: creyD/[email protected] | ||
with: | ||
dry: False | ||
dry: false | ||
github_token: ${{ secrets.PERSONAL_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 @@ | ||
node_modules |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,3 @@ | ||
export default { | ||
'*': 'prettier --ignore-unknown --write', | ||
}; |
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 @@ | ||
save-exact=true |
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 @@ | ||
20.10.0 |
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,2 @@ | ||
node_modules | ||
package-lock.json |
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,7 @@ | ||
// @ts-check | ||
|
||
/** @type {import("prettier").Config} */ | ||
export default { | ||
singleQuote: true, | ||
plugins: ['prettier-plugin-packagejson'], | ||
}; |
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
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.