Skip to content

nikolay-borzov/template-javascript

Repository files navigation

JavaScript template

ru

NPM version Style Guide Inline docs

A template for JavaScript project with essential (IMHO) configuration and dependencies. No transforming or bundling.

Node.js

Linting and formatting

Lint with ESLint. Format with Prettier (as part of ESLint linting process).

Rules set

Testing

Test with ava. Tests are in a separate directory.

Coverage

Collect coverage with c8. nyc can't be used until #1353 and 1287 issues are resolved.

pre-commit hook

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

commit-msg hook

Lint commit message to be conventional

Configs

Keep config files in the root.

jsconfig.json

  • Define JavaScript project
  • Include only src and tests directories
  • Enable type checking on JavaScript files
  • Enable all strict type checking options

About

Template for my JavaScript projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published