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

Add linterOptions to tslint.json #1403

Merged
merged 2 commits into from
Jul 19, 2016
Merged

Add linterOptions to tslint.json #1403

merged 2 commits into from
Jul 19, 2016

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Jul 14, 2016

I haven't documented this as a public API yet; we're only using it internally for tests. If we did want to make it public, we'd have to refactor tslint-cli.ts to read the configuration file before it tries to run the type checker on a program.

- only enable type checking during tests when typeCheck: true is configured
- fixes #1402
@@ -24,6 +24,9 @@ import {arrayify, objectify, stripComments} from "./utils";

export interface IConfigurationFile {
extends?: string | string[];
linterOptions?: {
Copy link
Contributor

@jkillian jkillian Jul 18, 2016

Choose a reason for hiding this comment

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

Thinking we don't need this linterOptions property, typeCheck can reside at the top level.

Edit: We need to think carefully about the different classes of configuration options and whether or not they should be broken up or all provided at the same level. The current Linter constructor is sort of confusing already

@jkillian
Copy link
Contributor

I think if would be good to add support for this field when used via the CLI as well. It would only apply is the CLI used with the --project flag.

Sidenote: Should you be able to specify --project in tslint.json as well? If TSLint was run in a directory and not supplied any files, it could look for a tslint.json file and then use the project option passed in it.

@jkillian jkillian merged commit 7fbd31b into master Jul 19, 2016
@jkillian jkillian deleted the ad/fast-tests branch July 19, 2016 02:45
@jkillian
Copy link
Contributor

Changed my mind, the comments above weren't that important / not fully thought out yet. We'll need to think how we want to handle the typeCheck option publicly, but for now let's merge this to get the tests faster.

@jkillian
Copy link
Contributor

For now, this is will remain a private/undocumented API as you mentioned until we have the end-user API figured out

soniro pushed a commit to soniro/tslint that referenced this pull request Aug 31, 2016
* Add linterOptions to tslint.json

- only enable type checking during tests when typeCheck: true is configured
- fixes palantir#1402

* Code style
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.

Running tests is much slower now that type checking is always enabled
2 participants