Socket
Book a DemoInstallSign in
Socket

eslint-plugin-chalk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-chalk

ESLint plugin that always reports with configurable message

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1.1K
68.8%
Maintainers
1
Weekly downloads
 
Created
Source

NPM version Downloads star this repo fork this repo Build Status

eslint-plugin-chalk

ESLint plugin that always reports with configurable message

The project is based on eslint-plugin-always but not output with warn or error, it makes the plugin won't interrupt the check process.

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

$ npm i -D eslint-plugin-chalk

Usage

Add the plugin to your ESLint configuration:

{
  "plugins": [
    "chalk"
  ]
}

And then add the following rule:

{
  "rules": {
    "chalk/chalk": ["error", {
      "hexColor": "#00f",
      "icon": "💡",
      "message": "Hello World"
    }]
  }
}

License

MIT © 2022 Jens Simon & XQ Kuang

Keywords

eslint

FAQs

Package last updated on 28 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.