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

'describe' is not defined no-undef error #56

Closed
triberraar opened this issue Apr 29, 2016 · 2 comments
Closed

'describe' is not defined no-undef error #56

triberraar opened this issue Apr 29, 2016 · 2 comments

Comments

@triberraar
Copy link

Hej,
This must be my lack of understanding, but when i add this plugin to my eslint configuration and run it i get these errors:

3:1 error 'describe' is not defined no-undef
4:5 error 'it' is not defined no-undef
5:9 error 'expect' is not defined no-undef
7:5 error 'it' is not defined no-undef
8:9 error 'expect' is not defined no-undef

My .eslintrc looks like this:

{
  "plugins": ["jasmine"],
  "extends": ["angular", "eslint:recommended", "plugin:jasmine/recommended"],
  "rules": {
    "quotes": [ 2, "single"],
    "strict": [2, "global"],
    "semi": ["error", "always"],
    "angular/on-watch": "warn"
  }
}

And in my package.json i have version ^2.3.0 for eslint and ^1.8.1 for eslint-plugin-jasmin.

Any help/pointers are appreciated.

@tlvince
Copy link
Owner

tlvince commented Apr 30, 2016

I believe you're missing the jasmine environment there. Try:

{
  "plugins": ["jasmine"],
  "extends": ["angular", "eslint:recommended", "plugin:jasmine/recommended"],
  "rules": {
    "quotes": [ 2, "single"],
    "strict": [2, "global"],
    "semi": ["error", "always"],
    "angular/on-watch": "warn"
  },
  "env": {
    "jasmine": true
  }
}

@triberraar
Copy link
Author

That is it, can't seem to find it in the readme or it is just my lack of understanding eslint.

jrencz pushed a commit to jrencz/eslint-plugin-jasmine that referenced this issue Dec 20, 2018
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