eslint-config-codely
eslint-config-codely copied to clipboard
Opinionated linting configuration considering modern TypeScript best practices and providing consistency to your import statements. Valid for your JavaScript or TypeScript projects π€
π€ Codely's ESLint + Prettier configuration
Opinionated linting configuration considering modern TypeScript best practices and providing consistency to your import
statements. Valid for your JavaScript or TypeScript projects π€
Take a look, play and have fun with this.
Stars are welcome π
π How to use
- Install the dependency
npm install --save-dev eslint-config-codely
- Add it to your
.eslintrc.js
file:{ extends: [ "eslint-config-codely" ] }
- If you are using TypeScript, extend the TypeScript configuration instead, and point to your
tsconfig.json
inparserOptions
:{ extends: [ "eslint-config-codely/typescript" ], overrides: [ { files: ["*.ts", "*.tsx"], parserOptions: { project: ["./tsconfig.json"], }, }, ] }
βΉοΈ Please note that some of the rules enabled by default require that you have strict: true
in your tsconfig.json
.
π€ What it does
- Lints JavaScript using
eslint:recommended
and Prettier - Additionally, lints TypeScript using
@typescript-eslint/recommended
and@typescript-eslint/recommended-requiring-type-checking
- 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 JavaScript rules and TypeScript rules
πΒ Codely 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
π Related resources
- π¦ Linting en JavaScript y TypeScript: Used as a template to bootstrap this plugin
- π― Codely's ESLint Hexagonal Architecture plugin: A plugin that helps you to enforce hexagonal architecture best practises. Valid for your JavaScript or TypeScript projects
Opinionated skeletons ready for different purposes: