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

BREAKING CHANGE: chore: sync with internal lint #75

Merged
merged 2 commits into from
Nov 7, 2017

Conversation

ofrobots
Copy link
Contributor

@ofrobots ofrobots commented Nov 6, 2017

This synchronizes the lint rules to be closer to the lint rules used
internally at Google. Not all rules are available externally, so this
is not exactly the same.

Also updated the TypeScript version to 2.6.1.

A fair number of new lint rules are being applied now, which means that
the code will be alot more consistent with other Google code, but it
also means that users of gts may need to modify the source to pick up
this release. For most of the new lint rules, a fixer is also available
which should help with migration.

TypeScript 2.6.x enables contravariant types for function parameters,
which may also require some changes. See [1] for more info.

[1] https://blogs.msdn.microsoft.com/typescript/2017/10/31/announcing-typescript-2-6/

This synchronizes the lint rules to be closer to the lint rules used
internally at Google. Not all rules are available externally, so this
is not *exactly* the same.

Also updated the TypeScript version to 2.6.1.

A fair number of new lint rules are being applied now, which means that
the code will be alot more consistent with other Google code, but it
also means that users of gts may need to modify the source to pick up
this release. For most of the new lint rules, a fixer is also available
which should help with migration.

TypeScript 2.6.x enables contravariant types for function parameters,
which may also require some changes. See [1] for more info.

[1] https://blogs.msdn.microsoft.com/typescript/2017/10/31/announcing-typescript-2-6/
@codecov-io
Copy link

codecov-io commented Nov 6, 2017

Codecov Report

Merging #75 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #75   +/-   ##
======================================
  Coverage    99.6%   99.6%           
======================================
  Files           8       8           
  Lines         254     254           
  Branches       10      10           
======================================
  Hits          253     253           
  Misses          1       1
Impacted Files Coverage Δ
src/clean.ts 100% <100%> (ø) ⬆️
test/test-kitchen.ts 100% <100%> (ø) ⬆️
test/fixtures.ts 100% <100%> (ø) ⬆️
src/lint.ts 100% <100%> (ø) ⬆️
test/test-util.ts 100% <100%> (ø) ⬆️
src/util.ts 94.11% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b3db0f...cccc0d1. Read the comment docs.

Copy link
Member

@jinwoo jinwoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

{"name": "Array", "message": "tsstyle#array-constructor"}
],
"ban-types": [true,
["Object", "Use {} instead."],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale for this rule? Just curious.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, as a reader I prefer Object

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tslint.json Outdated
"ban-keywords",
"allow-leading-underscore",
"allow-trailing-underscore"
]
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. newline?

@ofrobots ofrobots merged commit dae4e41 into google:master Nov 7, 2017
@ofrobots ofrobots deleted the sync-lint branch November 7, 2017 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants