You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add browser environment ESLint configuration support to our codebase by implementing @metamask/eslint-config-browser for packages that require browser environment globals and rules. This will provide appropriate linting rules for browser APIs and patterns, and help eliminate the need for numerous eslint-disable comments throughout the codebase.
Technical Details
Install @metamask/eslint-config-browser as a dev dependency
Update the eslint.config.mjs to extend the browser configuration for appropriate packages/files
Create a specific configuration block for browser-specific files/packages in our ESLint config
This should target primarily the web-related packages rather than Node.js packages
Consider using file patterns like 'apps/storybook-react/**/*.{ts,tsx,js,jsx}' to apply browser rules
Implementation example:
// In eslint.config.mjsimportbrowserfrom'@metamask/eslint-config-browser';// Then in the config array{files: ['apps/storybook-react/**/*.{ts,tsx,js,jsx}','packages/design-system-react/**/*.{ts,tsx,js,jsx}'],extends: [browser],}
Acceptance Criteria
@metamask/eslint-config-browser package installed and properly configured in our project
Browser environment rules applied to all appropriate web/browser-focused packages and files
No new lint errors introduced by the change
Reduction in the number of eslint-disable comments required for browser-related code
ESLint should properly recognize browser globals (like window, document, etc.) without warning
Description
Add browser environment ESLint configuration support to our codebase by implementing
@metamask/eslint-config-browser
for packages that require browser environment globals and rules. This will provide appropriate linting rules for browser APIs and patterns, and help eliminate the need for numerouseslint-disable
comments throughout the codebase.Technical Details
@metamask/eslint-config-browser
as a dev dependencyeslint.config.mjs
to extend the browser configuration for appropriate packages/files'apps/storybook-react/**/*.{ts,tsx,js,jsx}'
to apply browser rulesImplementation example:
Acceptance Criteria
@metamask/eslint-config-browser
package installed and properly configured in our projecteslint-disable
comments required for browser-related codewindow
,document
, etc.) without warningReferences
eslint-disable
comments in the codebaseThe text was updated successfully, but these errors were encountered: