1.1.3 • Published 6 years ago
eslint-config-sturmenta v1.1.3
eslint-config
My personal eslint config for node and react
Steps to use in node or react combination with prettier
- Install the dependencies as dev dependencies:
yarn add -D eslint eslint-config-sturmenta prettier(the following points 2,3 & 4, has to be the root folder that opens with the editor)
- Create eslint files
- Create the file
.eslintignorein the root with the follow text inside
node_modules/*- Create the file
.eslintrc.jsonin the root with the follow text inside (use node or react depend your project)
{ "extends": ["eslint-config-sturmenta/node"] }- Create the prettier files
- Create the file
.prettierignorein the root with the follow text inside
node_modules- Create the file
.prettierrcin the root with the follow text inside
{
"printWidth": 120,
"singleQuote": true
}- If you use VSCode text editor add the custom settings
- Create the folder
.vscodein the root - Create the file
settings.jsoninside.vscodefolder with the follow text inside
{
"editor.formatOnSave": true,
"eslint.alwaysShowStatus": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}- Restart VSCode text editor and enjoy! 🔥