Configuration for ESLint per Case Commons style guide. For TypeScript linting, see lint-config-typescript.
Add to dev dependencies in your project:
yarn add --dev @casecommons/eslint-config
Be sure to add ESLint as a dependency in your project and set it up to run as part of the project’s test suite.
Use extends to include the appropriate lints into .eslintrc in your own project. For example:
// .eslintrc
{
extends: [
"@casecommons/eslint-config/eslintrc-modern",
],
}There are various configurations available:
@casecommons/eslint-config/eslintrc-base: Base configuration applicable to any ECMAScript.@casecommons/eslint-config/eslintrc-test: Extension of base configuration for test code.@casecommons/eslint-config/eslintrc-modern: Extension of base configuration for modern (2015+) ECMAScript.@casecommons/eslint-config/eslintrc-test-modern: Extension of modern configuration for test code.
Docker should be used for simpler dev setup. To do so:
cp .env.sample .envand set values in.envaccordingly.docker-compose build- Prefix the usual
yarn, etc., commands withdocker-compose exec app/docker-compose run --rm appor similar.
Run yarn pack which will emit a tarball in the package root directory. This is useful for testing the client in another project without having to perform a release (see package.json local paths).
Run bin/release.