1.0.1 • Published 7 months ago
@sleavely/eslint-config v1.0.1
@sleavely/eslint-config
My personal crutches and preferences for Javascript and Typescript.
Usage
npm i --save-dev @sleavely/eslint-config
Regardless of you're using Javascript or Typescript you just have to extend @sleavely
:
// .eslintrc.cjs
module.exports = {
extends: ['@sleavely'],
}
However, Typescript projects need to ensure they use strict mode:
// tsconfig.json
{
strict: true
}
Rules
I rely on standard
and standard-with-typescript
to do a lot of the heavy lifting, but I've made a few amendments.
JS
comma-dangle
-always-multiline
makes for easier changes, code reviews, and mergesimport/no-cycle
- prevents the most obvious cases of circular dependencies- all of
@sleavely/js-rules
TS
In addition to the JS rules, these apply:
@typescript-eslint/no-explicit-any
- Javascript goes in .js, not .tsis turned off.@typescript-eslint/strict-boolean-expressions
- all of
@sleavely/ts-rules