New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: generate tslint.json #160
Conversation
Codecov Report
@@ Coverage Diff @@
## master #160 +/- ##
==========================================
+ Coverage 96.75% 96.77% +0.01%
==========================================
Files 10 10
Lines 339 341 +2
Branches 24 24
==========================================
+ Hits 328 330 +2
Misses 11 11
Continue to review full report at Codecov.
|
I am 👎 on this approach. My hope would be that the average user wouldn't need to have their own tslint.json. I'm mostly down on supporting the override at all, but I get why some people will just insist on it. Instead of generating this during |
This is a good discussion. This is what the README says about this project:
This also speaks to what you are trying to argue about the average user not needing to customize anything. I agree with that. Yet, this project, today, generates a Either way, we need to be consistent in our own reason. We need to have a good reason why it is okay to generate |
Fair points! I suppose in a perfect world, I'd prefer we take the same approach with |
`init` now generates a tslint.json file which inherits from the default configuration. This empowers the users to customize if necessary instead of being overly opinionated. Fixes: google#127 Fixes: google#119
@@ -43,8 +43,6 @@ When you run the `npx gts init` command, it's going to do a few things for you: | |||
- `compile`: Compiles the source code using TypeScript compiler. | |||
- `pretest`, `posttest` and `prepare`: convenience integrations. | |||
|
|||
We strongly recommend you use the default style config, but if you must tweak, you can edit the generated `tsconfig.json`. For linter, we use the default `tslint.json` unless we find that file in your project directory. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally removed. If we are going to generate tslint.json
– we do not need to document further. Let's not invite customization.
I think generating the files is friendlier. The value of this project is in providing a good, consistent style guide that can be used in a project without thinking about it. If someone has thought about the precise, but different, style they want, and still find value in this project – let us not turn them away. |
I do not think this is practical. The user needs to be able to customize their repo structure. |
The other reason why this is desirable is mentioned in #119: IDE support. A I'm -1 on generating the configuration only under a flag, if provided by the user. That is not going to be discoverable. This needs to be the default behavior so that users don't have to pass a flag effectively equivalent to |
Again, all fair points. You're probably right about this, but I that doesn't mean I have to be happy about it 😆 You won me over. I'm cool with this approach. |
init
now generates a tslint.json file which inherits from the defaultconfiguration. This empowers the users to customize if necessary
instead of being overly opinionated.
Fixes: #127
Fixes: #119
This depends upon #158 and #159, so the first two commits don't need to be reviewed. They will be removed once those PRs land.