eslint-config-mkvlrn v12.3.2
eslint-config-mkvlrn
what
Mainly extends AirBnb's excellent guide, disabling a few rules in order to accommodate the projects I usually create.
It also bundles ALL dependencies
(that should be peerDependencies
) but since an ESLint flat config is still so far away, it all installs like devDependencies
.
install
# eslint and typescript are peerDependencies
# typescript only needed for TS projects
# npm can be replaced by yarn or pnpm (my personal preference)
npm add eslint typescript eslint-config-mkvlrn -D
extending
Four possible configurations can be extended in your eslint configuration, like this:
// .eslintrc.js
// this extends the typescript config for react projects
module.exports {
extends: "mkvlrn/ts-react"
...
}
Configs are:
- react typescript:
mkvlrn/ts-react
- node typescript (no react):
mkvlrn/ts
- react javascript:
mkvlrn/js-react
- node javascript (no react):
mkvlrn/js
disabled rules
no-underscore-dangle
this rule just makes it awkward to deal with mongodb models (which have a _id
field by default)
import/prefer-default-export
this rule spoils tree-shaking (in some projects) and marks the exporting of cloud functions that require a named export as incorrect
react/jsx-uses-react & react/react-in-jsx-scope
react's new jsx transform doesn't expect React to be in scope when using jsx, and these rules expect it to be imported
what's up with the version number?
Eh I messed up.
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago