Skip to content

ESLint plugin that always reports with configurable message

License

Notifications You must be signed in to change notification settings

xuqingkuang/eslint-plugin-chalk

 
 

Repository files navigation

NPM version Downloads star this repo fork this repo Build Status

eslint-plugin-always

ESLint plugin that always reports with configurable message

Why?

It sounds a bit strange to have a ESLint rule that always reports. The reason why this plugin was created is a special use case:

The root ESLint configuration in the project fits for the build scripts but not for the rest of the project. There is a subfolder that resets the ESLint configuration:

{
  "root": true
}

So all files in this folder structure won't check any ESLint rules. The subfolders must contain ESLint configurations which can differ between each subfolder.

For the case that someone adds a subfolder and forgets the ESLint configuration this rule was created. So every file within the subfolder will report an error

No ESLint configuration present.

Installation

$ yarn add eslint-plugin-always --dev

Usage

Add the plugin to your ESLint configuration:

{
  "plugins": [
    "always"
  ]
}

And then add the following rule:

{
  "rules": {
    "always/always": ["error", {
      "message": "Hello World"
    }]
  }
}

License

MIT © 2022 Jens Simon

About

ESLint plugin that always reports with configurable message

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%