Write the TSLint configuration file to the temp directory during build.#129
Merged
nickpape merged 7 commits intomicrosoft:masterfrom Mar 16, 2017
Merged
Write the TSLint configuration file to the temp directory during build.#129nickpape merged 7 commits intomicrosoft:masterfrom
nickpape merged 7 commits intomicrosoft:masterfrom
Conversation
- The TSLint configuration file can be used for VSCode TSLint plugin.
iclanton
previously requested changes
Mar 13, 2017
| const activeLintRules: any = taskScope._loadLintRules(); // tslint:disable-line:no-any | ||
|
|
||
| // @todo This stream is not piped to returned value. Find a way to block the execute flow. | ||
| this._writeLintRules(activeLintRules); |
Member
There was a problem hiding this comment.
You should be able to do this with Gulp.
Member
Author
There was a problem hiding this comment.
I can do it as gulp-like pattern like this. Do you think it is OK?
Member
Author
There was a problem hiding this comment.
I could leverage the fs.writeFileSync API for simplicity.
| } | ||
|
|
||
| private _writeLintRules(lintRules: any): fs.WriteStream { // tslint:disable-line:no-any | ||
| const tslintFilePath: string = path.resolve(this.buildConfig.rootPath, this.buildConfig.tempFolder, 'tslint.json'); |
Member
There was a problem hiding this comment.
Is the tslint.json file location configurable in the TSLint plugin?
Member
Author
There was a problem hiding this comment.
Yes. There is an option - tslint.configFile to config the tslint.config file.
https://marketplace.visualstudio.com/items?itemName=eg2.tslint
- Leave a TODO to improve the performance.
christiango
pushed a commit
to christiango/web-build-tools
that referenced
this pull request
Aug 22, 2017
…d. (microsoft#129) * Write the TSLint configuration file when execute. - The TSLint configuration file can be used for VSCode TSLint plugin. * Run rush change. * Replace with fs.writeFileSync * Leverage the writeFileSync. - Leave a TODO to improve the performance. * Update the change set comment. * Fix some problems * Merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tslint.jsonfile location configurable in the TSLint plugin?tslint.configFileto config thetslint.configfile.-- Remember that this string ends up in the changelog
However, I still think using gulp to write a single file is complete overkill. fs.writeFileSync() will be 10% the # of lines.
FileUtils.tsin@microsoft/sp-build-core-tasks. IMO, we should migrate some of those utilities into directly into GCB.This change is