eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

wrap

ESLint plugin / wrap

Wraps and modifies third-party rule.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/wrap": [
      "error",
      {
        disableFix: boolean,
        lint: string | string[],
        plugin: string,
        rule: string,
        skip: string | string[]
      }
    ]
  }
};

| Option | Description | Default | | :—– | :———- | :—— |

disableFix Disables fix false
lint AST selectors to lint []
plugin NPM package name -
rule ESLint rule name -
skip AST selectors to skip []

Examples of incorrect code

/*
eslint misc/wrap: [
  error,
  {
    plugin: "@typescript-eslint/eslint-plugin",
    rule: "no-shadow"
  }
]
*/
const value = 1;
enum SampleEnum { value = "value" }

Examples of correct code

/*
eslint misc/wrap: [
  error,
  {
    skip: "TSEnumDeclaration *",
    plugin: "@typescript-eslint/eslint-plugin",
    rule: "no-shadow"
  }
]
*/
const value = 1;
enum SampleEnum { value = "value" }