Skip to content

Commit

Permalink
Merge branch 'main' into MMS-1872-destination-account-picker-standalo…
Browse files Browse the repository at this point in the history
…ne-component
  • Loading branch information
ghgoodreau authored Feb 13, 2025
2 parents 4397845 + 776ef89 commit 41e6c24
Show file tree
Hide file tree
Showing 135 changed files with 4,132 additions and 3,370 deletions.
48 changes: 48 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,54 @@ module.exports = {
},
},
},

/**
* TypeScript React-specific code
*
* Similar to above, but marks a majority of errors to warnings.
* TODO - combine rulesets and resolve errors
*/
{
files: ['ui/**/*.ts', 'ui/**/*.tsx'],
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
plugins: ['react'],
rules: {
'react/no-unused-prop-types': 'warn',
'react/no-unused-state': 'warn',
'react/jsx-boolean-value': 'warn',
'react/jsx-curly-brace-presence': [
'warn',
{
props: 'never',
children: 'never',
},
],
'react/no-deprecated': 'warn',
'react/default-props-match-prop-types': 'warn',
'react/jsx-no-duplicate-props': 'warn',
'react/display-name': 'off',
'react/no-unescaped-entities': 'warn',
'react/prop-types': 'off',
'react/no-children-prop': 'off',
'react/jsx-key': 'warn', // TODO - increase this into 'error' level
'react-hooks/rules-of-hooks': 'warn', // TODO - increase this into 'error' level
},
settings: {
react: {
// If this is set to 'detect', ESLint will import React in order to
// find its version. Because we run ESLint in the build system under
// LavaMoat, this means that detecting the React version requires a
// LavaMoat policy for all of React, in the build system. That's a
// no-go, so we grab it from React's package.json.
version: reactVersion,
},
},
},
/**
* Mocha tests
*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
url-to-cladocument: 'https://metamask.io/cla.html'
# This branch can't have protections, commits are made directly to the specified branch.
branch: 'cla-signatures'
allowlist: 'dependabot[bot],metamaskbot,crowdin-bot'
allowlist: 'dependabot[bot],metamaskbot,crowdin-bot,runway-github[bot]'
allow-organization-members: true
blockchain-storage-flag: false
Loading

0 comments on commit 41e6c24

Please sign in to comment.