Skip to content

Commit

Permalink
fixup! fix(experimental-utils): support immutable members
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelss95 committed Sep 7, 2021
1 parent 942f7fa commit a4a5084
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/eslint-plugin/src/rules/no-magic-numbers.ts
@@ -1,14 +1,17 @@
import {
TSESTree,
AST_NODE_TYPES,
JSONSchema,
TSESTree,
} from '@typescript-eslint/experimental-utils';
import baseRule from 'eslint/lib/rules/no-magic-numbers';
import * as util from '../util';

type Options = util.InferOptionsTypeFromRule<typeof baseRule>;
type MessageIds = util.InferMessageIdsTypeFromRule<typeof baseRule>;

const baseRuleSchema = Array.isArray(baseRule.meta.schema)
const baseRuleSchema: JSONSchema.JSONSchema4 = Array.isArray(
baseRule.meta.schema,
)
? baseRule.meta.schema[0]
: baseRule.meta.schema;

Expand Down

0 comments on commit a4a5084

Please sign in to comment.