Skip to content

Commit

Permalink
update eslint-plugin-es-x
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 2, 2023
1 parent 64cbfb8 commit c052d2d
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 17 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/core-js/modules/web.structured-clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ var cloneBuffer = function (value, map, $type) {
} else {
length = value.byteLength;
options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;
// eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe
clone = new ArrayBuffer(length, options);
source = new DataView(value);
target = new DataView(clone);
Expand Down
6 changes: 3 additions & 3 deletions scripts/bundle-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/eslint/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,7 @@ const forbidES2024BuiltIns = {
'es/no-atomics-waitasync': ERROR,
'es/no-string-prototype-iswellformed-towellformed': ERROR,
'es/no-regexp-v-flag': ERROR,
'es/no-resizable-and-growable-arraybuffers': ERROR,
};

const forbidES2016IntlBuiltIns = {
Expand Down
8 changes: 4 additions & 4 deletions tests/eslint/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"confusing-browser-globals": "^1.0.11",
"eslint": "^8.52.0",
"eslint-plugin-array-func": "^4.0.0",
"eslint-plugin-es-x": "^7.2.0",
"eslint-plugin-es-x": "^7.3.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsonc": "^2.10.0",
Expand Down
6 changes: 3 additions & 3 deletions tests/observables/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tests/unit-pure/web.structured-clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ QUnit.module('structuredClone', () => {
QUnit.test('Resizable ArrayBuffer', assert => {
const array = [1, 2, 3, 4, 5, 6, 7, 8];

// eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe
let buffer = new ArrayBuffer(8, { maxByteLength: 16 });
new Int8Array(buffer).set(array);
let copy = structuredClone(buffer);
Expand All @@ -203,6 +204,7 @@ QUnit.module('structuredClone', () => {
assert.arrayEqual(bufferToArray(copy), array, 'non-resizable-ab-1');
assert.false(copy.resizable, 'non-resizable-ab-1');

// eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe
buffer = new ArrayBuffer(8, { maxByteLength: 16 });
let tarray = new Int8Array(buffer);
tarray.set(array);
Expand Down

0 comments on commit c052d2d

Please sign in to comment.