eslint-plugin-cupcake
v1.4.3
Published
[![npm version](https://img.shields.io/npm/v/eslint-plugin-cupcake.svg)](https://www.npmjs.com/package/eslint-plugin-cupcake) [![build status](https://github.com/forivall/eslint-plugin-cupcake/actions/workflows/main.yml/badge.svg)](https://github.com/fori
Downloads
83
Maintainers
Readme
eslint-plugin-cupcake
A collection of eslint rules for consistent code standards.
Installation
Use npm or a compatible tool to install.
$ npm install --save-dev eslint eslint-plugin-cupcake
Requirements
- Node.js v14.15.0 or newer versions.
- ESLint v6.8.0 or newer versions.
Usage
Write your config file such as .eslintrc.yml
.
plugins:
- cupcake
rules:
cupcake/case-block: error
See also Configuring ESLint.
Configs
cupcake/recommended
... enables the recommended rules.
Rules
Stylistic Issues
| Rule ID | Description | |
|:--------|:------------|:--:|
| cupcake/case-block | Enforces block statements in case blocks | ⭐️✒️ |
| cupcake/declaration-order | Enforces order of variable declarations | ⭐️ |
| cupcake/func-style | Enforce the consistent use of either function
declarations or expressions | ⭐️ |
Semantic Versioning Policy
This plugin follows Semantic Versioning and ESLint's Semantic Versioning Policy.
Changelog
Contributing
Welcome your contribution!
See also ESLint Contribution Guide.
Development Tools
npm test
runs tests and measures coverage.npm version <TYPE>
updates the package version. And it updateslib/configs/recommended.js
,lib/index.js
, andREADME.md
's rule table. See also npm version CLI command.npm run add-rule <RULE_ID>
creates three files to add a new rule.