@codeconv/eslint-config-base
v0.11.0
Published
codeconv ESLint base config
Downloads
31
Readme
@codeconv/eslint-config-base
ESLint config based on 'eslint:recommended' and StandardJS
Install
npm install --dev eslint @codeconv/eslint-config-base
or
yarn add -D eslint @codeconv/eslint-config-base
Usage
Add this to your .eslintrc file:
{
"extends": ["@codeconv/base"]
}
Note: We omitted the eslint-config- prefix since it is automatically assumed by ESLint.
Rules
This config extends 'eslint:recommended' and 'standard'. For available rules see:
List of 'eslint:recommended' rules not presented in the 'standard'
| Rule | Value |
| ---------------------------------------------------------------------------------------- | --------- |
| for-direction | "error"
|
| getter-return | "error"
|
| no-dupe-else-if | "error"
|
| no-extra-semi | "error"
|
| no-inner-declarations | "error"
|
| no-nonoctal-decimal-escape | "error"
|
| no-setter-return | "error"
|
| no-unsafe-optional-chaining | "error"
|
| no-unused-labels | "error"
|
| require-yield | "error"
|
List of 'eslint:recommended' rules overridden in the 'standard'
| Rule | 'eslint:recommended' | 'standard' |
| ---------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------ |
| no-constant-condition | "error"
| ["error", { "checkLoops": false }]
|
| no-empty | "error"
| ["error", { "allowEmptyCatch": true }]
|
| no-redeclare | "error"
| ["error", { "builtinGlobals": false }]
|
| no-self-assign | "error"
| ["error", { "props": true }]
|
| no-unused-vars | "error"
| ["error", {"args": "none", "caughtErrors": "none", "ignoreRestSiblings": true, "vars": "all"}]
|
| use-isnan | "error"
| ["error", {"enforceForSwitchCase": true, "enforceForIndexOf": true}]
|
| valid-typeof | "error"
| ["error", { "requireStringLiterals": true }]
|
List of 'standard' rules overridden in the '@codeconv/base'
| Rule | 'eslint:recommended' | 'standard' |
| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| brace-style | ["error", "1tbs", { "allowSingleLine": true }]
| ["error", "1tbs", { "allowSingleLine": false }]
|
| comma-dangle | ["error", {"arrays": "never", "objects": "never", "imports": "never", "exports": "never", "functions": "never"}]
| ["error", {"arrays": "always-multiline", "objects": "always-multiline", "imports": "always-multiline", "exports": "always-multiline", "functions": "always-multiline"}]
|
| object-curly-newline | ["error", { "multiline": true, "consistent": true }]
| ["error", {"ObjectExpression": {"minProperties":1}, "ObjectPattern": {"multiline":true}, "ImportDeclaration":"never", "ExportDeclaration": {"multiline":true, "minProperties":1}}]
|
| object-property-newline | ["error", { "allowMultiplePropertiesPerLine": true }]
| ["error", {"allowAllPropertiesOnSameLine":false}]
|