Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/polklabs/eslint-plugin-assorted-rules
An assortment of linting rules for typescript and angular
https://github.com/polklabs/eslint-plugin-assorted-rules
eslint eslint-plugin
Last synced: 16 days ago
JSON representation
An assortment of linting rules for typescript and angular
- Host: GitHub
- URL: https://github.com/polklabs/eslint-plugin-assorted-rules
- Owner: polklabs
- License: mit
- Created: 2023-12-17T22:04:01.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-09T01:18:59.000Z (about 1 month ago)
- Last Synced: 2024-10-28T09:21:50.635Z (16 days ago)
- Topics: eslint, eslint-plugin
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/eslint-plugin-assorted-rules
- Size: 367 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-plugin-assorted-rules
An assortment of linting rules for typescript and angular[![Unit Tests](https://github.com/polklabs/eslint-plugin-assorted-rules/actions/workflows/node.js.yml/badge.svg)](https://github.com/polklabs/eslint-plugin-assorted-rules/actions/workflows/node.js.yml)
# Installation
```bash
npm i --save-dev eslint eslint-plugin-assorted-rules
```**Note:** If you installed ESLint globally then you must also install eslint-plugin-assorted-rules globally.
# Usage
Add `assorted-rules` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:```json
{
"plugins": ["assorted-rules"]
}
```Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"assorted-rules/if-else": "warn"
}
}
```# Rules
| Name | Description | Status |
| :---------------- | :------------------------------- | :----- |
| [if-else](docs/rules/if-else.md) | Enforce every `if` has an `else` | ✅ |
| [if-block](docs/rules/if-block.md) | Enforce all `if` statements have curly braces | ✅ |
| [while-block](docs/rules/while-block.md) | Enforce all `while` statements have curly braces | ✅ |
| [for-block](docs/rules/for-block.md) | Enforce all `for` statements have curly braces | ✅ |
| [switch-default](docs/rules/switch-default.md) | Enforce `switch` statements have a `default` case| ✅ |
| [i-interface](docs/rules/i-interface.md) | Enforce all `interface` names start with 'I' | ✅ |
| [file-lint-disable](docs/rules/file-lint-disable.md) | Don't allow disabling linting rules for entire file | ✅ |
| [triple-equals](docs/rules/triple-equals.md) | Always use === instead of == | ✅ |
| hardcoded-colors | Disallow hard coded colors in ts files | 🔧 |
| jsdoc-required | Enforce jsdoc comments for all methods | ❓ |✅ Complete
🔧 In Progress
❓ Check if possible
##
# Publishing (developer only)```bash
npm run build
```
```bash
npm run publish
```