@manuth/eslint-plugin-typescript
Version:
A set of personal eslint-rulesets for TypeScript-projects
50 lines (41 loc) • 1.59 kB
Markdown
# ESLintPresets
[](https://bergwache.nuth.ch/lordgizmo/ESLintPresets)
A set of personal eslint-rulesets for TypeScript-projects
## Usage
### Flat Config Interface
Import `flatConfigs` from this module and use the desired configurations:
***eslint.config.js:***
```js
import { flatConfigs } from "@manuth/eslint-plugin-typescript";
export default [
...flatConfigs.recommendedWithTypeChecking
]
```
Following configurations are available:
- `weak`:
Lightweight configurations which prevent common issues from happening
- `weakWithTypeChecking`:
The `weak` configuration including rules which require type checking
- `recommended`:
An opinionated default configuration
- `recommendedWithTypeChecking`:
The `recommended` configuration including rules which require type checking
### eslintrc (Legacy) Config Interface
Add the desired presets to the `extends`-list of your configuration:
***.eslintrc.cjs:***
```js
module.exports = {
extends = [
"plugins:@manuth/typescript/recommended-requiring-type-checking"
];
};
```
Following configurations are available:
- `weak`:
Lightweight configurations which prevent common issues from happening
- `weak-requiring-type-checking`:
The `weak` configuration including rules which require type checking
- `recommended`:
An opinionated default configuration
- `recommended-requiring-type-checking`:
The `recommended` configuration including rules which require type checking