https://github.com/daneden/eslint-plugin-daneden
https://github.com/daneden/eslint-plugin-daneden
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/daneden/eslint-plugin-daneden
- Owner: daneden
- Created: 2020-07-05T12:43:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T01:56:25.000Z (about 4 years ago)
- Last Synced: 2024-05-09T10:02:02.251Z (about 2 years ago)
- Language: JavaScript
- Size: 13 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eslint-plugin-daneden
Additional rules for ESLint based on my personal preferences.
## Installation
1. Install with `yarn add -D eslint-config-daneden`
2. Add to `.eslintrc` configs:
```json
{
...
"plugins": [
"daneden",
]
}
```
3. Enable specific rules:
```json
{
...
"rules": {
"daneden/explicit-let-type": "warn",
}
}
```
## Rules
### `explicit-let-type`
Checks that `let` and `var` constants without an initialised value have an explicit type
```tsx
const a = 1 // Passes
let b: number = 1 // Passes
let c = 1 // Passes
let d: number // Passes
d = 1
let e // Fails
```