Skip to content

Commit 351dba5

Browse files
docs: example of configuring rule options
Resolves #2
1 parent e0ac67e commit 351dba5

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,42 @@ export default defineConfig({
7171
});
7272
```
7373

74+
### Examples
75+
76+
The following is another example, with options:
77+
78+
```js
79+
// @ts-check
80+
import { defineConfig } from 'eslint/config';
81+
import tseslint from 'typescript-eslint';
82+
import rxjsAngularX from 'eslint-plugin-rxjs-angular-x';
83+
84+
export default defineConfig({
85+
extends: [
86+
...tseslint.configs.recommended,
87+
],
88+
languageOptions: {
89+
parserOptions: {
90+
projectService: true,
91+
},
92+
},
93+
plugins: {
94+
'rxjs-angular-x': rxjsAngularX,
95+
},
96+
rules: {
97+
'rxjs-angular-x/prefer-takeuntil': [
98+
'error',
99+
{
100+
checkComplete: true,
101+
checkDecorators: ["Component", "Directive", "Injectable"],
102+
alias: ["takeUntilDestroyed"],
103+
checkDestroy: false,
104+
},
105+
],
106+
},
107+
});
108+
```
109+
74110
## Rules
75111

76112
The package includes the following rules:

0 commit comments

Comments
 (0)