Skip to content

Commit

Permalink
use enum instead of hardcoded literals
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrokirpa committed Jan 7, 2025
1 parent 36d5675 commit a59dca9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { AST_NODE_TYPES } from '@typescript-eslint/utils';

import { createRule } from './utils/create-rule';

export const RULE_NAME = 'prefer-fluentui-v9';
Expand Down Expand Up @@ -31,7 +33,10 @@ export const rule = createRule<Options, MessageIds>({
}

for (const specifier of node.specifiers) {
if (specifier.type === 'ImportSpecifier' && specifier.imported.type === 'Identifier') {
if (
specifier.type === AST_NODE_TYPES.ImportSpecifier &&
specifier.imported.type === AST_NODE_TYPES.Identifier
) {
const name = specifier.imported.name;

switch (name) {
Expand Down

0 comments on commit a59dca9

Please sign in to comment.