-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
726 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: "es-x/no-string-prototype-iswellformed" | ||
description: "disallow the `String.prototype.isWellFormed` methods" | ||
since: "v7.1.0" | ||
--- | ||
|
||
# es-x/no-string-prototype-iswellformed | ||
> disallow the `String.prototype.isWellFormed` methods | ||
- ✅ The following configurations enable this rule: [no-is-usv-string] and [no-new-in-esnext] | ||
|
||
This rule reports ES2024 [`String.prototype.isWellFormed` methods](https://github.com/tc39/proposal-is-usv-string) as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-string-prototype-iswellformed: [error, { aggressive: true }] */ | ||
"str".isWellFormed() | ||
``` | ||
|
||
</eslint-playground>a | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```yaml | ||
rules: | ||
es-x/no-string-prototype-iswellformed: [error, { aggressive: false }] | ||
``` | ||
|
||
### aggressive: boolean | ||
|
||
Configure the aggressive mode for only this rule. | ||
This is prior to the `settings['es-x'].aggressive` setting. | ||
|
||
## 🚀 Version | ||
|
||
This rule was introduced in v7.1.0. | ||
|
||
## 📚 References | ||
|
||
- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-string-prototype-iswellformed.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-string-prototype-iswellformed.js) | ||
|
||
[no-is-usv-string]: ../configs/index.md#no-is-usv-string | ||
[no-new-in-esnext]: ../configs/index.md#no-new-in-esnext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: "es-x/no-string-prototype-towellformed" | ||
description: "disallow the `String.prototype.toWellFormed` methods" | ||
since: "v7.1.0" | ||
--- | ||
|
||
# es-x/no-string-prototype-towellformed | ||
> disallow the `String.prototype.toWellFormed` methods | ||
- ✅ The following configurations enable this rule: [no-is-usv-string] and [no-new-in-esnext] | ||
|
||
This rule reports ES2024 [`String.prototype.toWellFormed` methods](https://github.com/tc39/proposal-is-usv-string) as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-string-prototype-towellformed: [error, { aggressive: true }] */ | ||
"str".toWellFormed() | ||
``` | ||
|
||
</eslint-playground>a | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```yaml | ||
rules: | ||
es-x/no-string-prototype-towellformed: [error, { aggressive: false }] | ||
``` | ||
|
||
### aggressive: boolean | ||
|
||
Configure the aggressive mode for only this rule. | ||
This is prior to the `settings['es-x'].aggressive` setting. | ||
|
||
## 🚀 Version | ||
|
||
This rule was introduced in v7.1.0. | ||
|
||
## 📚 References | ||
|
||
- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-string-prototype-towellformed.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-string-prototype-towellformed.js) | ||
|
||
[no-is-usv-string]: ../configs/index.md#no-is-usv-string | ||
[no-new-in-esnext]: ../configs/index.md#no-new-in-esnext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* DON'T EDIT THIS FILE. | ||
* This file was generated by "scripts/update-lib-flat-configs.js" script. | ||
*/ | ||
"use strict" | ||
|
||
module.exports = { | ||
plugins: { | ||
get "es-x"() { | ||
return require("../../index.js") | ||
}, | ||
}, | ||
rules: { | ||
"es-x/no-string-prototype-iswellformed": "error", | ||
"es-x/no-string-prototype-towellformed": "error", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* DON'T EDIT THIS FILE. | ||
* This file was generated by "scripts/update-lib-configs.js" script. | ||
*/ | ||
"use strict" | ||
|
||
module.exports = { | ||
plugins: ["es-x"], | ||
rules: { | ||
"es-x/no-string-prototype-iswellformed": "error", | ||
"es-x/no-string-prototype-towellformed": "error", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.