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

Automatic tslint.json generation with --init command #871

Merged
merged 3 commits into from
Dec 16, 2015
Merged

Conversation

jkillian
Copy link
Contributor

Implements #717

A simple implementation of a feature to generate a tslint.json file for users. This PR is very limited in scope - there are lots of ways for this to be improved in the future.

This feature intentionally isn't added to the README yet, that can be done once a better default configuration is settled on.

@adidahiya
Copy link
Contributor

  • needs test in check-bin.sh
  • we should settle on a good default config and add it to the readme before merging this

@jkillian
Copy link
Contributor Author

Added test. As far as a default config, I think it should be pretty conservative in what is enabled

@jkillian
Copy link
Contributor Author

Added a commit with a proposed reasonable default config. I looked at our settings as well as the rules TypeScript used as a baseline, and ruling out rules that are more aggressive (or bug prone, like no-unused-variable).

"semicolon": true
"no-var-keyword": true,
"one-line": [true, "check-open-brace", "check-whitespace"],
"quotemark": [true, "single"],
Copy link
Contributor

Choose a reason for hiding this comment

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

why single? we use double quotes and so does the TS team. let's change it back.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Single quotes are scientifically proven to be easier for humans on standard english keyboards to type!

Copy link
Contributor

Choose a reason for hiding this comment

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

meh, but it doesn't make sense to have the default config be different from our own code like this. we should discuss moving to single quotes elsewhere... we choose double to make it easier to switch back-and-forth between languages like Java to TS. many others, including the compiler team, use double quotes for the same reason.

@jkillian
Copy link
Contributor Author

[Changes made]

@adidahiya
Copy link
Contributor

👍

adidahiya added a commit that referenced this pull request Dec 16, 2015
Automatic tslint.json generation with --init command
@adidahiya adidahiya merged commit b7206e2 into master Dec 16, 2015
@adidahiya adidahiya deleted the init branch December 16, 2015 05:47
@adidahiya adidahiya modified the milestone: TSLint 3.3 Dec 16, 2015
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.

2 participants