Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type * as ts from 'typescript';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';

import type { SelectorsString } from './enums';
import type { Context, NormalizedSelector } from './types';
import type { Context, NormalizedSelector, ValidatorFunction } from './types';

import { getParserServices } from '../../util';
import {
Expand All @@ -26,9 +26,7 @@ export function createValidator(
type: SelectorsString,
context: Context,
allConfigs: NormalizedSelector[],
): (
node: TSESTree.Identifier | TSESTree.Literal | TSESTree.PrivateIdentifier,
) => void {
): ValidatorFunction {
// make sure the "highest priority" configs are checked first
const selectorType = Selectors[type];
const configs = allConfigs
Expand Down Expand Up @@ -72,10 +70,7 @@ export function createValidator(
return b.selector - a.selector;
});

return (
node: TSESTree.Identifier | TSESTree.Literal | TSESTree.PrivateIdentifier,
modifiers: Set<Modifiers> = new Set<Modifiers>(),
): void => {
return (node, modifiers = new Set<Modifiers>()): void => {
const originalName =
node.type === AST_NODE_TYPES.Identifier ||
node.type === AST_NODE_TYPES.PrivateIdentifier
Expand Down
Loading