eslint-plugin-jasmine-jquery
ESLint rules for jasmine-jquery
Installation
You'll first need to install ESLint:
$ npm install eslint --save-dev
Next, install eslint-plugin-jasmine-jquery
:
$ npm install eslint-plugin-jasmine-jquery --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-jasmine-jquery
globally.
Usage
Add jasmine-jquery
to the plugins section of your .eslintrc
configuration file, as well as including jasmine
and jquery
environments:
Recommended configuration
Use the default settings by adding it to the extends section of your .eslintrc
:
Supported Rules
/no-global-shortcuts
The recommended config enables all global shortcut functions by default. (All functions as of jasmine-jquery v2.1.1, see the complete list here.)
To disallow all jasmine-jquery's global shortcut functions, configure this rule:
Options
To allow certain functions, pass in an array as the second argument containing the exceptions:
This will throw an error for any global shortcut method except loadFixtures()
and setFixtures()
.
Development
Install dev dependencies
npm install
Run tests
npm test
Issues, Bugs, and Suggestions
Report any issues or submit suggestions for rules on GitHub.