-
-
Notifications
You must be signed in to change notification settings - Fork 182
[code-infra] Migrate to eslint v9 and flat config #2054
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
Conversation
brijeshb42
commented
Jun 3, 2025
- I have followed (at least) the PR section of the contributing guide.
Bundle size report
|
commit: |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
f186289
to
dcc072a
Compare
f47145b
to
b698db7
Compare
ea7265b
to
18d6189
Compare
eslint.config.mjs
Outdated
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this already covered by an earlier rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a bunch of small comments, but nothing blocking. Should we switch to using the file extension constants?
Final review for @mui/base-ui
ab9370a
to
62f3309
Compare
@michaldudak Can I get a final approval ? |
docs/scripts/reportBrokenLinks.mts
Outdated
@@ -7,9 +7,11 @@ import * as jsxRuntime from 'react/jsx-runtime'; | |||
import { evaluate } from '@mdx-js/mdx'; | |||
import rehypeExtractToc, { type Toc, type TocEntry } from '@stefanprobst/rehype-extract-toc'; | |||
import rehypeExportToc from '@stefanprobst/rehype-extract-toc/mdx'; | |||
/* eslint-disable import/extensions */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to explicitly import .mjs
everywhere. IIRC Typescript doesn't resolve these automatically if they are extensionless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
@@ -22,14 +22,14 @@ | |||
"docs:link-check": "pnpm --filter docs link-check", | |||
"extract-error-codes": "cross-env MUI_EXTRACT_ERROR_CODES=true lerna run --concurrency 1 build:stable", | |||
"install:codesandbox": "pnpm install --no-frozen-lockfile", | |||
"jsonlint": "node ./scripts/jsonlint.mjs", | |||
"jsonlint": "code-infra jsonlint", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
{ id: '3', parentId: '1', context: contextOpen }, | ||
]); | ||
}); | ||
describe('floating-ui-react/utils/nodes', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole directory (packages/react/src/floating-ui-react) was copied from the Floating UI repo as we decided to maintain a local fork. It may not conform to our internal code standards fully, so we might create a separate config