Skip to content
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

Add the ability to use arbitrary configuration files (TS and TSLint) #127

Closed
vyshkant opened this issue Feb 28, 2018 · 3 comments
Closed

Comments

@vyshkant
Copy link

I set up my project so that my TypeScript configuration file is different from tsconfig.json. In addition, I have my own TSLint config file and I want to use it.

At the same time I want to use gts, but don't see the way to specify the paths to my TS and TSLint configs.

Can you please tell me, can I do it?

If this requires further work, I will be happy to write the PR (but I will need your advice).

@jinwoo
Copy link
Member

jinwoo commented Mar 2, 2018

Thanks for the suggestion!

Re: using a custom tslint config file, I don't think we want to support that. That's because gts is an opinionated style tool and we want it to enforce Google's typescript style guideline.

I think it is a good feature to support a different typescript config file though. But it seems tsconfig.json is used only for the gts clean command. I may be wrong.

@ofrobots
Copy link
Contributor

ofrobots commented Mar 2, 2018

Once you run gts init, we create a tsconfig.json in the package directory that inherits from the Google TS Config. If you want to override that, you can customize the tsconfig.json as you desire, but note that some commands (e.g. gts clean) depend on tsconfig.json having certain keys.

Our intent was to have a consistent look and feel for all projects using the style guide. However given that we do allow some overriding of tsconfig.json, I would be supportive of a mechanism to override tslint.json as well – as long as we don't encourage users to override.

If you're willing to put together a PR, we'll take a look!

@trulysinclair
Copy link

Personally, I support the ability to override the lint configuration. I enjoy using gts, but there are a few things as a TypeScript React developer I simply need to override such as semicolon and interface-name. These are small things but quickly become frustrating when your entire workflow is set up for these things and then gts spits out linting errors and adds semicolons left and right.

ofrobots added a commit to ofrobots/ts-style that referenced this issue Jun 1, 2018
`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
ofrobots added a commit to ofrobots/ts-style that referenced this issue Jun 1, 2018
`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
ofrobots added a commit that referenced this issue Jun 3, 2018
`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: #127
Fixes: #119
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants