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

Linting issues #68

Open
orangecms opened this issue Sep 27, 2016 · 1 comment
Open

Linting issues #68

orangecms opened this issue Sep 27, 2016 · 1 comment

Comments

@orangecms
Copy link

I have a Meteor project, and am using a globally installed Chimp as suggested, i.e. I do not have Mocha nor Chai in the project dependencies. There are now some drawbacks with linting:

  1. Since Chimp is injecting Mocha and Chai, instead of import { expect } from 'chai', I use the global expect.
    Because of that, I have /* global expect */ configured.
  2. When setting up tests, I need to require some libraries within Meteor's context. So I specify /* eslint-disable global-require */.
  3. Because the variables in the spec are not within Meteor's context then, I need to pass them on, and to avoid renaming them, I prefer to have the same var names. So I also specify /* eslint-disable no-shadow */.
    Otherwise I would have to prefix them, something like
browser.executeAsync((mFoo, done) => {
  /* do something with mFoo which is actually foo in the spec's scope */
}, foo);

That would be just a workaround though.

I don't want to confuse the actual project within this config, which is why I put this into all the specs. It looks quite ugly though. Are there plans maybe for a Chimp plugin for ESLint?

@samhatoum
Copy link
Member

samhatoum commented Sep 27, 2016

It's a great idea to make a Chimp ESLint plugin. Would love a PR on the Chimp repo :)

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

No branches or pull requests

2 participants