build: re-introduce lint step to ci workflow #145
Draft
+3,967
−2,814
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation
Initially this job was deactivated, as a lot of files where not passing lint checks due to previously using
biomeinmetamask-sdk, and now we switching to prettier to keep with organization conventions, as well as a lot of stuff being outside the configured conventions of monorepo (one example is using interface instead of type).This PR here will re-introduce the job that runs
yarn lint.https://consensyssoftware.atlassian.net/browse/WAPI-796
Approach
The strategy prioritizes stability over refactoring:
eslint-disablecomments for intentional patterns and external constraintsError Categories & Solutions
1. Naming Convention Violations (
@typescript-eslint/naming-convention)eth_sendTransaction,wallet_getCapabilitiesmmconnect_version,dapp_idT,KAsyncStorage,Bowser__mockFetch,__storage2. Restricted Globals (
no-restricted-globals)window,documentBufferprocessalert3. Import/Export Rules
import-x/no-unassigned-importimport-x/orderimport-x/no-nodejs-modules4. Function/Method Rules
@typescript-eslint/explicit-function-return-typevoidreturnsno-empty-function// No-opcomments withvoidreturn types@typescript-eslint/no-misused-promises5. Class Property Syntax (
no-restricted-syntax)##propertysyntax where safe6. Test-Specific Rules
@typescript-eslint/no-shadowdescribe,it,expect)id-lengtht@typescript-eslint/unbound-methodpromise/param-names7. JSDoc Rules
jsdoc/require-param-descriptionjsdoc/require-returns8. Other Patterns
id-denylist(err)error@typescript-eslint/prefer-nullish-coalescing||to??or file-level disableno-async-promise-executorrequire-unicode-regexpTypeScript Configuration Changes
packages/connect-multichain/tsconfig.json: Removed test file exclusions to enable type-aware lintingpackages/connect-evm/tsconfig.json: Removed test file exclusionsplayground/playground-ui/tsconfig.json: Removed test file exclusionsplayground/node-playground/tsconfig.json: Enabledstrict: truefor nullish coalescing rulesintegrations/wagmi/tsconfig.node.json: AddedstrictNullChecks: trueAuto-Generated Files
Files marked with
/* eslint-disable -- AUTO-GENERATED FILE */:playground/*/src/wagmi/metamask-connector.ts(copied fromintegrations/wagmi/)packages/analytics/src/schema.ts(API schema types)Code Changes (Non-Disable)
Minimal code changes were made where safe:
voidreturn types to empty methods||to??for nullish coalescing where behavior is identicaltypevsinterfacefor Wagmi module augmentationReferences
Checklist