A template for JavaScript project with essential (IMHO) configuration and dependencies. No transforming or bundling.
- Require version >= 20
type: module
exports
in addition tomain
field
Lint with ESLint. Format with Prettier (as part of ESLint linting process).
eslint:recommended
plugin:jsdoc/recommended
plugin:unicorn/recommended
prettier-standard/prettier-file
- Some sensible overrides (See
.eslintrc.cjs
)
Test with ava. Tests are in a separate directory.
Collect coverage with c8. nyc can't be used until #1353 and 1287 issues are resolved.
Using lint-staged and husky:
- Lint staged code and run tests
- Lint all files when ESLint config is changed
- Format all supported files with prettier
Lint commit message to be conventional
Keep config files in the root.
- Define JavaScript project
- Include only
src
andtests
directories - Enable type checking on JavaScript files
- Enable all strict type checking options