eslint-plugin
/
0.0.2-20220123013951-c2b3755
eslint-plugin 0.0.2-20220123013951-c2b3755
Install from the command line:
Learn more about npm packages
$ npm install @dimensiondev/eslint-plugin@0.0.2-20220123013951-c2b3755
Install via package.json:
"@dimensiondev/eslint-plugin": "0.0.2-20220123013951-c2b3755"
About this version
You'll first need to install eslint:
npm install --save-dev eslint
Next, install @dimensiondev/eslint-plugin
:
# for stable version
npm install --save-dev @dimensiondev/eslint-plugin
# for unstable version
npm install --save-dev @dimensiondev/eslint-plugin --registry=https://npm.dimension.im
Add @dimensiondev
to the plugins section of your .eslintrc
configuration file.
{
"$schema": "https://dimensiondev.github.io/eslint-plugin/src/schema.json",
"plugins": ["@dimensiondev"],
"rules": {
"@dimensiondev/ban-eslint-disable": "error",
"@dimensiondev/browser/prefer-event-target": "error",
"@dimensiondev/browser/prefer-keyboard-event-key": "error",
"@dimensiondev/browser/prefer-location-assign": "error",
"@dimensiondev/browser/prefer-modern-dom-apis": "error",
"@dimensiondev/jsx/no-logical": "off",
"@dimensiondev/jsx/no-template-literal": "error",
"@dimensiondev/no-bigint": "off",
"@dimensiondev/no-builtin-base64": "error",
"@dimensiondev/no-default-error": "error",
"@dimensiondev/no-force-cast-via-top-type": "error",
"@dimensiondev/no-implicit-array-sort": "error",
"@dimensiondev/no-locale-case": "error",
"@dimensiondev/no-number-constructor": "error",
"@dimensiondev/no-redundant-variable": "error",
"@dimensiondev/no-simple-string-interpolation": "error",
"@dimensiondev/no-simple-template-literal": "error",
"@dimensiondev/no-single-return": "error",
"@dimensiondev/no-then": "error",
"@dimensiondev/no-timer": "off",
"@dimensiondev/no-top-level": "off",
"@dimensiondev/no-unneeded-flat-map": "error",
"@dimensiondev/no-unneeded-to-string": "error",
"@dimensiondev/no-unsafe-date": "error",
"@dimensiondev/prefer-default-export": "off",
"@dimensiondev/prefer-early-return": "error",
"@dimensiondev/prefer-fetch": "error",
"@dimensiondev/prefer-return-type-annotation": "error",
"@dimensiondev/prefer-timer-id": "error",
"@dimensiondev/unicode/no-bidi": "off",
"@dimensiondev/unicode/no-invisible": "error",
"@dimensiondev/unicode/specific-set": "off"
}
}
Key: :white_check_mark: = recommended, :wrench: = fixable, :bulb: = suggestions, :gear: = configurable, :thought_balloon: = requires type information
-
ban-eslint-disable ✅ ⚙️
Baneslint-disable
comment directive -
browser/prefer-event-target ✅ 🔧 💭
Prefer.{add,remove}EventListener()
overon
-functions -
browser/prefer-keyboard-event-key ✅ 🔧 💭
Prefer KeyboardEvent#key -
browser/prefer-location-assign ✅ 🔧
Enforce best practice with location -
browser/prefer-modern-dom-apis ✅ 🔧 💡 💭
Prefer Modern DOM APIs -
jsx/no-logical ⚙️
Limit the complexity of JSX logic expression -
jsx/no-template-literal ✅ 🔧
Disallow use template-literal in JSX -
no-bigint 💭
Disallow use BigInt -
no-builtin-base64 ✅ 🔧
Disallow use built-in base64 function -
no-default-error ✅ 💭
Restrict the usage of default (unextended) error -
no-force-cast-via-top-type ✅
Disallowing cast a type T to unrelated or incompatible type Q via "T as any as Q" -
no-implicit-array-sort ✅ 💭
Enforce Array#sort provide comparator function -
no-locale-case ✅ 🔧
Disallow use.toLocale{Upper,Lower}Case()
-
no-number-constructor ✅
Disallow useNumber
constructor -
no-redundant-variable ✅ 🔧
Disallow redundant variable -
no-simple-string-interpolation ✅
Disallow simple string interpolation -
no-simple-template-literal ✅ 🔧
Disallow simple template-literal -
no-single-return ✅
Disallow single-return -
no-then ✅
Disallow.then(...)
-
no-timer
Disallow use timer function -
no-top-level ⚙️
Disallow side-effect at module top-level -
no-unneeded-flat-map ✅ 🔧
Disallow.flatMap((x) => x)
when simpler alternatives exist -
no-unneeded-to-string ✅ 🔧 💭
Disallow.toString()
when simpler alternatives exist -
no-unsafe-date ✅ 💭
Disallow use unsafe Date methods -
prefer-default-export ⚙️
Enforce default export location at top or bottom -
prefer-early-return ✅ 🔧 ⚙️
Prefer early returns over full-body conditional wrapping in function declarations -
prefer-fetch ✅
Enforce fetch -
prefer-return-type-annotation ✅ 🔧
Enforce Move return type annotation to function return type -
prefer-timer-id ✅ 💡
Enforce best practice with timer function -
unicode/no-bidi 🔧
Detect and stop Trojan Source attacks -
unicode/no-invisible ✅ 🔧
Disallow invisible characters -
unicode/specific-set 🔧 ⚙️
Limit the range of literal characters
Details
- eslint-plugin
- DimensionDev
- almost 3 years ago
- MIT
- 24 dependencies
Assets
- eslint-plugin-0.0.2-20220123013951-c2b3755-npm.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0