0.3.1 • Published 4 years ago
@wolfiezero/eslint-config v0.3.1
@wolfiezero/eslint-config 
Sharable config for ESlint
Installation
Install this config.
npm install @wolfiezero/eslint-config -DThen to get all the peer dependencies run install-peerdeps like so.
npx install-peerdeps @wolfiezero/eslint-config -DOr pick the depenecies you need based on use case. (You may not need them all espcially if not working with TypeScript).
Then in the .eslintrc.js file (or what ever you may call it)
module.exports = {
root: true,
env: {
node: true,
amd: true,
},
extends: ['@wolfiezero/eslint-config/javascript', '@wolfiezero/eslint-config/javascript/prettier'],
};Changing the values as you need to...
Extending
Options for setups are as follows. Note that prettier configs should always be
the last item to include (if you want it).
JavaScript
@wolfiezero/eslint-config/javascript
@wolfiezero/eslint-config/javascript/prettierTypeScript
@wolfiezero/eslint-config/typescript
@wolfiezero/eslint-config/typescript/react
@wolfiezero/eslint-config/typescript/prettierVSCode User?
Make sure you have ESLint extention installed and add the
following into the project's settings file (/.vscode/settings.json) (deleting
as appropriate).
{
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.format.enable": false,
"editor.formatOnSave": true
}