@digihcs/eslint-plugin-acexis
v1.4.1
Published
Acexis Rule
Maintainers
Readme
eslint-plugin-acexis
Acexis Rule
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devor
$ yarn add eslint --devNext, install @digihcs/eslint-plugin-acexis:
$ npm install @digihcs/eslint-plugin-acexis --save-devor
$ yarn add @digihcs/eslint-plugin-acexis --devNote: If you installed ESLint globally (using the -g flag) then you must also install @digihcs/eslint-plugin-acexis globally.
Usage
Add @digihcs/acexis to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["@digihcs/acexis"]
}Then configure the rules you want to use under the rules section.
{
"extends": ["./node_modules/@digihcs/eslint-plugin-acexis/eslintDefaults.js"],
"rules": {
"@digihcs/acexis/push-instead-of-spread-operator": 2,
"@digihcs/acexis/usestate-with-array": 2, // frontend
"@digihcs/acexis/empty-array-unless": 2,
"@digihcs/acexis/empty-array-unless-with-spread-operator": 2,
"@digihcs/acexis/switch-case-instead-of-if-else": 2,
"@digihcs/acexis/if-false-return": 2
}
}Eslint Vscode
- Ctrl + Shift + P
- Open setting (JSON)
- Add the following to your Visual Studio Code settings.json
"eslint.validate": [
"javascript",
"javascriptreact",
{
"autoFix": true,
"language": "typescript"
},
{
"autoFix": true,
"language": "typescriptreact"
}
],