1.0.0 • Published 1 year ago

eslint-normalize-rules v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

eslint-normalize-rules

This package allows you to generate eslint configs that normalize all the configured rules to the same level (warn or error).

This is for scenarios where you want to treat all warnings as errors (or vice versa) but you also want to extend configurations that have rules configured at both levels.

Usage

Example .eslintrc.js:

const { normalizeRules } = require("eslint-normalize-rules");

const config = {
  extends: ["eslint:recommended", "eslint-standard-with-typescript"],
  rules: {
    "no-var": "warn",
  },
};

module.exports = normalizeRules(config);

This will set all rules to error, except for no-var because it is explicitly set at the config level.

1.0.0

1 year ago