0.1.1 • Published 10 months ago

@luxass/eslint-utils v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

eslint-utils

npm version npm downloads

ESlint utilities

📦 Installation

npm install @luxass/eslint-utils

📚 Usage

import { createEslintRule, createESLintRuleBuilder } from "@luxass/eslint-utils";

const createESLintRule = createEslintRuleBuilder("https://github.com/luxass/eslint-plugin-overdrive/blob/main/src/rules/$RULE_NAME.md");

const preferNothing = createESLintRule<[], "preferNothing">({
  name: "preferNothing",
  meta: {
    type: "suggestion",
    docs: {
      description: "Prefer nothing",
      recommended: "error",
    },
    schema: [],
  },
  defaultOptions: [],
  create(context) {
    return {
      Program(node) {
        context.report({
          node,
          messageId: "preferNothing",
        });
      },
    };
  },
  messages: {
    preferNothing: "Prefer nothing",
  },
});
// the rule will now have the following docs url "https://github.com/luxass/eslint-plugin-overdrive/blob/main/src/rules/prefer-nothing.md"

📄 License

Published under MIT License.

0.1.1

10 months ago

0.1.0

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.0

1 year ago