Hexatool's ESLint + Prettier configuration
Opinionated linting configuration considering modern TypeScript best practices and providing consistency to your code.
Installation
npm install --save-dev eslint @hexatool/eslint-config-typescript
Using yarn
yarn add eslint @hexatool/eslint-config-typescript -dev
What it does
- Lints JavaScript
using
eslint:recommended
and Prettier - Uses the following plugins:
-
import
: helps validate proper imports -
simple-import-sort
: sorts imports -
unused-imports
: finds and removes unused ES6 module imports
-
- Uses the following rules
How to use
-
Add it to your
.eslintrc.js
file{ extends: [ "@hexatool/eslint-config-typescript" ] }
-
Run eslint
eslint .
Or adding to your package.json
"scripts": { "lint": "eslint .", "lint:fix": "eslint --fix ." }
ℹ️ Please note that some rules enabled by default require that you have strict: true
in your tsconfig.json
.
Hexatool Code Quality Standards
Publishing this package we are committing ourselves to the following code quality standards:
- Respect Semantic Versioning: No breaking changes in patch or minor versions
- No surprises in transitive dependencies: Use the bare minimum dependencies needed to meet the purpose
- One specific purpose to meet without having to carry a bunch of unnecessary other utilities
- Tests as documentation and usage examples
- Well documented ReadMe showing how to install and use
- License favoring Open Source and collaboration