ESLINT Config
Default configs
- Eslint configs recommended
- Typescript-Eslint configs recommended
- Prettier
- Jest recommended
- Vscode workspace settings for code formatting
- Editorconfig settings
How to use?
1. Install the dependencies
npm install eslint jest @types/jest @caiocezarqueiroz/eslint-config --save-dev or yarn add eslint jest @types/jest @caiocezarqueiroz/eslint-config -D
eslint
and prettier
2. To use the .eslintrc.json
file extending the config:
2.1. Create a { "extends": "@caiocezarqueiroz/eslint-config/settingsGenerator/eslint/node.js" }
.prettier
command in the package.json scripts
2.2. Add the { "create-prettier-config": "node ./node_modules/@caiocezarqueiroz/eslint-config/settingsGenerator/prettier/index.js" }
.prettier
command in the terminal with npm or yarn.
2.3. Run the { npm run create-prettier-config or yarn create-prettier-config }
vscode workspace
settings
3. To use create-workspace-vscode
command in the package.json scripts.
3.1. Add the { "create-workspace-vscode": "node ./node_modules/@caiocezarqueiroz/eslint-config/settingsGenerator/vscode/index.js" }
create-workspace-vscode
command in the terminal with npm or yarn.
3.2. Run the { npm run create-workspace-vscode or yarn create-workspace-vscode }
.editorconfig
settings
4. To use .editorconfig
command in the package.json scripts.
4.1. Add the { "create-editor-config": "node ./node_modules/@caiocezarqueiroz/eslint-config/settingsGenerator/editorconfig/index.js" }
.editorconfig
command in the terminal with npm or yarn.
4.2. Run the { npm run create-editor-config or yarn create-editor-config }