Skip to content

Commit 11860dc

Browse files
author
Aaron Harvey
committed
chore: remove left over code
1 parent d80af5f commit 11860dc

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/rules/typeColonSpacing/evaluateVariables.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ import {getParameterName, quoteName} from '../../utilities';
44
export default (context, report) => {
55
const sourceCode = context.getSourceCode();
66

7-
const getColon = (node, typeAnnotation) => {
8-
if (node.type === 'FunctionTypeParam') {
9-
return sourceCode.getFirstToken(node, node.optional ? 2 : 1);
10-
} else {
11-
return sourceCode.getFirstToken(typeAnnotation);
12-
}
13-
};
14-
157
return (node) => {
168
const declarations = _.get(node, 'declarations', []);
179

@@ -20,7 +12,7 @@ export default (context, report) => {
2012

2113
if (typeAnnotation) {
2214
report({
23-
colon: getColon(leaf, typeAnnotation),
15+
colon: sourceCode.getFirstToken(typeAnnotation),
2416
name: quoteName(getParameterName(leaf, context)),
2517
node: leaf,
2618
type: node.kind + ' type annotation'

0 commit comments

Comments
 (0)