Skip to content

Commit 1bfbab0

Browse files
Simplified flag check and test
1 parent b226631 commit 1bfbab0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ruleTester = new RuleTester({
1515
parser: tseslint.parser,
1616
parserOptions: {
1717
projectService: {
18-
allowDefaultProject: ["file.ts"],
18+
allowDefaultProject: ["*.ts*"],
1919
defaultProject: "tsconfig.json",
2020
},
2121
tsconfigRootDir: path.join(__dirname, "../.."),

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const rule = createRule({
1111
ForInStatement(node) {
1212
const type = services.getTypeAtLocation(node.right);
1313

14-
if ((type.symbol.flags & ts.SymbolFlags.Enum) !== 0) {
14+
if (type.symbol.flags & ts.SymbolFlags.Enum) {
1515
context.report({
1616
messageId: "loopOverEnum",
1717
node: node.right,

0 commit comments

Comments
 (0)