-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
no-nonstandard-*-properties
rules (#214)
- Loading branch information
Showing
192 changed files
with
12,530 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: "es-x/no-nonstandard-array-properties" | ||
description: "disallow non-standard properties on `Array` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-array-properties | ||
> disallow non-standard properties on `Array` class | ||
- ❗ <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge> | ||
|
||
This rule reports non-standard properties on `Array` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-array-properties: error */ | ||
Array.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-array-properties": [ | ||
"error", | ||
{ | ||
"allow": [] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### allow: string[] | ||
|
||
An array of non-standard property names to allow. | ||
|
||
## 📚 References | ||
|
||
- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-nonstandard-array-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-array-properties.js) |
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-nonstandard-array-prototype-properties" | ||
description: "disallow non-standard properties on Array instance" | ||
--- | ||
|
||
# es-x/no-nonstandard-array-prototype-properties | ||
> disallow non-standard properties on Array instance | ||
- ❗ <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge> | ||
|
||
This rule reports non-standard properties on Array instance as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-array-prototype-properties: error */ | ||
const foo = []; | ||
foo.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-array-prototype-properties": [ | ||
"error", | ||
{ | ||
"allow": [] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### allow: string[] | ||
|
||
An array of non-standard property names to allow. | ||
|
||
## 📚 References | ||
|
||
- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-nonstandard-array-prototype-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-array-prototype-properties.js) |
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,50 @@ | ||
--- | ||
title: "es-x/no-nonstandard-arraybuffer-properties" | ||
description: "disallow non-standard properties on `ArrayBuffer` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-arraybuffer-properties | ||
> disallow non-standard properties on `ArrayBuffer` class | ||
- ❗ <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge> | ||
|
||
This rule reports non-standard properties on `ArrayBuffer` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-arraybuffer-properties: error */ | ||
ArrayBuffer.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-arraybuffer-properties": [ | ||
"error", | ||
{ | ||
"allow": [] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### allow: string[] | ||
|
||
An array of non-standard property names to allow. | ||
|
||
## 📚 References | ||
|
||
- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-nonstandard-arraybuffer-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-arraybuffer-properties.js) |
51 changes: 51 additions & 0 deletions
51
docs/rules/no-nonstandard-arraybuffer-prototype-properties.md
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-nonstandard-arraybuffer-prototype-properties" | ||
description: "disallow non-standard properties on ArrayBuffer instance" | ||
--- | ||
|
||
# es-x/no-nonstandard-arraybuffer-prototype-properties | ||
> disallow non-standard properties on ArrayBuffer instance | ||
- ❗ <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge> | ||
|
||
This rule reports non-standard properties on ArrayBuffer instance as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-arraybuffer-prototype-properties: error */ | ||
const foo = new ArrayBuffer(); | ||
foo.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-arraybuffer-prototype-properties": [ | ||
"error", | ||
{ | ||
"allow": [] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### allow: string[] | ||
|
||
An array of non-standard property names to allow. | ||
|
||
## 📚 References | ||
|
||
- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-nonstandard-arraybuffer-prototype-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-arraybuffer-prototype-properties.js) |
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,50 @@ | ||
--- | ||
title: "es-x/no-nonstandard-atomics-properties" | ||
description: "disallow non-standard properties on `Atomics` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-atomics-properties | ||
> disallow non-standard properties on `Atomics` class | ||
- ❗ <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge> | ||
|
||
This rule reports non-standard properties on `Atomics` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-atomics-properties: error */ | ||
Atomics.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-atomics-properties": [ | ||
"error", | ||
{ | ||
"allow": [] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### allow: string[] | ||
|
||
An array of non-standard property names to allow. | ||
|
||
## 📚 References | ||
|
||
- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-nonstandard-atomics-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-atomics-properties.js) |
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,50 @@ | ||
--- | ||
title: "es-x/no-nonstandard-bigint-properties" | ||
description: "disallow non-standard properties on `BigInt` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-bigint-properties | ||
> disallow non-standard properties on `BigInt` class | ||
- ❗ <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge> | ||
|
||
This rule reports non-standard properties on `BigInt` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-bigint-properties: error */ | ||
BigInt.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-bigint-properties": [ | ||
"error", | ||
{ | ||
"allow": [] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### allow: string[] | ||
|
||
An array of non-standard property names to allow. | ||
|
||
## 📚 References | ||
|
||
- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-nonstandard-bigint-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-bigint-properties.js) |
Oops, something went wrong.