Skip to content

Conversation

@Janpot
Copy link
Member

@Janpot Janpot commented Sep 25, 2025

export json configuration for eslint

closes #550
Also closes #743

This requires bigger refactor of our shareable configs than I initially assumed.

according to JoshuaKGoldberg/eslint-plugin-package-json#1265 (comment)

There's no longer any sense of a "primary" language for ESLint the way it used to be with JavaScript. It's now a true multi-language (JS/TS, JSON, Markdown, etc.) linter. Every group of rules has a limited set of file extensions (languages) it applies to.

They're changing their stance on how to define shareable configs

Canary PRs:

@mui-bot
Copy link

mui-bot commented Sep 25, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 🔺+6.57KB(+1.54%) 🔺+438B(+0.33%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@Janpot Janpot added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Sep 25, 2025
@oliviertassinari oliviertassinari temporarily deployed to json-linting - mui-tools-public PR #746 September 26, 2025 08:22 — with Render Destroyed
const dirname = path.dirname(filename);

export default defineConfig(
createJsonConfig(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you verify if this also include files inside node_modules or other ignored directories, since the ignore logic is added in createBaseConfig() ?

Copy link
Member Author

@Janpot Janpot Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignores are global, for the whole configuration, their order does only matter in a sense that other ignores can include or exclude more files. Maybe createBaseconfig should just contain the json config? That'll likely be a breaking change on some repos as you need to specifically target js files to alter js rules.

@brijeshb42
Copy link
Contributor

Since we are going with breaking change, does it also makes sense to remove the jsonlint CI ?

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 29, 2025
@oliviertassinari oliviertassinari temporarily deployed to json-linting - mui-tools-public PR #746 September 29, 2025 22:28 — with Render Destroyed
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 9, 2025
@oliviertassinari oliviertassinari temporarily deployed to json-linting - mui-tools-public PR #746 October 9, 2025 14:27 — with Render Destroyed
Copy link
Contributor

@brijeshb42 brijeshb42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@Janpot Janpot merged commit 2899146 into master Oct 10, 2025
9 checks passed
@Janpot Janpot deleted the json-linting branch October 10, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[code-infra] Refactor eslint extensions to be consistent [code-infra] Migrate jsonlint to eslint or anything equivalent that supports jsonc

5 participants