1.5.8 • Published 5 years ago
@rithmi/eslint-config-rithmi v1.5.8
ESLint and Prettier Config
Installing
Before installing this package, make sure the project has a package.json
file.
You can install everything needed by this config by running the following command.
npx install-peerdeps --dev eslint-config-rithmi
Create a .eslintrc
file in the root of the project's directory (where the package.json
file is). The .eslintrc
file should look like this:
{
"extends": [
"@rithmi/eslint-config-rithmi"
]
}
Integrate with VS Code
If you are using VS Code, you can use follow these instructions to configure the editor to lint and fix the code automatically.
- Install de ESLint Package
- Add the following VS Code settings on the editor's
settings.json
file:
"editor.formatOnSave": true,
// turn it off for JS, we will do this via eslint
"[javascript]": {
"editor.formatOnSave": false
},
"[typescript]": {
"editor.formatOnSave": false
},
"[typescriptreact]": {
"editor.formatOnSave": false
},
// tell the ESLint plugin to run on save
"eslint.autoFixOnSave": true,
// Optional BUT IMPORTANT: If you have the prettier extension enabled for other languages like CSS and HTML, turn it off for JS since we are doing it through Eslint already
"prettier.disableLanguages": [
"js"
],