Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

tslint-plugin-jasmine

1.0.3 • Public • Published

npm version Build Status semantic-release

tslint-plugin-jasmine

TSLint rules for Jasmine

Usage

  1. Install tslint-plugin-jasmine as a dev dependency:

    npm install --save-dev tslint-plugin-jasmine
  2. Enable the rules by adding it to your tslint.json:

{
  "extends": [
    // ...other rules
    "tslint-plugin-jasmine"
  ],
  "rules": {
    // enable/disable rules
  }
}

Rules

No rules are enabled by default. You can use the recommended configuration:

Rule Recommended Options
expect-matcher { "severity": "warning" }
expect-single-argument { "severity": "warning" }
missing-expect { "severity": "off", "options": ["expect()", "expectAsync()"] } expectation function names
named-spy { "severity": "off" }
new-line-before-expect { "severity": "warning" }
new-line-between-declarations { "severity": "warning" }
no-assign-spyon { "severity": "off" }
no-describe-variables { "severity": "off" }
no-disabled-tests { "severity": "warning" }
no-expect-in-setup-teardown { "severity": "warning", "options" ["expect()", "expectAsync()"] } expectation function names
no-focused-tests { "severity": "error" }
no-global-setup { "severity": "error" }
no-promise-without-done-fail { "severity": "warning" }
no-spec-dupes { "severity": "warning" } 'branch'
no-suite-callback-args { "severity": "error" }
no-suite-dupes { "severity": "warning" } 'branch'
no-unsafe-spy { "severity": "warning" }
prefer-jasmine-matcher { "severity": "warning" }
prefer-to-have-been-called-with { "severity": "warning" }

For example, using the recommended configuration, the no-focused-tests rule is enabled and will cause TSLint to throw an error (with an exit code of 1) when triggered.

License

Released under the MIT license.

install

npm i tslint-plugin-jasmine

Downloadsweekly downloads

37

version

1.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability