Skip to content

Commit

Permalink
language: Move es-x/no-resizable-and-growable-arraybuffers to rules-es5
Browse files Browse the repository at this point in the history
Fixes: #555
  • Loading branch information
edg2s committed Apr 19, 2024
1 parent 6c81afc commit 2f63258
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 1 addition & 2 deletions client/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"no-console": "error",
"no-implied-eval": "error",
"unicorn/no-invalid-remove-event-listener": "error",
"security/detect-possible-timing-attacks": "off",
"es-x/no-resizable-and-growable-arraybuffers": "off"
"security/detect-possible-timing-attacks": "off"
}
}
3 changes: 2 additions & 1 deletion language/rules-es5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"rules": {
"es-x/no-symbol-prototype-description": "off"
"es-x/no-symbol-prototype-description": "off",
"es-x/no-resizable-and-growable-arraybuffers": "off"
}
}
5 changes: 2 additions & 3 deletions test/fixtures/client/common/valid.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
( function () {
// Off: es-x/no-resizable-and-growable-arraybuffers (#555)
function resize( input, cachedValue ) {
function checkHash( input, cachedValue ) {
var hash = JSON.stringify( input );
// Off: security/detect-possible-timing-attacks (#503)
if ( hash === cachedValue ) {
return true;
}
}

resize();
checkHash();
}() );
5 changes: 5 additions & 0 deletions test/fixtures/client/es6/valid.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@
// Valid: es-x/no-string-raw
String.raw();

// ArrayBuffer.prototype.resize is disabled, but conflicts
// with many plain object properties.
// Off: es-x/no-resizable-and-growable-arraybuffers (#555)
node.resize();

// Symbol.prototype.descrition is disabled, but conflicts
// with many plain object properties.
// Off: es-x/no-symbol-prototype-description
Expand Down

0 comments on commit 2f63258

Please sign in to comment.