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

tools(lint): add lint rule for unused vars and params. #1220

Merged
merged 1 commit into from Dec 23, 2015

Conversation

erwinmombay
Copy link
Member

  • any variable that has a suffix Def or Interface is ignored.
  • any parameter that has a prefix unused_ is ignored.

Closes #1212

/cc @cramforce @jridgewell @dvoytenko @sriramkrish85

feel free to make any suggestions on any of these conventions.

@@ -65,7 +62,7 @@ export function twitter(global, data) {
// Unfortunately the tweet isn't really done at this time.
// We listen for resize to learn when things are
// really done.
iframe.contentWindow.addEventListener('resize', function(e) {
iframe.contentWindow.addEventListener('resize', function(_e) {
Copy link
Member

Choose a reason for hiding this comment

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

Just remove?

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

- any variable that has a suffix `Def` or `Interface` is ignored.
- any parameter that has a prefix `_`, `opt_`, `var_`, `unused_` is ignored.
@erwinmombay
Copy link
Member Author

@cramforce all lint issues resolved

@cramforce
Copy link
Member

LGTM

erwinmombay added a commit that referenced this pull request Dec 23, 2015
tools(lint): add lint rule for unused vars and params.
@erwinmombay erwinmombay merged commit 873385d into ampproject:master Dec 23, 2015
@qidonna qidonna mentioned this pull request Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add lint check for unused imports
4 participants