Skip to content

eslint-plugin 0.0.2-20220516081411-2649814

Install from the command line:
Learn more about npm packages
$ npm install @dimensiondev/eslint-plugin@0.0.2-20220516081411-2649814
Install via package.json:
"@dimensiondev/eslint-plugin": "0.0.2-20220516081411-2649814"

About this version

@dimensiondev/eslint-plugin

Installation

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

Usage

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/array/no-implicit-sort": "error",
    "@dimensiondev/array/no-unneeded-flat-map": "error",
    "@dimensiondev/array/prefer-from": "error",
    "@dimensiondev/browser/no-persistent-storage": "error",
    "@dimensiondev/browser/no-set-html": "error",
    "unicorn/prefer-dom-node-dataset": "off",
    "@dimensiondev/browser/prefer-dataset": "error",
    "unicorn/prefer-add-event-listener": "off",
    "unicorn/no-invalid-remove-event-listener": "off",
    "@dimensiondev/browser/prefer-event-target": "error",
    "unicorn/prefer-keyboard-event-key": "off",
    "@dimensiondev/browser/prefer-keyboard-event-key": "error",
    "@dimensiondev/browser/prefer-location-assign": "error",
    "unicorn/prefer-dom-node-append": "off",
    "unicorn/prefer-dom-node-remove": "off",
    "unicorn/prefer-modern-dom-apis": "off",
    "@dimensiondev/browser/prefer-modern-dom-apis": "error",
    "unicorn/prefer-query-selector": "off",
    "@dimensiondev/browser/prefer-query-selector": "error",
    "unicorn/prefer-dom-node-text-content": "off",
    "@dimensiondev/browser/prefer-text-content": "error",
    "@dimensiondev/jsx/no-class-component": "error",
    "@dimensiondev/jsx/no-logical": "off",
    "@dimensiondev/jsx/no-set-html": "error",
    "@dimensiondev/jsx/no-template-literal": "error",
    "@dimensiondev/jsx/no-unneeded-nested": "error",
    "@dimensiondev/jsx/prefer-test-id": "off",
    "@dimensiondev/string/no-data-url": "error",
    "@dimensiondev/string/no-interpolation": "error",
    "@dimensiondev/string/no-locale-case": "error",
    "@dimensiondev/string/no-simple-template-literal": "error",
    "@dimensiondev/string/no-unneeded-to-string": "error",
    "@dimensiondev/type/no-bigint": "off",
    "@dimensiondev/type/no-const-enum": "off",
    "@dimensiondev/type/no-empty-literal": "off",
    "@dimensiondev/type/no-force-cast-via-top-type": "error",
    "unicorn/no-instanceof-array": "off",
    "@dimensiondev/type/no-instanceof-wrapper": "error",
    "@dimensiondev/type/no-number-constructor": "error",
    "@dimensiondev/type/no-wrapper-type-reference": "error",
    "@dimensiondev/type/prefer-return-type-annotation": "error",
    "@dimensiondev/unicode/no-bidi": "off",
    "@dimensiondev/unicode/no-invisible": "error",
    "@dimensiondev/unicode/specific-set": "off",
    "@dimensiondev/ban-eslint-disable": "error",
    "@dimensiondev/no-builtin-base64": "error",
    "@dimensiondev/no-default-error": "error",
    "@dimensiondev/no-for-in": "error",
    "@dimensiondev/no-redundant-variable": "error",
    "@dimensiondev/no-single-return": "error",
    "@dimensiondev/no-then": "error",
    "@dimensiondev/no-timer": "off",
    "@dimensiondev/no-top-level": "off",
    "@dimensiondev/no-unsafe-date": "error",
    "@dimensiondev/prefer-default-export": "off",
    "@dimensiondev/prefer-early-return": "error",
    "@dimensiondev/prefer-fetch": "error",
    "@dimensiondev/prefer-timer-id": "error"
  }
}

Supported Rules

Key: :white_check_mark: = recommended, :wrench: = fixable, :bulb: = suggestions, :gear: = configurable, :thought_balloon: = requires type information

LICENSE

MIT