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

Adopt tslint in our development #2102

Closed
21 tasks done
egamma opened this issue Jan 19, 2016 · 1 comment
Closed
21 tasks done

Adopt tslint in our development #2102

egamma opened this issue Jan 19, 2016 · 1 comment
Assignees
Labels
plan-item VS Code - planned item for upcoming
Milestone

Comments

@egamma
Copy link
Member

egamma commented Jan 19, 2016

We want to adopt tslint for checking our typescript code.

Most of our style guide should be checked by tslint.

General

  • Add initial tslint.json
  • Add tslint to our gulp script
  • Add a Code task with a problem matcher for tslint
  • Document its use in the Contribution Guidelines
  • Implement non externalised strings rule
  • Add tslint to the pre-commit hygene (wait until we are down to 0 with the warnigs)

Projects

Add tslint checking to other vscode projects

  • vscode-omnisharp
  • vscode-node-debugger-adapter

Others non-core projects

  • vsce
  • vscode-vscode

Extensions

  • vscode-tslint
  • vscode-eslint
  • vscode-jslint
  • vscode-editorConfig

Rules

  • no-unused-expression
  • no-unreachable
  • no-duplicate-variable
  • no-unexternalized-strings
  • no-duplicate-key (in object literals)
  • no-unused-variable (includes imports) - 500 instances
  • curly (braces for if/do/while, in style guide) - 70 instances
  • class-name (PacalCased class and interface names), in style guide) - 3
  • semicolon (semicolon at end of statements) - 220 instances
  • no-unnecessary-semicolons - 60 instances
  • no-duplicate-case - 3 instances
  • tripple-equals - 10 instances

Candidates

  • promise-must-complete - 10 instances (false positives?)
  • no-switch-case-fall-through - 25
  • forin (for ... statement must be filtered with an if) - 80 instances
  • prefer-const (rule is in the TS repository) - ???

Future

  • no-var-keyword - 5800
  • indent tabs (covered by hygene tasks, in style guide)
  • jsdoc-format - 200
  • no-trailing-whitespace
  • whitespace ...

Rejected

  • no-shadowed-variable - 300 instances
  • no-string-literal (disallow object access via string literals) - 16
  • no-unused-imports (subset of no-unused-variables) - 170 instances
  • no-function-expression (use arrow functions, in style guide) - 190 instances
  • missing-optional-annotation - 10 instances
  • no-use-before-declare
  • no-empty-interfaces (we them in our service injection patterns)
  • no-multiple-var-decl
  • no-missing-visibility-modifiers
@egamma egamma added the plan-item VS Code - planned item for upcoming label Jan 19, 2016
@egamma egamma self-assigned this Jan 19, 2016
@egamma egamma added this to the Jan 2016 milestone Jan 19, 2016
@egamma egamma mentioned this issue Jan 19, 2016
59 tasks
@egamma egamma modified the milestones: Feb 2016, Jan 2016 Jan 28, 2016
@egamma egamma mentioned this issue Feb 1, 2016
97 tasks
@egamma
Copy link
Member Author

egamma commented Feb 20, 2016

Fixed the last tslint warning...

@egamma egamma closed this as completed Feb 20, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
plan-item VS Code - planned item for upcoming
Projects
None yet
Development

No branches or pull requests

1 participant