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

function con't chang itself, i don't kone why? #1298

Closed
Suntgr opened this issue Jun 20, 2019 · 2 comments

Comments

@Suntgr
Copy link

commented Jun 20, 2019

function toBeRunOnce(args)  {
      // some stuff to do
      console.log('toBeRunOnce has completed');
      toBeRunOnce = function() {};
    }

standard: Use JavaScript Standard Style (https://standardjs.com)
D:\code......: 'toBeRunOnce' is a function.

@dtudury

This comment has been minimized.

Copy link

commented Jul 28, 2019

if you run standard with a -v you'll get a more informative:
D:\code......: 'toBeRunOnce' is a function. (no-func-assign)

googling "no-func-assign" returns the eslint description of the rule and the standardjs list of rules

@feross

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

If you want to ignore the rule for this particular case, you can follow the instructions here: https://standardjs.com/#how-do-i-hide-a-certain-warning

@feross feross closed this Jul 28, 2019

@feross feross added the question label Jul 28, 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.