Mahir ESLint Config
The ultimate ESLint shareable config. This config includes all of the ESLint rules that I use in my projects.
Installation
npm install --save-dev eslint eslint-config-mahir
Usage
Add in your ESLint config
{
"extends": [
"mahir/common",
"mahir/node",
"mahir/module",
"mahir/typescript",
"mahir/react",
"mahir/next",
"mahir/edge",
"mahir/prettier"
]
}
You can remove any of the configs you don't need.
Warning:
Use mahir/prettier
last, as it disables all rules that might conflict with Prettier.
Note:
For typescript users, mahir/typescript
will try to find a tsconfig with name tsconfig.eslint.json
in the root of your project. If you want to use a different name, you can change it in your eslint config like this:
{
"parserOptions": {
"project": "./tsconfig.json"
}
}
Configs
This package contains eslint config for
common
rules common for all configsnode
rules for nodejs projectsmodule
rules for esm projectstypescript
rules for typescript projectsjsx
rules for jsx/tsx projectsreact
rules for react projects (this config contains all the jsx
rules too)native
rules for react native projects (this config contains all the react
rules too)next
rules for nextjs projectsedge
rules for projects running in edgejsdoc
jsdoc related configtsdoc
tsdoc related config (this config contains all the jsdoc
rules too)no-deprecated
rules to warn about using deprecated apisprettier
adds all the prettier rules to eslint.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!