eslint-plugin-react-web-api 5.17.0 → 5.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +53 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region package.json
|
|
30
30
|
var name$1 = "eslint-plugin-react-web-api";
|
|
31
|
-
var version = "5.17.
|
|
31
|
+
var version = "5.17.1";
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/types/component-phase.ts
|
|
@@ -820,6 +820,58 @@ const absurd = (_) => {
|
|
|
820
820
|
* @since 2.0.0
|
|
821
821
|
*/
|
|
822
822
|
const hole = cast(absurd);
|
|
823
|
+
/**
|
|
824
|
+
* Drops the longest prefix of elements from an array that satisfy the given predicate.
|
|
825
|
+
*
|
|
826
|
+
* Supports both data-first and data-last (`pipe`-friendly) call styles.
|
|
827
|
+
*
|
|
828
|
+
* @param pred - The predicate to test each element with.
|
|
829
|
+
* @returns A new array without the matching prefix.
|
|
830
|
+
* @example
|
|
831
|
+
* ```ts
|
|
832
|
+
* import * as assert from "node:assert"
|
|
833
|
+
* import { dropWhile, pipe } from "@local/eff"
|
|
834
|
+
*
|
|
835
|
+
* // data-first
|
|
836
|
+
* assert.deepStrictEqual(dropWhile([1, 2, 3, 2, 1], (n: number) => n < 3), [3, 2, 1])
|
|
837
|
+
*
|
|
838
|
+
* // data-last
|
|
839
|
+
* assert.deepStrictEqual(pipe([1, 2, 3, 2, 1], dropWhile((n: number) => n < 3)), [3, 2, 1])
|
|
840
|
+
* ```
|
|
841
|
+
* @category array
|
|
842
|
+
*/
|
|
843
|
+
const dropWhile = dual(2, (xs, pred) => {
|
|
844
|
+
const len = xs.length;
|
|
845
|
+
let idx = 0;
|
|
846
|
+
while (idx < len && pred(xs[idx])) idx++;
|
|
847
|
+
return xs.slice(idx);
|
|
848
|
+
});
|
|
849
|
+
/**
|
|
850
|
+
* Takes the longest prefix of elements from an array that satisfy the given predicate.
|
|
851
|
+
*
|
|
852
|
+
* Supports both data-first and data-last (`pipe`-friendly) call styles.
|
|
853
|
+
*
|
|
854
|
+
* @param pred - The predicate to test each element with.
|
|
855
|
+
* @returns A new array containing only the matching prefix.
|
|
856
|
+
* @example
|
|
857
|
+
* ```ts
|
|
858
|
+
* import * as assert from "node:assert"
|
|
859
|
+
* import { pipe, takeWhile } from "@local/eff"
|
|
860
|
+
*
|
|
861
|
+
* // data-first
|
|
862
|
+
* assert.deepStrictEqual(takeWhile([1, 2, 3, 2, 1], (n: number) => n < 3), [1, 2])
|
|
863
|
+
*
|
|
864
|
+
* // data-last
|
|
865
|
+
* assert.deepStrictEqual(pipe([1, 2, 3, 2, 1], takeWhile((n: number) => n < 3)), [1, 2])
|
|
866
|
+
* ```
|
|
867
|
+
* @category array
|
|
868
|
+
*/
|
|
869
|
+
const takeWhile = dual(2, (xs, pred) => {
|
|
870
|
+
const len = xs.length;
|
|
871
|
+
let idx = 0;
|
|
872
|
+
while (idx < len && pred(xs[idx])) idx++;
|
|
873
|
+
return xs.slice(0, idx);
|
|
874
|
+
});
|
|
823
875
|
|
|
824
876
|
//#endregion
|
|
825
877
|
//#region src/rules/no-leaked-intersection-observer/lib.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-web-api",
|
|
3
|
-
"version": "5.17.
|
|
3
|
+
"version": "5.17.1",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for interacting with Web APIs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,18 +41,18 @@
|
|
|
41
41
|
"@typescript-eslint/utils": "^8.64.0",
|
|
42
42
|
"birecord": "^0.1.2",
|
|
43
43
|
"ts-pattern": "^5.9.0",
|
|
44
|
-
"@eslint-react/ast": "5.17.
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/eslint": "5.17.
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/var": "5.17.
|
|
44
|
+
"@eslint-react/ast": "5.17.1",
|
|
45
|
+
"@eslint-react/shared": "5.17.1",
|
|
46
|
+
"@eslint-react/eslint": "5.17.1",
|
|
47
|
+
"@eslint-react/core": "5.17.1",
|
|
48
|
+
"@eslint-react/var": "5.17.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/react": "^19.2.17",
|
|
52
52
|
"@types/react-dom": "^19.2.3",
|
|
53
53
|
"dedent": "^1.7.2",
|
|
54
54
|
"eslint": "^10.7.0",
|
|
55
|
-
"tsdown": "^0.22.
|
|
55
|
+
"tsdown": "^0.22.8",
|
|
56
56
|
"typescript": "6.0.3",
|
|
57
57
|
"@local/configs": "0.0.0",
|
|
58
58
|
"@local/eff": "0.0.0"
|