0.1.3 ⢠Published 3 years ago
eslint-plugin-vikvikvr v0.1.3
eslint-plugin-vikvikvr
Usage | Rules | Contributing
Custom plugin for ESLint providing several rules for React + Redux projects.
Usage
Install the plugin with npm
npm i eslint-plugin-vikvikvr -D
or Yarn
yarn add eslint-plugin-vikvikvr --dev
then edit your configuration:
// .eslintrc.js
module.exports = {
extends: ["plugin:eslint-plugin-vikvikvr/recommended"],
parser: "@typescript-eslint/parser",
plugins: ["vikvikvr", "@typescript-eslint"],
};
Rules
ā if the rule is part of the recommended
config
š if the rule provides a quick-fix
Name | Description | ||
---|---|---|---|
ā | if-statement-condition | Enforces condition expressions to be constants | |
ā | š | no-app-display-name | Ensures displayName is not set inside the apps/ folder |
ā | no-build-import | Prevents imports from dist or build folders | |
ā | no-set-timeout | Ensures setTimeout is not used | |
ā | š | no-useless-template-literals | Ensures template literals are only used when truly needed |
ā | š | react-component-type | Ensures consistency while typing React components. |
ā | š | react-hooks-order | Ensures hooks are called in a consistent order |
ā | react-no-boolean-use-memo | Ensures useMemo is not used with simple boolean expressions | |
ā | redux-action-type-enum | Ensures redux action types come from enums or object properties | |
ā | redux-no-select-whole-state | Ensures useSelector does not select the whole state | |
ā | test-name-should | Ensures test names start with the word should | |
ā | š | use-translations-scope | Ensures useTranslations contains the longest common scope |
Contributing
Want to join as a developer? Read the contributing guidelines.