0.0.1 • Published 1 year ago
eslint-plugin-mirrorful v0.0.1
eslint-plugin-mirrorful 🪞✨
This directory contains a plugin containing ESLint rules for Mirrorful. This plugin should only be installed into a pre-existing Mirrorful project.
See it in action here.
📦 Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-mirrorful
:
npm install eslint-plugin-mirrorful --save-dev
🔧 Usage
Add mirrorful
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["mirrorful"]
}
Then, simply extend the recommended configuration.
{
"extends": ["plugin:mirrorful/recommended"]
}
Alternatively, you can individually configure the rules you want to use under the rules section.
{
"rules": {
"mirrorful/no-hardcoded-colors": 2
}
}
📖 Rules
Name | Description |
---|---|
no-hardcoded-colors | Disallow hard-coded color values when using Mirrorful |
💻 Development and Publishing
You can publish this plugin to the NPM registry:
npm publish
Additional rules can be added as files to the lib/rules
directory. Corresponding unit tests should go in tests/lib/rules
.