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

Sample TsLintRc file with ALL options #56

Closed
am11 opened this issue Jan 9, 2014 · 5 comments · Fixed by madskristensen/WebEssentials2013#785
Closed

Sample TsLintRc file with ALL options #56

am11 opened this issue Jan 9, 2014 · 5 comments · Fixed by madskristensen/WebEssentials2013#785
Assignees

Comments

@am11
Copy link
Contributor

am11 commented Jan 9, 2014

I found this gist very useful, which contains all the possible .jshitnrc options with comments. It was easy for us to adjust our desire settings from this super-set.

Please provide a similar gist, or a sample .tslintrc somewhere in the repo.

@ashwinr
Copy link
Contributor

ashwinr commented Jan 9, 2014

sure, that's a good idea

@am11
Copy link
Contributor Author

am11 commented Jan 9, 2014

@ashwinr, can you please us this issue? madskristensen/WebEssentials2013#450 (comment)

Here is our .tslintrc file. Apparently, no error is being returned in the file.

Also, what is the purpose of --out argument?

We are redirecting StdErr to StdOut to a .tmp file like this

cmd /c ""C:\USERS\ADEEL\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\12.0EXP\EXTENSIONS\MADS KRISTENSEN\WEB ESSENTIALS 2013\1.6\Resources\nodejs\node.exe" "C:\USERS\ADEEL\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\12.0EXP\EXTENSIONS\MADS KRISTENSEN\WEB ESSENTIALS 2013\1.6\Resources\nodejs\tools\node_modules\tslint\bin\tslint" --format "json" --config "C:\Users\Adeel\Web Essentials.tslintrc" --file "C:\Users\Adeel\Documents\Visual Studio 2013\WebSites\WebSite1\type.ts" > "C:\Users\Adeel\AppData\Local\Temp\tmp712C.tmp" 2>&1"

Even though I missed couple of curly braces and semicolons, no warning is generated on console or in the file.

@gscshoyru
Copy link
Contributor

Several things --

  • Note that we actually no longer check for .tslintrc by default; we only check for tslint.json now. The documentatuon was apparently never updated when this change was made, but I've updated it now. It seems like you provided the config file as a command line argument which should fix that, but I figured I should mention it so that you're aware.
  • The config file you borrowed from is out of date. The format of the file is now { rules: { /* list of rules by rulename: options */ } } . You can see an example here: https://github.com/palantir/tslint/blob/master/tslint.json (this is what we use to tslint the typescript in the tslint project), and a better example file will be coming out in the next few days. But that one should be enough to get you started
  • the --out option is used if you want the results of the linting to be put in a specific file rather than stdout. Doing what you did in the command you provided is more-or-less equivalent.

Hope this helps! Let us know if it doesn't/if you need anything else.

@am11
Copy link
Contributor Author

am11 commented Jan 9, 2014

@gscshoyru, thanks it helped and solved our problem! :)

Moving on to next, is there a way to get custom message format? See this #59.

gscshoyru added a commit to gscshoyru/tslint that referenced this issue Jan 9, 2014
@gscshoyru
Copy link
Contributor

Yup. I responded in #59 and closed it -- we've already got a way to do that with formatters. Let us know if you run into any trouble implementing your own formatter, since there isn't any documentation for it yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants