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

Unused variables don't output warnings #1228

Closed
jmz7v opened this issue Nov 12, 2018 · 3 comments

Comments

@jmz7v
Copy link

commented Nov 12, 2018

Problem:

The following small React component link.js has a useless destructured variable, it is not being caught by Standard.

import React from 'react'

const Link = ({ url, useless, children }) => (
  <a href={url}>{children}</a>
)

export default Link

What version of standard?

Standard: 12.0.1

What operating system, Node.js, and npm version?

OS: macOS 10.14 (18A391)
Node: v10.11.0
NPM: 6.4.1

What did you expect to happen?

To get an error like

link.js:3:22: 'useless' is assigned a value but never used.

What actually happened?

From what I can recall this would previously output an error since this is a conflict with one of the rules of Standard No unused variables.

Output:

empty output
@justinkalland

This comment has been minimized.

Copy link

commented Dec 20, 2018

From the best I can tell StandardJS has always skipped checking for unused arguments.

I have created a pull request that changes the behavior.

@stale

This comment has been minimized.

Copy link

commented Mar 20, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Mar 20, 2019

@stale stale bot closed this Mar 27, 2019

@lock lock bot locked as resolved and limited conversation to collaborators Jun 26, 2019

@feross feross reopened this Jul 11, 2019

@stale stale bot removed the stale label Jul 11, 2019

@standard standard unlocked this conversation Jul 11, 2019

@feross

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

Discussion moving here: standard/eslint-config-standard#136

@feross feross closed this Jul 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.