1.0.1 • Published 2 years ago
@rightinyourwheelhouse/eslint-config v1.0.1
Table of Contents
Installation
This module should be installed as one of your project's devDependencies
:
npm i --save-dev @rightinyourwheelhouse/eslint-config
Usage
Then add the extends to your .eslintrc.js:
module.exports = {
extends: '@rightinyourwheelhouse/eslint-config',
rules: {
// your overrides
},
}
Other configs
You can use other configs in combination with the main eslint.
module.exports = {
extends: ['@rightinyourwheelhouse/eslint-config', '@rightinyourwheelhouse/eslint-config/<config-name>'],
}
React example
module.exports = {
extends: [
'@rightinyourwheelhouse/eslint-config',
'@rightinyourwheelhouse/eslint-config/react',
'@rightinyourwheelhouse/eslint-config/jsx-a11y',
'@rightinyourwheelhouse/eslint-config/tailwind',
],
rules: {
// your overrides
},
}
VS Code
Using the eslint-plugin you can use these settings for autoformatting:
"editor.formatOnSave": true,
"eslint.format.enable": true,
"[javascript]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascriptreact]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescriptreact]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"editor.codeActionsOnSave": {
"source.fixAll": true,
}