Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CONTRIBUTING.md 3.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # CONTRIBUTING to eslint-plugin-jsdoc
  2. ## Testing changes locally
  3. You might try a TDD approach and add tests within the `test` directory,
  4. to try different configs, you may find it easier to try out changes in
  5. a separate local directory.
  6. You can run [`npm link`](https://docs.npmjs.com/cli/link) for this purpose,
  7. pointing from your project to this project. For example, while in your project
  8. root and with `eslint-plugin-jsdoc` as a sibling, run:
  9. ```shell
  10. npm link ../eslint-plugin-jsdoc
  11. ```
  12. ## Building the project
  13. After running `npm install` to get the latest dependencies and devDependencies,
  14. you can run the following command to update the `dist` files, with `dist/index.js`
  15. being the `main` entrance point from `package.json`:
  16. ```shell
  17. npm run build
  18. ```
  19. ## Coding standards
  20. The project follows ESLint rules from [`canonical`](https://www.npmjs.com/package/eslint-config-canonical)
  21. and testing follows its subconfig, `canonical/mocha`.
  22. ## Testing
  23. Tests are expected. Each rule file should be in CamelCase (despite the rule names themselves being hyphenated) and should be added within `test/assertions` and then imported/required by
  24. `test/rules/index.js`.
  25. Each rule file should be an ESM default export of an object which has `valid` and `invalid` array properties containing the tests. Tests of each type should be provided.
  26. `parserOptions` will be `ecmaVersion: 6` by default, but tests can override `parserOptions`
  27. with their own.
  28. See ESLint's [RuleTester](https://eslint.org/docs/developer-guide/nodejs-api#ruletester)
  29. for more on the allowable properties (e.g., `code`, `errors` (for invalid rules),
  30. `options`, `settings`, etc.).
  31. Note that besides `npm test`, there is `npm run test-cov` which shows more
  32. detailed information on coverage. Coverage should be maintained at 100%, and
  33. if there are a few guards in place for future use, the code block in question
  34. can be ignored by being preceded by `/* istanbul ignore next */` (including
  35. for warnings where the block is never passed over (i.e., the block is always
  36. entered)). If you want to test without coverage at all, you can use
  37. `npm run test-no-cov`. To only test rules rather than other files, you
  38. can use `npm run test-index`.
  39. To test specific rules, you can supply a comma-separated list with the `--rule`
  40. flag passed to `test-index`, e.g., for `check-examples` and `require-example`:
  41. `npm run --rule=check-examples,require-example test-index`.
  42. You can further limit this by providing `--invalid` and/or `--valid` flags
  43. with a comma-separated list of 0-based indexes that you wish to include (also
  44. accepts negative offsets from the end, e.g., `-1` for the last item). For
  45. example, to check the first and third invalid tests of `check-examples`
  46. alon with the second valid test, you can run:
  47. `npm run --rule=check-examples --invalid=0,2 --valid=1 test-index`.
  48. ## Requirements for PRs
  49. PRs should be mergeable, [rebasing](https://git-scm.com/book/en/v2/Git-Branching-Rebasing)
  50. first against the latest `master`.
  51. The number of commits will ideally be limited in number, unless extra commits
  52. can better show a progression of features.
  53. Commit messages should be worded clearly and the reason for any PR made clear
  54. by linking to an issue or giving a full description of what it achieves.
  55. ## Merging
  56. We use [semantic-release](https://github.com/semantic-release/semantic-release)
  57. for preparing releases, so the commit messages (or at least the merge that
  58. brings them into `master`) must follow the
  59. [AngularJS commit guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) with a special format such as `feat: describe new feature`
  60. in order for the releasing to occur and for the described items to be added
  61. to the release notes.