A template for JavaScript project with essential (IMHO) configuration and dependencies. No transforming or bundling.
- Require version >= 20
type: moduleexportsin addition tomainfield
Lint with ESLint. Format with Prettier (as part of ESLint linting process).
eslint:recommendedplugin:jsdoc/recommendedplugin:unicorn/recommendedprettier-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
srcandtestsdirectories - Enable type checking on JavaScript files
- Enable all strict type checking options