Skip to content

Commit

Permalink
chore: disable no-continue eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
nedsalk committed Sep 27, 2024
1 parent 502c89e commit 0747d42
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .changeset/thin-waves-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

chore: disable `no-continue` eslint rule
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
},
},
rules: {
'no-continue': 'off',
'no-restricted-syntax': [
'off',
{
Expand Down
1 change: 0 additions & 1 deletion packages/account/src/providers/fuel-graphql-subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export class FuelGraphqlSubscriber implements AsyncIterator<unknown> {
.replace(':keep-alive-text\n\n', '');

if (decoded === '') {
// eslint-disable-next-line no-continue
continue;
}

Expand Down
1 change: 0 additions & 1 deletion packages/contract/src/contract-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ export default class ContractFactory {
// is still valid so we can use this for the loader contract
if ((<Error>err).message.indexOf(`BlobId is already taken ${blobId}`) > -1) {
uploadedBlobs.push(blobId);
// eslint-disable-next-line no-continue
continue;
}

Expand Down
4 changes: 0 additions & 4 deletions packages/merkle/src/sparse/sparseMerkleTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export class SparseMerkleTree {

for (let i = 0; i < sideNodes.length; i += 1) {
if (sideNodes[i] === '') {
// eslint-disable-next-line no-continue
continue;
}

Expand All @@ -127,7 +126,6 @@ export class SparseMerkleTree {
// This is the leaf sibling that needs to be percolated up the tree.
currentHash = sideNode;
currentData = sideNode;
// eslint-disable-next-line no-continue
continue;
} else {
// This is the node sibling that needs to be left in its place.
Expand All @@ -139,7 +137,6 @@ export class SparseMerkleTree {
if (!nonPlaceholderReached && sideNode === ZERO) {
// We found another placeholder sibling node, keep going up the
// tree until we find the first sibling that is not a placeholder.
// eslint-disable-next-line no-continue
continue;
} else if (!nonPlaceholderReached) {
// We found the first sibling node that is not a placeholder, it is
Expand Down Expand Up @@ -221,7 +218,6 @@ export class SparseMerkleTree {
if (commonPrefixCount !== MAX_HEIGHT && commonPrefixCount > MAX_HEIGHT - 1 - i) {
sideNode = ZERO;
} else {
// eslint-disable-next-line no-continue
continue;
}
} else {
Expand Down
9 changes: 4 additions & 5 deletions packages/utils/src/utils/toUtf8String.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-continue */
import type { BytesLike } from '@fuel-ts/interfaces';

import { arrayify } from './arrayify';
Expand Down Expand Up @@ -47,13 +46,13 @@ function onError(
reason: Utf8ErrorReason,
offset: number,
bytes: Uint8Array,
// eslint-disable-next-line @typescript-eslint/no-unused-vars

output: Array<number>,

Check warning on line 50 in packages/utils/src/utils/toUtf8String.ts

View workflow job for this annotation

GitHub Actions / Lint

'output' is defined but never used. Allowed unused args must match /^_/u
// eslint-disable-next-line @typescript-eslint/no-unused-vars

badCodepoint?: number

Check warning on line 52 in packages/utils/src/utils/toUtf8String.ts

View workflow job for this annotation

GitHub Actions / Lint

'badCodepoint' is defined but never used. Allowed unused args must match /^_/u
): number {
// #TODO: Log these as warnings after https://github.com/FuelLabs/fuels-ts/issues/2298 is implemented.
// eslint-disable-next-line no-console

console.log(`invalid codepoint at offset ${offset}; ${reason}, bytes: ${bytes}`);

Check warning on line 56 in packages/utils/src/utils/toUtf8String.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected console statement
return offset;
}
Expand All @@ -64,7 +63,7 @@ function helper(codePoints: Array<number>): string {
if (codePoint <= 0xffff) {
return String.fromCharCode(codePoint);
}
// eslint-disable-next-line no-param-reassign

codePoint -= 0x10000;

Check failure on line 67 in packages/utils/src/utils/toUtf8String.ts

View workflow job for this annotation

GitHub Actions / Lint

Assignment to function parameter 'codePoint'
return String.fromCharCode(
((codePoint >> 10) & 0x3ff) + 0xd800,
Expand Down

0 comments on commit 0747d42

Please sign in to comment.