Linter rules for clean and fast TypeScript development
Because every TypeScript developer deserves not to think about code style and minor approaches.
- Pre-requisite: you need to have both ESLint and TypeScript installed, preferably locally.
npm install --save-dev eslint-config-clean-code
- In your
.eslintrc
file at the project root, addextends: eslint-config-clean-code
. - Also add
parserOptions: { project: 'path.to.tsconfig.json' }
. - Customise the rules if required.
Because we believe that quality software development is impossible without types.
We consciously disable rules related to whitespace, indents, etc. and recommend using Prettier
instead, as a complementary tool to your linter. Having wasted numerous workdays bickering about minor formatting issues, this is the only sane choice for all projects, in our opinion.
There should be one straightforward way to do anything, and this consistency is enforced by the rules.