-
-
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 rules to check for global objects that have no static properties (#…
…232)
- Loading branch information
Showing
23 changed files
with
898 additions
and
0 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-dataview-properties" | ||
description: "disallow non-standard static properties on `DataView` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-dataview-properties | ||
> disallow non-standard static properties on `DataView` 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 static properties on `DataView` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-dataview-properties: error */ | ||
DataView.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-dataview-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-dataview-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-dataview-properties.js) |
50 changes: 50 additions & 0 deletions
50
docs/rules/no-nonstandard-finalizationregistry-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,50 @@ | ||
--- | ||
title: "es-x/no-nonstandard-finalizationregistry-properties" | ||
description: "disallow non-standard static properties on `FinalizationRegistry` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-finalizationregistry-properties | ||
> disallow non-standard static properties on `FinalizationRegistry` 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 static properties on `FinalizationRegistry` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-finalizationregistry-properties: error */ | ||
FinalizationRegistry.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-finalizationregistry-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-finalizationregistry-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-finalizationregistry-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-set-properties" | ||
description: "disallow non-standard static properties on `Set` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-set-properties | ||
> disallow non-standard static properties on `Set` 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 static properties on `Set` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-set-properties: error */ | ||
Set.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-set-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-set-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-set-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-sharedarraybuffer-properties" | ||
description: "disallow non-standard static properties on `SharedArrayBuffer` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-sharedarraybuffer-properties | ||
> disallow non-standard static properties on `SharedArrayBuffer` 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 static properties on `SharedArrayBuffer` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-sharedarraybuffer-properties: error */ | ||
SharedArrayBuffer.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-sharedarraybuffer-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-sharedarraybuffer-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-sharedarraybuffer-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-weakmap-properties" | ||
description: "disallow non-standard static properties on `WeakMap` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-weakmap-properties | ||
> disallow non-standard static properties on `WeakMap` 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 static properties on `WeakMap` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-weakmap-properties: error */ | ||
WeakMap.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-weakmap-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-weakmap-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-weakmap-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-weakref-properties" | ||
description: "disallow non-standard static properties on `WeakRef` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-weakref-properties | ||
> disallow non-standard static properties on `WeakRef` 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 static properties on `WeakRef` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-weakref-properties: error */ | ||
WeakRef.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-weakref-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-weakref-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-weakref-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-weakset-properties" | ||
description: "disallow non-standard static properties on `WeakSet` class" | ||
--- | ||
|
||
# es-x/no-nonstandard-weakset-properties | ||
> disallow non-standard static properties on `WeakSet` 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 static properties on `WeakSet` class as errors. | ||
|
||
## 💡 Examples | ||
|
||
⛔ Examples of **incorrect** code for this rule: | ||
|
||
<eslint-playground type="bad"> | ||
|
||
```js | ||
/*eslint es-x/no-nonstandard-weakset-properties: error */ | ||
WeakSet.unknown(); | ||
``` | ||
|
||
</eslint-playground> | ||
|
||
## 🔧 Options | ||
|
||
This rule has an option. | ||
|
||
```jsonc | ||
{ | ||
"rules": { | ||
"es-x/no-nonstandard-weakset-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-weakset-properties.js) | ||
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-nonstandard-weakset-properties.js) |
Oops, something went wrong.