Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gurov/eslint-plugin-superstition
Eslint superstition rules (forbid using numbers 13, 666 and etc.)
https://github.com/gurov/eslint-plugin-superstition
eslint eslint-plugin javascript superstition
Last synced: 2 months ago
JSON representation
Eslint superstition rules (forbid using numbers 13, 666 and etc.)
- Host: GitHub
- URL: https://github.com/gurov/eslint-plugin-superstition
- Owner: gurov
- License: mit
- Created: 2019-12-30T07:20:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T07:44:16.000Z (over 4 years ago)
- Last Synced: 2024-04-15T04:29:21.395Z (9 months ago)
- Topics: eslint, eslint-plugin, javascript, superstition
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# eslint-plugin-superstition
ESLint superstition rules (forbid using numbers 13, 666 and etc.)
## Install
```
$ npm install --save-dev eslint eslint-plugin-superstition
```## Usage
Configure it in `package.json`.
```json
{
"name": "my-awesome-project",
"eslintConfig": {
"env": {
"es6": true
},
"plugins": [
"superstition"
],
"rules": {
"superstition/must-have-8": "error",
"superstition/no-number-13": "error",
"superstition/no-number-39": "error",
"superstition/no-number-4": "error",
"superstition/no-number-666": "error",
"no-var": "error"
}
}
}
```## Rules
- [must-have-8](docs/rules/must-have-8.md) - Must have to use of the number `8`. It brings good luck.
- [no-number-13](docs/rules/no-number-13.md) - Forbid the use of number `13`. It is a bad omen.
- [no-number-39](docs/rules/no-number-39.md) - Forbid the use of number `39`. It is a bad omen.
- [no-number-4](docs/rules/no-number-4.md) - Forbid the use of number `4`. It is a bad omen.
- [no-number-666](docs/rules/no-number-666.md) - Forbid the use of number `666`. It is a bad omen.## Recommended configuration
This plugin exports a [`recommended` configuration](index.js) that enforces good practices.
To enable this configuration, use the `extends` property in your `package.json`.
```json
{
"name": "my-awesome-project",
"eslintConfig": {
"plugins": [
"superstition"
],
"extends": "plugin:superstition/recommended"
}
}
```See [ESLint documentation](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information about extending configuration files.
## Notes
Based on [eslint-plugin-fp](https://github.com/jfmengels/eslint-plugin-fp)
----
MIT © [Pavel Gurov](https://github.com/pgurov)