emattias / eslint-plugin-disable-before

Disable ESLint rules based on when when that lines git commit was changed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eslint-plugin-disable-before

Disable ESLint rules based on when when the line was changed (according to git)

Install

npm install eslint-plugin-disable-before --save-dev

or

yarn add eslint-plugin-disable-before --dev

Use

Add plugin to a config file (.eslintrc) and make it default processor:

{
  "plugins": ["disable-before"],
  "processor": "disable-before",
  "settings": {
    "disable-before": {
      "import/no-anonymous-default-export": {
        "disableOnChangesBefore": "2020-05-01",
      },
    },
  },
}

Then the rule import/no-anonymous-default-export will be disabled for all lines where that lines commits date is before 2020-05-01.

Origin

This is forked from and heavily based on eslint-plugin-disable

About

Disable ESLint rules based on when when that lines git commit was changed

License:MIT License


Languages

Language:JavaScript 100.0%