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

Rename package to eslint-plugin-no-jquery #67

Merged
merged 1 commit into from
Feb 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# eslint-plugin-jquery release history for Wikimedia fork of upstream project
# eslint-plugin-no-jquery release history

# Release history as wikimedia/eslint-plugin-jquery

## v1.3.2-wmf.6
* New rule: `no-box-model` (Ed Sanders)
Expand Down
178 changes: 89 additions & 89 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# eslint-plugin-jquery
# eslint-plugin-no-jquery

Disallow jQuery functions with native equivalents. This is the Wikimedia-maintained fork of [this project](https://www.npmjs.com/package/eslint-plugin-jquery).
Disallow jQuery functions with native equivalents. This is the Wikimedia-maintained fork of [this project](https://www.npmjs.com/package/eslint-plugin-no-jquery).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm.. this sentence doesn't seem right.


## Installation

Expand All @@ -10,28 +10,28 @@ You'll first need to install [ESLint](http://eslint.org):
$ npm install eslint --save-dev
```

Next, install `eslint-plugin-jquery`:
Next, install `eslint-plugin-no-jquery`:

```
$ npm install eslint-plugin-jquery --save-dev
$ npm install eslint-plugin-no-jquery --save-dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-jquery` globally.
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-no-jquery` globally.

## Usage

Add `jquery` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
"extends": "plugin:jquery/deprecated",
"extends": "plugin:no-jquery/deprecated",
"plugins": [
"jquery"
]
}
```

The pre-set profile `plugin:jquery/deprecated` includes all known deprecated and removed code, and is updated as new releases of jQuery come out. You can instead use profiles targetting specific versions of jQuery if you know the environment in which your code will operate. There are profiles for jQuery 3.3.x+ environments (`deprecated-3.3`), 3.0.x+ (`deprecated-3.0`), and several others for completeness.
The pre-set profile `plugin:no-jquery/deprecated` includes all known deprecated and removed code, and is updated as new releases of jQuery come out. You can instead use profiles targetting specific versions of jQuery if you know the environment in which your code will operate. There are profiles for jQuery 3.3.x+ environments (`deprecated-3.3`), 3.0.x+ (`deprecated-3.0`), and several others for completeness.

Alternatively, you can pick out rules individually:

Expand All @@ -41,88 +41,88 @@ Alternatively, you can pick out rules individually:
"jquery"
],
"rules": {
"jquery/no-ajax": 2,
"jquery/no-ajax-events": 2,
"jquery/no-and-self": 2,
"jquery/no-animate": 2,
"jquery/no-animate-toggle": 2,
"jquery/no-attr": 2,
"jquery/no-bind": 2,
"jquery/no-box-model": 2,
"jquery/no-browser": 2,
"jquery/no-class": 2,
"jquery/no-clone": 2,
"jquery/no-closest": 2,
"jquery/no-context-prop": 2,
"jquery/no-css": 2,
"jquery/no-data": 2,
"jquery/no-deferred": 2,
"jquery/no-delegate": 2,
"jquery/no-die": 2,
"jquery/no-each": 2,
"jquery/no-each-collection": 2,
"jquery/no-each-util": 2,
"jQuery/no-error-shorthand": 2,
"jquery/no-event-shorthand": 2,
"jquery/no-extend": 2,
"jquery/no-fade": 2,
"jquery/no-filter": 2,
"jquery/no-find": 2,
"jquery/no-fx-interval": 2,
"jquery/no-global-eval": 2,
"jquery/no-grep": 2,
"jquery/no-has": 2,
"jquery/no-hide": 2,
"jquery/no-hold-ready": 2,
"jquery/no-html": 2,
"jquery/no-in-array": 2,
"jquery/no-is-array": 2,
"jquery/no-is-function": 2,
"jquery/no-is-numeric": 2,
"jquery/no-is-window": 2,
"jquery/no-is": 2,
"jquery/no-live": 2,
"jquery/no-load": 2,
"jquery/no-load-shorthand": 2,
"jquery/no-map": 2,
"jquery/no-map-collection": 2,
"jquery/no-map-util": 2,
"jquery/no-merge": 2,
"jquery/no-noop": 2,
"jquery/no-now": 2,
"jquery/no-on-ready": 2,
"jquery/no-param": 2,
"jquery/no-parent": 2,
"jquery/no-parents": 2,
"jquery/no-parse-html": 2,
"jquery/no-parse-html-literal": 2,
"jquery/no-parse-json": 2,
"jquery/no-prop": 2,
"jquery/no-proxy": 2,
"jquery/no-ready": 2,
"jquery/no-ready-shorthand": 2,
"jquery/no-global-selector": 2,
"jquery/no-selector-prop": 2,
"jquery/no-serialize": 2,
"jquery/no-show": 2,
"jquery/no-size": 2,
"jquery/no-sizzle": 2,
"jquery/no-slide": 2,
"jquery/no-sub": 2,
"jquery/no-submit": 2,
"jquery/no-support": 2,
"jquery/no-text": 2,
"jquery/no-toggle": 2,
"jquery/no-trigger": 2,
"jquery/no-trim": 2,
"jquery/no-type": 2,
"jquery/no-unbind": 2,
"jquery/no-undelegate": 2,
"jquery/no-unique": 2,
"jquery/no-unload-shorthand": 2,
"jquery/no-val": 2,
"jquery/no-when": 2,
"jquery/no-wrap": 2
"no-jquery/no-ajax": 2,
"no-jquery/no-ajax-events": 2,
"no-jquery/no-and-self": 2,
"no-jquery/no-animate": 2,
"no-jquery/no-animate-toggle": 2,
"no-jquery/no-attr": 2,
"no-jquery/no-bind": 2,
"no-jquery/no-box-model": 2,
"no-jquery/no-browser": 2,
"no-jquery/no-class": 2,
"no-jquery/no-clone": 2,
"no-jquery/no-closest": 2,
"no-jquery/no-context-prop": 2,
"no-jquery/no-css": 2,
"no-jquery/no-data": 2,
"no-jquery/no-deferred": 2,
"no-jquery/no-delegate": 2,
"no-jquery/no-die": 2,
"no-jquery/no-each": 2,
"no-jquery/no-each-collection": 2,
"no-jquery/no-each-util": 2,
"no-jquery/no-error-shorthand": 2,
"no-jquery/no-event-shorthand": 2,
"no-jquery/no-extend": 2,
"no-jquery/no-fade": 2,
"no-jquery/no-filter": 2,
"no-jquery/no-find": 2,
"no-jquery/no-fx-interval": 2,
"no-jquery/no-global-eval": 2,
"no-jquery/no-grep": 2,
"no-jquery/no-has": 2,
"no-jquery/no-hide": 2,
"no-jquery/no-hold-ready": 2,
"no-jquery/no-html": 2,
"no-jquery/no-in-array": 2,
"no-jquery/no-is-array": 2,
"no-jquery/no-is-function": 2,
"no-jquery/no-is-numeric": 2,
"no-jquery/no-is-window": 2,
"no-jquery/no-is": 2,
"no-jquery/no-live": 2,
"no-jquery/no-load": 2,
"no-jquery/no-load-shorthand": 2,
"no-jquery/no-map": 2,
"no-jquery/no-map-collection": 2,
"no-jquery/no-map-util": 2,
"no-jquery/no-merge": 2,
"no-jquery/no-noop": 2,
"no-jquery/no-now": 2,
"no-jquery/no-on-ready": 2,
"no-jquery/no-param": 2,
"no-jquery/no-parent": 2,
"no-jquery/no-parents": 2,
"no-jquery/no-parse-html": 2,
"no-jquery/no-parse-html-literal": 2,
"no-jquery/no-parse-json": 2,
"no-jquery/no-prop": 2,
"no-jquery/no-proxy": 2,
"no-jquery/no-ready": 2,
"no-jquery/no-ready-shorthand": 2,
"no-jquery/no-global-selector": 2,
"no-jquery/no-selector-prop": 2,
"no-jquery/no-serialize": 2,
"no-jquery/no-show": 2,
"no-jquery/no-size": 2,
"no-jquery/no-sizzle": 2,
"no-jquery/no-slide": 2,
"no-jquery/no-sub": 2,
"no-jquery/no-submit": 2,
"no-jquery/no-support": 2,
"no-jquery/no-text": 2,
"no-jquery/no-toggle": 2,
"no-jquery/no-trigger": 2,
"no-jquery/no-trim": 2,
"no-jquery/no-type": 2,
"no-jquery/no-unbind": 2,
"no-jquery/no-undelegate": 2,
"no-jquery/no-unique": 2,
"no-jquery/no-unload-shorthand": 2,
"no-jquery/no-val": 2,
"no-jquery/no-when": 2,
"no-jquery/no-wrap": 2
}
}
```
Expand Down
62 changes: 31 additions & 31 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,74 +88,74 @@ module.exports = {
configs: {
// Use this profile if you want to avoid all known deprecated jQuery tools.
deprecated: {
extends: 'plugin:jquery/deprecated-3.3'
extends: 'plugin:no-jquery/deprecated-3.3'
},
// Use this profile if you're writing code targetting jQuery 3.3.x environments.
'deprecated-3.3': {
extends: 'plugin:jquery/deprecated-3.0',
extends: 'plugin:no-jquery/deprecated-3.0',
rules: {
'jquery/no-is-function': 2,
'jquery/no-is-window': 2
'no-jquery/no-is-function': 2,
'no-jquery/no-is-window': 2
}
},
// Use this profile if you're writing code targetting jQuery 3.0.x environments.
'deprecated-3.0': {
extends: 'plugin:jquery/deprecated-1.10',
extends: 'plugin:no-jquery/deprecated-1.10',
rules: {
'jquery/no-bind': 2,
'jquery/no-unbind': 2,
'jquery/no-delegate': 2,
'jquery/no-undelegate': 2,
'jquery/no-fx-interval': 2,
'jquery/no-parse-json': 2,
'jquery/no-ready-shorthand': 2,
'jquery/no-unique': 2
'no-jquery/no-bind': 2,
'no-jquery/no-unbind': 2,
'no-jquery/no-delegate': 2,
'no-jquery/no-undelegate': 2,
'no-jquery/no-fx-interval': 2,
'no-jquery/no-parse-json': 2,
'no-jquery/no-ready-shorthand': 2,
'no-jquery/no-unique': 2
}
},
// Use this profile if you're writing code targetting jQuery 1.10.x environments.
'deprecated-1.10': {
extends: 'plugin:jquery/deprecated-1.9',
extends: 'plugin:no-jquery/deprecated-1.9',
rules: {
'jquery/no-context-prop': 2
'no-jquery/no-context-prop': 2
}
},
// Use this profile if you're writing code targetting jQuery 1.9.x environments.
'deprecated-1.9': {
extends: 'plugin:jquery/deprecated-1.8',
extends: 'plugin:no-jquery/deprecated-1.8',
rules: {
'jquery/no-support': 2
'no-jquery/no-support': 2
}
},
// Use this profile if you're writing code targetting jQuery 1.8.x environments.
'deprecated-1.8': {
extends: 'plugin:jquery/deprecated-1.7',
extends: 'plugin:no-jquery/deprecated-1.7',
rules: {
'jquery/no-and-self': 2,
'no-jquery/no-and-self': 2,
// FIXME: `deferred.pipe()`
'jquery/no-error-shorthand': 2,
'jquery/no-load-shorthand': 2,
'jquery/no-on-ready': 2,
'jquery/no-size': 2,
'no-jquery/no-error-shorthand': 2,
'no-jquery/no-load-shorthand': 2,
'no-jquery/no-on-ready': 2,
'no-jquery/no-size': 2,
// FIXME: `$(...).toggle(fn,fn) (excluding https://api.jquery.com/toggle/)
'jquery/no-unload-shorthand': 2
'no-jquery/no-unload-shorthand': 2
}
},
// Use this profile if you're writing code targetting jQuery 1.7.x environments.
'deprecated-1.7': {
extends: 'plugin:jquery/deprecated-1.3',
extends: 'plugin:no-jquery/deprecated-1.3',
rules: {
// FIXME: `deferred.isRejected()/isResolved()`
'jquery/no-die': 2,
'jquery/no-live': 2,
'jquery/no-sub': 2,
'jquery/no-selector-prop': 2
'no-jquery/no-die': 2,
'no-jquery/no-live': 2,
'no-jquery/no-sub': 2,
'no-jquery/no-selector-prop': 2
}
},
// Use this profile if you're writing code targetting jQuery 1.3.x environments.
'deprecated-1.3': {
rules: {
'jquery/no-box-model': 2,
'jquery/no-browser': 2
'no-jquery/no-box-model': 2,
'no-jquery/no-browser': 2
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "eslint-plugin-jquery",
"name": "eslint-plugin-no-jquery",
"version": "1.3.2-wmf.6",
"description": "Disallow jQuery functions with native equivalents.",
"repository": {
"type": "git",
"url": "git+https://github.com/wikimedia/eslint-plugin-jquery.git"
"url": "git+https://github.com/wikimedia/eslint-plugin-no-jquery.git"
},
"license": "MIT",
"keywords": [
Expand All @@ -25,12 +25,12 @@
"eslint": "^5.13.0",
"eslint-plugin-prettier": "^2.6.2",
"mocha": "^5.2.0",
"prettier": "^1.14.2"
"prettier": "^1.16.4"
},
"bugs": {
"url": "https://github.com/wikimedia/eslint-plugin-jquery/issues"
"url": "https://github.com/wikimedia/eslint-plugin-no-jquery/issues"
},
"homepage": "https://github.com/wikimedia/eslint-plugin-jquery#readme",
"homepage": "https://github.com/wikimedia/eslint-plugin-no-jquery#readme",
"directories": {
"test": "tests"
},
Expand Down