Skip to content

Commit

Permalink
build: run standard/lint when running yarn test
Browse files Browse the repository at this point in the history
This is the recommended way to use `standard`,
as listed in the `standard` docs, see
https://standardjs.com/#what-you-might-do-if-youre-clever

It's also what's listed in the `CONTRIBUTING.md` file.
  • Loading branch information
aloisklink authored and MindaugasLaganeckas committed Aug 22, 2022
1 parent eb05eab commit 449de44
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ Please note that this project is released with a [Contributor Code of Conduct][c
## Submitting a pull request

1. [Fork][fork] and clone the repository
1. Configure and install the dependencies: `yarn install; source copy_modules.sh`
1. Configure and install the dependencies: `yarn install`
1. Create a new branch: `git checkout -b my-branch-name`. Make sure to give a good name to the branch. New features shall start with `feature/<branch name>`. Bug fixes shall start with `fix/<branch-name>`
1. Make your change, add tests, and make sure the tests still pass
1. Push to your fork and [submit a pull request][pr]
1. Give yourself a high five, and wait for your pull request to be reviewed and merged.

Here are a few things you can do that will increase the likelihood of your pull request is accepted:

- Follow the [style guide][style] which is using standard. Any linting errors should be shown when running `npm test`
- Follow the [style guide][style] which is using [standard][style]. Any linting errors should be shown when running `npm test`.
- Some linting errors might be automatically fixed by `yarn run lint-fix`.
- Write and update tests.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, submit them as separate pull requests.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"exports": "./src/index.js",
"scripts": {
"upgrade": "yarn-upgrade-all && source copy_modules.sh",
"test": "yarn node --experimental-vm-modules $(yarn bin jest)"
"test": "standard && yarn node --experimental-vm-modules $(yarn bin jest)",
"lint": "standard",
"lint-fix": "standard --fix"
},
"dependencies": {
"chalk": "^5.0.1",
Expand All @@ -39,5 +41,10 @@
"moduleNameMapper": {
"#(.*)": "<rootDir>/node_modules/$1"
}
},
"standard": {
"ignore": [
"mermaid.min.js"
]
}
}

0 comments on commit 449de44

Please sign in to comment.