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

Definition for rule was not found #43

Closed
0xR opened this issue Mar 9, 2016 · 2 comments
Closed

Definition for rule was not found #43

0xR opened this issue Mar 9, 2016 · 2 comments

Comments

@0xR
Copy link

0xR commented Mar 9, 2016

I'm trying to use this plugin. I have this package.json:

{
  "name": "eslint-jasmine-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "eslint": "^2.3.0",
    "eslint-plugin-jasmine": "^1.6.0"
  }
}

This eslintrc:

{
  "plugins": [
    "jasmine"
  ],
  "rules": {
    "named-spy": 0,
    "no-focused-tests": 2,
    "no-disabled-tests": 1,
    "no-suite-dupes": 1,
    "no-spec-dupes": 1,
    "missing-expect": 0,
    "no-suite-callback-args": 2
  }
}

I run ./node_modules/.bin/eslint witherror.js and I get these errors:

/tmp/eslint-jasmine-test/witherror.js
  1:1  error    Definition for rule 'no-focused-tests' was not found        no-focused-tests
  1:1  warning  Definition for rule 'no-disabled-tests' was not found       no-disabled-tests
  1:1  warning  Definition for rule 'no-suite-dupes' was not found          no-suite-dupes
  1:1  warning  Definition for rule 'no-spec-dupes' was not found           no-spec-dupes
  1:1  error    Definition for rule 'no-suite-callback-args' was not found  no-suite-callback-args

Does this plugin not work with jasmine 2?

@tomcorke
Copy link

Try defining the rules like this:

"jasmine/no-focused-tests": 2

@0xR
Copy link
Author

0xR commented Mar 22, 2016

That's probably it. It might help if an example of this is json notation is in the README for easy copy pasting. I'll test it tomorrow.

@tlvince tlvince closed this as completed in 8443747 Apr 4, 2016
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