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: remove prettier and eslint in favour of biome #2219

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .changeset/empty-files-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"create-fuels": patch
"@fuel-ts/transactions": patch
"@fuel-ts/abi-typegen": patch
"@fuel-ts/interfaces": patch
"@fuel-ts/abi-coder": patch
"@fuel-ts/fuel-core": patch
"@fuel-ts/contract": patch
"@fuel-ts/versions": patch
"@fuel-ts/account": patch
"@fuel-ts/address": patch
"@fuel-ts/program": patch
"@fuel-ts/crypto": patch
"@fuel-ts/errors": patch
"@fuel-ts/hasher": patch
"@fuel-ts/merkle": patch
"@fuel-ts/script": patch
"fuels": patch
"@fuel-ts/utils": patch
"@fuel-ts/forc": patch
"@fuel-ts/math": patch
---

chore: remove `prettier` and `eslint` in favour of `biome`
24 changes: 0 additions & 24 deletions .eslintignore

This file was deleted.

81 changes: 0 additions & 81 deletions .eslintrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ tsup.config.bundled_*
# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
Expand Down
5 changes: 0 additions & 5 deletions .knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
"@graphql-codegen*",
"graphql-tag",
"events",
"eslint-plugin-jsdoc",
"eslint-plugin-jsx-a11y",
"eslint-plugin-prettier",
"eslint-plugin-react",
"eslint-plugin-react-hooks",
"dotenv",
"memfs",
"open",
Expand Down
6 changes: 1 addition & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"vitest.explorer",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
"recommendations": ["vitest.explorer"]
}
14 changes: 2 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.configPath": ".prettierrc",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": true,
"**/.turbo": true,
"**/dist": true
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[handlebars]": {
"editor.formatOnSave": false,
"editor.formatOnPaste": false
Expand All @@ -28,5 +17,6 @@
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
},
"vitest.disableWorkspaceWarning": true
}
1 change: 0 additions & 1 deletion apps/create-fuels-counter-guide/.eslintignore

This file was deleted.

4 changes: 0 additions & 4 deletions apps/create-fuels-counter-guide/.eslintrc.json

This file was deleted.

4 changes: 1 addition & 3 deletions apps/create-fuels-counter-guide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"dependencies": {
"@fuels/connectors": "^0.2.2",
"@fuels/react": "^0.18.1",
"fuels": "workspace:*",
"@tanstack/react-query": "^5.29.2",
"dotenv": "^16.4.5",
"fuels": "workspace:*",
"next": "14.2.2",
"react": "^18.2",
"react-dom": "^18.2",
Expand All @@ -28,8 +28,6 @@
"@types/react": "^18.2",
"@types/react-dom": "^18.2",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.0.1",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5"
Expand Down
1 change: 0 additions & 1 deletion apps/create-fuels-counter-guide/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default function Home() {
}
}, [wallet]);

// eslint-disable-next-line consistent-return
const onIncrementPressed = async () => {
if (!contract) {
return toast.error("Contract not loaded");
Expand Down
1 change: 0 additions & 1 deletion apps/demo-fuels/fuels.config.full.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-console */
import { createConfig } from 'fuels';
import type { CommandEvent, ContractDeployOptions, FuelsConfig } from 'fuels/src/cli/types';

Expand Down
2 changes: 1 addition & 1 deletion apps/demo-react-cra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Expand Down
7 changes: 0 additions & 7 deletions apps/demo-react-cra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"@types/node": "^16.18.34",
"@types/react": "^18.2.9",
"@types/react-dom": "^18.2.4",
"eslint-config-react-app": "^7.0.1",
"fuels": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -23,12 +22,6 @@
"original:eject": "react-scripts eject",
"pretest": "pnpm original:build"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
Expand Down
14 changes: 0 additions & 14 deletions apps/demo-react-vite/.eslintrc.cjs

This file was deleted.

11 changes: 3 additions & 8 deletions apps/demo-react-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,20 @@
"scripts": {
"original:dev": "vite",
"original:build": "tsc && vite build",
"original:lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"original:lint": "biome ./src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"original:preview": "vite preview",
"pretest": "pnpm original:build"
},
"dependencies": {
"@fuels/vm-asm": "0.49.0",
"fuels": "workspace:*",
"react-dom": "^18.2.0",
"react": "^18.2.0"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.0.37",
"@types/react-dom": "^18.0.11",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.38.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"typescript": "~5.2.2",
"vite": "^5.2.9"
}
Expand Down
9 changes: 7 additions & 2 deletions apps/docs-snippets/src/guide/contracts/add-transfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ describe(__filename, () => {
let baseAssetId: string;

beforeAll(async () => {
contract = await createAndDeployContractFromProject(DocSnippetProjectsEnum.ECHO_VALUES);
contract = await createAndDeployContractFromProject(
DocSnippetProjectsEnum.ECHO_VALUES,
);
provider = contract.provider;
baseAssetId = provider.getBaseAssetId();
wallet = await getTestWallet([
Expand All @@ -31,7 +33,10 @@ describe(__filename, () => {
// #region add-transfer-1
const recipient = Wallet.generate({ provider });

await contract.functions.echo_u64(100).addTransfer(recipient.address, 100, baseAssetId).call();
await contract.functions
.echo_u64(100)
.addTransfer(recipient.address, 100, baseAssetId)
.call();
// #endregion add-transfer-1

const recipientBalance = await recipient.getBalance(baseAssetId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe(__filename, () => {
let provider: Provider;
let baseAssetId: string;
beforeAll(async () => {
contract = await createAndDeployContractFromProject(DocSnippetProjectsEnum.RETURN_CONTEXT);
contract = await createAndDeployContractFromProject(
DocSnippetProjectsEnum.RETURN_CONTEXT,
);
provider = contract.provider;
baseAssetId = provider.getBaseAssetId();
});
Expand Down Expand Up @@ -42,7 +44,7 @@ describe(__filename, () => {
forward: [10, baseAssetId],
gasLimit: 1,
})
.call()
.call(),
).rejects.toThrow(/Gas limit '1' is lower than the required: /);
// #endregion call-params-2
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe(__filename, () => {

beforeAll(async () => {
deployedContract = await createAndDeployContractFromProject(
DocSnippetProjectsEnum.RETURN_CONTEXT
DocSnippetProjectsEnum.RETURN_CONTEXT,
);
});

Expand Down