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

Cleanup and refactoring of (rule|formatter)Loader #3412

Merged
merged 3 commits into from
Jan 9, 2018
Merged

Cleanup and refactoring of (rule|formatter)Loader #3412

merged 3 commits into from
Jan 9, 2018

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Oct 28, 2017

PR checklist

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

Overview of change:

  • deprecate getRelativePath, use path.resolve instead
  • formatterLoader
    • allow uncompiled custom formatters (we already allow uncompiled rules)
    • try resolve formatter module relative to current directory first
    • add a test for loading a formatter package relative to cwd

Is there anything you'd like reviewers to focus on?

Using a formatter directly from node_modules without --formatters-dir is currently undocumented. I guess it makes sense to do it in this PR.

CHANGELOG.md entry:

tba

* deprecate `getRelativePath`, use `path.resolve` instead
* formatterLoader
  * allow uncompiled custom formatters
  * try resolve formatter module relative to current directory first
  * add a test
@adidahiya adidahiya self-assigned this Oct 31, 2017
@adidahiya adidahiya merged commit 8b853b2 into palantir:master Jan 9, 2018
@adidahiya adidahiya added this to the TSLint v5.9 milestone Jan 9, 2018
HyphnKnight pushed a commit to HyphnKnight/tslint that referenced this pull request Apr 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants