ESLint and Prettier configuration ready to use in any project.
It includes support for React.js
, Tailwindcss
and Prettier
.
npm install @maons/lint --save-dev
Add the following to your package.json
:
{
"eslintConfig": {
"extends": "@maons/lint/.eslintrc.js"
}
}
or create a .eslintrc.js
file with the following content:
module.exports = {
root: true,
extends: '@maons/lint/.eslintrc.js',
};
Add the following to your package.json
:
{
"prettier": "@maons/lint/.prettierrc.js"
}
Steps to integrate @maons/lint
with Visual Studio Code:
- Install ESLint and Prettier plugins:
- Add the following to your VSCode
settings.json
:
{
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.tslint": true,
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
}
Licensed under the MIT license.