Skip to content

Commit 4a5db0b

Browse files
authored
New config: deprecated-3.7 for new jQuery release (#300)
1 parent 6573ddb commit 4a5db0b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Add `no-jquery` to the plugins section of your `.eslintrc` configuration file. Y
3838

3939
The config **`plugin:no-jquery/recommended`** includes the recommended rule [`no-jquery/variable-pattern`](docs/rules/variable-pattern.md) which is required for method rules to work correctly.
4040

41-
The config **`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 configs targeting specific versions of jQuery if you know the environment in which your code will operate. There is a config for all minor versions from 1.0 to 3.6 (`deprecated-1.0`, ..., `deprecated-3.6`). Deprecation configs are cumulative, so they include all the rules for jQuery versions below them.
41+
The config **`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 configs targeting specific versions of jQuery if you know the environment in which your code will operate. There is a config for all minor versions from 1.0 to 3.6 (`deprecated-1.0`, ..., `deprecated-3.7`). Deprecation configs are cumulative, so they include all the rules for jQuery versions below them.
4242

4343
The config **`plugin:no-jquery/slim`** includes all features excluded from the official "slim" build of jQuery, specifically the [ajax](https://api.jquery.com/category/ajax/) and [effects](https://api.jquery.com/category/effects/) modules.
4444

README.md.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Add `no-jquery` to the plugins section of your `.eslintrc` configuration file. Y
3737

3838
The config **`plugin:no-jquery/recommended`** includes the recommended rule [`no-jquery/variable-pattern`](docs/rules/variable-pattern.md) which is required for method rules to work correctly.
3939

40-
The config **`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 configs targeting specific versions of jQuery if you know the environment in which your code will operate. There is a config for all minor versions from 1.0 to 3.6 (`deprecated-1.0`, ..., `deprecated-3.6`). Deprecation configs are cumulative, so they include all the rules for jQuery versions below them.
40+
The config **`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 configs targeting specific versions of jQuery if you know the environment in which your code will operate. There is a config for all minor versions from 1.0 to 3.6 (`deprecated-1.0`, ..., `deprecated-3.7`). Deprecation configs are cumulative, so they include all the rules for jQuery versions below them.
4141

4242
The config **`plugin:no-jquery/slim`** includes all features excluded from the official "slim" build of jQuery, specifically the [ajax](https://api.jquery.com/category/ajax/) and [effects](https://api.jquery.com/category/effects/) modules.
4343

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,12 @@ module.exports = {
126126
},
127127
// Use this config if you want to avoid all known deprecated jQuery tools.
128128
deprecated: {
129+
extends: 'plugin:no-jquery/deprecated-3.7'
130+
},
131+
// Use this config if you're writing code targetting jQuery 3.7.x environments.
132+
'deprecated-3.7': {
129133
extends: 'plugin:no-jquery/deprecated-3.6'
130134
},
131-
// Use this config if you're writing code targetting jQuery 3.6.x environments.
132135
'deprecated-3.6': {
133136
extends: 'plugin:no-jquery/deprecated-3.5'
134137
},

0 commit comments

Comments
 (0)