plone / plone.recipe.codeanalysis

provides static code analysis for Buildout-based Python projects, including flake8, JSHint, CSS Lint, and other code checks
https://pypi.org/project/plone.recipe.codeanalysis/
11 stars 5 forks source link

Add tslint #107

Open saily opened 9 years ago

saily commented 9 years ago

We're using TypeScript to document our interfaces, specially when developing AngularJS frontends onto our Python stack. When using Pycharm and/or Webstorm it is possible to add TypeScript libraries which enables IDE typechecks for json interfaces which is important if you store a json response directly onto a model.

I know this is a special usecase but while inspecting a lot of JS libraries out there it turned out they are all using TypeScript as interface documentation because you're able to define variable types as String, Number, etc. which Javascript does not allow you to.

After all, it would be useful if plone.recipe.codeanalysis would support tslint to check those TypeScripts as well. Usage should be similar to jshint, csslint and jscs which i recently implemented, because its also available as npm package.

@jensens, @tisto what do you guys think? How do you document your AngularJS API?

gforcada commented 9 years ago

As long as it's disabled by default I'm :+1: on any linter/checker.

I very much prefer to have lots of linters and checkers than different packages/recipes to do all your code analysis.

p.r.codeanalysis should be the one-stop shop for anything related to code analysis IMHO.

jensens commented 9 years ago

+1 and disabled by default.

saily commented 9 years ago

Currently not possible without hacking around, because tslint does not work with multiple files, see: https://github.com/palantir/tslint/issues/379

tisto commented 9 years ago

I haven't used tslint or TypeScript so far. Though, adding this (disabled by default) would be cool.