4.2.2 • Published 9 months ago

eslint-plugin-jasmine v4.2.2

Weekly downloads
238,070
License
MIT
Repository
github
Last release
9 months ago

eslint-plugin-jasmine

Build Status npm version License

ESLint rules for Jasmine

Usage

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

    npm install --save-dev eslint-plugin-jasmine
  2. Enable the plugin by adding it to your .eslintrc:

    plugins:
      - jasmine

ESLint itself provides a Jasmine environment for Jasmine's global variables. It's therefore recommended to also enable it in your .eslintrc:

plugins:
  - jasmine
env:
  jasmine: true

By default, no rules are enabled. See the next section for more.

Configuration

This plugin exports a recommended configuration that enforces good practices.

To enable this configuration, use the extends property in your .eslintrc config file:

plugins:
  - jasmine
env:
  jasmine: true
extends: "plugin:jasmine/recommended"

See the ESLint config docs for more information about extending configuration files.

Rules

RuleRecommendedOptions
expect-matcher1,
expect-single-argument1,
missing-expect0, 'expect()', 'expectAsync()'expectation function names
named-spy0
new-line-before-expect1
new-line-between-declarations1
no-assign-spyon0
no-describe-variables0
no-disabled-tests1
no-expect-in-setup-teardown1, 'expect()', 'expectAsync()'expectation function names
no-focused-tests2
no-global-setup2
no-pending-tests1
no-promise-without-done-fail1
no-spec-dupes1, 'block'['block', 'branch']
no-suite-callback-args2
no-suite-dupes1, 'block'['block', 'branch']
no-unsafe-spy1
valid-expectdeprecated
prefer-jasmine-matcher1
prefer-promise-strategies1
prefer-toHaveBeenCalledWith1
prefer-toBeUndefined0['always', 'never']

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

You may customise each rule by adding a value in your .eslintrc rules property:

plugins:
  - jasmine
env:
  jasmine: true
rules:
  jasmine/no-focused-tests: 0
  jasmine/no-suite-dupes:
    - 2
    - branch

See configuring rules for more information.

Author

© 2016 - 2017 Tom Vincent git@tlvince.com and contributors.

License

Released under the MIT license.

do-fneslint-config-ant-gular@infinitebrahmanuniverse/nolb-eslint-plugin-j@everything-registry/sub-chunk-1612web-ui-depssuperdesk-code-styleutquaeeslint-config-kiforirving@bytesquid/eslint-config@argodevops/eslint-config@beanbag/eslint-plugin@cequens/eslint-config-react-app@colin-etchells/okta-signin-widgetunb-cs2613@html-validate/eslint-config-protractor@eslint-config-globex/jasmine@frostbitecms/eslint-config@labforward/eslint-config-drivers@merkur/tool-configs@merkur/tools@metahub/eslint-config@josundt/eslint-config@dwp/eslint-config-jasmine@radon-extension/build@popperjs/scripts@popperjs/test@partumgmbh/eslint-config-react@socifi/eslint-config@repodog/eslint-config-jasminepath-storeneon-extension-buildghs-umami-tonkotsu-curator-devtools@webpuppy/eslint-config@sunshinesmile/eslint-config-reactaxios-retry-anoderk-eslint-configblackjack-utilsdibslinteslint-deltaeslint-config-prettyeslint-plugin-banno-prismeslint-plugin-iqviaeslint-config-restricteslint-config-novodaeslint-config-udemy-jasmine-addonseslint-config-socifieslint-config-wix-editoreslint-config-sxt-engineeslint-config-weezeventeslint-config-fiskereslint-config-eq-authoreslint-config-acceleratoreslint-config-benjamin-van-ryseghemeslint-config-fbjs-extendedeslint-config-fbjs-opensourceeslint-config-afrasaeslint-config-build-engineeslint-config-cumul8eslint-config-current-thingeslint-config-ds82-jasmineeslint-config-iplayereslint-config-iplayer-legacyeslint-config-mnuboeslint-config-nbseslint-config-nebirueslint-config-hnhaddadeslint-config-ftgpeslint-config-gfpeslint-config-gametekeslint-config-morsedigitaleslint-plugin-murikieslint-plugin-nebiru
4.2.2

9 months ago

4.2.1

10 months ago

4.2.0

12 months ago

4.1.4-beta.1

1 year ago

4.1.4-beta.3

12 months ago

4.1.4-beta.2

1 year ago

4.1.3

4 years ago

4.1.2

4 years ago

4.1.1

5 years ago

4.1.0

6 years ago

4.0.0

6 years ago

3.0.0

6 years ago

2.10.1

7 years ago

2.10.0

7 years ago

2.9.3

7 years ago

2.9.2

7 years ago

2.9.1

8 years ago

2.9.0

8 years ago

2.8.6

8 years ago

2.8.5

8 years ago

2.8.4

8 years ago

2.8.3

8 years ago

2.8.2

8 years ago

2.8.1

8 years ago

2.8.0

8 years ago

2.7.1

8 years ago

2.7.0

8 years ago

2.6.2

8 years ago

2.6.1

8 years ago

2.6.0

8 years ago

2.5.0

8 years ago

2.4.0

8 years ago

2.3.2

8 years ago

2.3.1

8 years ago

2.3.0

8 years ago

2.2.0

9 years ago

2.1.2

9 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.9.0

9 years ago

1.8.1

9 years ago

1.8.0

9 years ago

1.7.0

9 years ago

1.6.0

10 years ago

1.5.2

10 years ago

1.5.1

10 years ago

1.5.0

10 years ago

1.4.0

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

1.0.0-rc.2

10 years ago