Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

interface-name: Convert to function #2477

Merged
merged 2 commits into from
Apr 3, 2017

Conversation

andy-hanson
Copy link
Contributor

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

Just a refactor.

}
}
return ts.forEachChild(node, cb);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you could move this line to the else branch, because interfaces cannot occur inside other interfaces

@adidahiya adidahiya merged commit e685054 into palantir:master Apr 3, 2017
import * as ts from "typescript";

import * as Lint from "../index";
import { isUpperCase } from "./variableNameRule";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend moving this to a separate file that is imported by both this rule and variableNameRule. Helps avoid circular dependencies and in a few edge cases, circular dependencies can cause runtime issues to pop up which is never fun. Also, no semantic reason for isUpperCase to live in variableNameRule imo

(sorry for the drive-by comment after this was merged! Just happened to notice it haha)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants