Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: disable no-continue eslint rule #3225

Merged
merged 7 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
nedsalk marked this conversation as resolved.
Show resolved Hide resolved
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,14 +46,14 @@
reason: Utf8ErrorReason,
offset: number,
bytes: Uint8Array,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
nedsalk marked this conversation as resolved.
Show resolved Hide resolved

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,8 +63,8 @@
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,
(codePoint & 0x3ff) + 0xdc00
Expand Down
Loading