Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b226631

Browse filesBrowse files
Add requiresTypeInformation
1 parent 39a6f7b commit b226631
Copy full SHA for b226631

File tree

Expand file treeCollapse file tree

4 files changed

+9
-3
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+9
-3
lines changed

‎packages/eslint-plugin-example-typed-linting/README.md

Copy file name to clipboardExpand all lines: packages/eslint-plugin-example-typed-linting/README.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ export default tseslint.config(
3030

3131
<!-- begin auto-generated rules list -->
3232

33-
| Name | Description |
34-
| :----------------------------------------------------- | :------------------------ |
35-
| [no-loop-over-enums](docs/rules/no-loop-over-enums.md) | Avoid looping over enums. |
33+
💭 Requires [type information](https://typescript-eslint.io/linting/typed-linting).
34+
35+
| Name | Description | 💭 |
36+
| :----------------------------------------------------- | :------------------------ | :- |
37+
| [no-loop-over-enums](docs/rules/no-loop-over-enums.md) | Avoid looping over enums. | 💭 |
3638

3739
<!-- end auto-generated rules list -->
3840

‎packages/eslint-plugin-example-typed-linting/docs/rules/no-loop-over-enums.md

Copy file name to clipboardExpand all lines: packages/eslint-plugin-example-typed-linting/docs/rules/no-loop-over-enums.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Avoid looping over enums (`example-typed-linting/no-loop-over-enums`)
22

3+
💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
4+
35
<!-- end auto-generated rule header -->
46

57
Example rule that demonstrates banning `for-in` looping over `enum`s.

‎packages/eslint-plugin-example-typed-linting/src/rules/no-loop-over-enum.ts

Copy file name to clipboardExpand all lines: packages/eslint-plugin-example-typed-linting/src/rules/no-loop-over-enum.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const rule = createRule({
2424
docs: {
2525
description: "Avoid looping over enums.",
2626
recommended: true,
27+
requiresTypeChecking: true,
2728
},
2829
messages: {
2930
loopOverEnum: "Do not loop over enums.",

‎packages/eslint-plugin-example-typed-linting/src/utils.ts

Copy file name to clipboardExpand all lines: packages/eslint-plugin-example-typed-linting/src/utils.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ESLintUtils } from "@typescript-eslint/utils";
33
export interface ExampleTypedLintingRuleDocs {
44
description: string;
55
recommended?: boolean;
6+
requiresTypeChecking?: boolean;
67
}
78

89
export const createRule = ESLintUtils.RuleCreator<ExampleTypedLintingRuleDocs>(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.