Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
XhmikosR
c7ea9f83d1 Explicitly enable the rules 2020-11-30 11:55:29 +02:00
XhmikosR
57ee20ea1c Disable a few rules
* `jasmine/expect-single-argument` since it wrongfully flags `expect().nothing()`
* `jasmine/new-line-before-expect`
* `jasmine/no-spec-dupes`
* `jasmine/prefer-toHaveBeenCalledWith`
2020-11-30 11:50:39 +02:00
XhmikosR
8a948ccc0d Add eslint-plugin-jasmine 2020-11-30 11:50:39 +02:00
3 changed files with 40 additions and 12 deletions

View file

@ -1,16 +1,37 @@
{
"root": true,
"extends": [
"../../../.eslintrc.json"
],
"overrides": [
{
"files": [
"**/*.spec.js"
],
"env": {
"jasmine": true
},
"plugins": [
"jasmine"
],
"extends": [
"../../../.eslintrc.json",
"plugin:jasmine/recommended"
],
"rules": {
"jasmine/expect-matcher": "error",
"jasmine/expect-single-argument": "off",
"jasmine/missing-expect": [
"error",
"expect()",
"testElementIsActiveAfterScroll()"
],
"jasmine/named-spy": "off",
"jasmine/new-line-before-expect": "off",
"jasmine/new-line-between-declarations": "error",
"jasmine/no-disabled-tests": "error",
"jasmine/no-expect-in-setup-teardown": "error",
"jasmine/no-focused-tests": "error",
"jasmine/no-global-setup": "error",
"jasmine/no-pending-tests": "error",
"jasmine/no-promise-without-done-fail": "error",
"jasmine/no-spec-dupes": "off",
"jasmine/no-suite-callback-args": "error",
"jasmine/no-suite-dupes": "error",
"jasmine/no-unsafe-spy": "error",
"jasmine/prefer-jasmine-matcher": "error",
"jasmine/prefer-toHaveBeenCalledWith": "off"
}
}
]
}

6
package-lock.json generated
View file

@ -4048,6 +4048,12 @@
}
}
},
"eslint-plugin-jasmine": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-jasmine/-/eslint-plugin-jasmine-4.1.1.tgz",
"integrity": "sha512-uS7kvt7RPUB/gLDwhJ/Ax0APrmkj7In8VJWkiZLYHafz2Ix74mMRJx82YZZ3zHRa/YOuTL+ig6dW/aKwdNzUuw==",
"dev": true
},
"eslint-plugin-unicorn": {
"version": "23.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-23.0.0.tgz",

View file

@ -106,6 +106,7 @@
"eslint": "^7.14.0",
"eslint-config-xo": "^0.33.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jasmine": "^4.1.1",
"eslint-plugin-unicorn": "^23.0.0",
"find-unused-sass-variables": "^3.0.0",
"glob": "^7.1.6",