0.6.4 • Published 1 year ago
@maons/lint v0.6.4
Lint rules and static code analysis
ESLint and Prettier configuration ready to use in any project.
It includes support for React.js
, Tailwindcss
and Prettier
.
Getting Started
Install
npm install @maons/lint --save-dev
Configuration
ESLint
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',
};
Prettier
Add the following to your package.json
:
{
"prettier": "@maons/lint/.prettierrc.js"
}
Visual Studio Code Integration
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"
]
}
License
Licensed under the MIT license.