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

eslint complains about "Do not use 'new' for side effects" #8

Closed
floek opened this issue Dec 22, 2017 · 3 comments
Closed

eslint complains about "Do not use 'new' for side effects" #8

floek opened this issue Dec 22, 2017 · 3 comments
Labels

Comments

@floek
Copy link

floek commented Dec 22, 2017

ESLint doesn't like "new"

I initialize FlowRouterMeta:
new FlowRouterMeta(FlowRouter); new FlowRouterTitle(FlowRouter);

Then eslint complains about it:

error Do not use 'new' for side effects no-new

Is there an other way to do this?

Thank you!

@dr-dimitru
Copy link
Member

dr-dimitru commented Dec 22, 2017

Hello @floek ,

Don't worry about it, just a warning. If it's too annoying for you simply assign it to some var:

const frPlugins = {
  meta: new FlowRouterMeta(FlowRouter),
  title: new FlowRouterTitle(FlowRouter)
};

It may warn you what frPlugins defined, but not used :)

@dr-dimitru
Copy link
Member

Hello @floek ,

Could we close this one?
//cc @mksh-su

@floek
Copy link
Author

floek commented Jan 19, 2018

Hi,

yes thanks.

floek

@floek floek closed this as completed Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants