From 39eff3f831a9a70f9156f67ef49a8c3fab053eb1 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Sun, 17 Feb 2019 18:13:39 +0000 Subject: [PATCH] Rename package to eslint-plugin-no-jquery --- Changelog.md | 4 +- README.md | 178 +++++++++++++++++++++++----------------------- index.js | 62 ++++++++-------- package-lock.json | 8 +-- package.json | 10 +-- 5 files changed, 132 insertions(+), 130 deletions(-) diff --git a/Changelog.md b/Changelog.md index 2679424c..09b8aa65 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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) diff --git a/README.md b/README.md index 02cafb91..602d690c 100644 --- a/README.md +++ b/README.md @@ -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). ## Installation @@ -10,13 +10,13 @@ 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 @@ -24,14 +24,14 @@ Add `jquery` to the plugins section of your `.eslintrc` configuration file. You ```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: @@ -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 } } ``` diff --git a/index.js b/index.js index e6f6ce6e..b2f49732 100644 --- a/index.js +++ b/index.js @@ -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 } } } diff --git a/package-lock.json b/package-lock.json index 15d7b4cc..c2bda8f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "@wikimedia/eslint-plugin-jquery", + "name": "eslint-plugin-no-jquery", "version": "1.3.2-wmf.6", "lockfileVersion": 1, "requires": true, @@ -911,9 +911,9 @@ "dev": true }, "prettier": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.2.tgz", - "integrity": "sha512-McHPg0n1pIke+A/4VcaS2en+pTNjy4xF+Uuq86u/5dyDO59/TtFZtQ708QIRkEZ3qwKz3GVkVa6mpxK/CpB8Rg==", + "version": "1.16.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz", + "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==", "dev": true }, "progress": { diff --git a/package.json b/package.json index 2f4c0b24..6a56325c 100644 --- a/package.json +++ b/package.json @@ -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": [ @@ -25,12 +25,12 @@ "eslint": "^5.4.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" },