Skip to content
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

chore(lint): Migrate to ESLint V9. #161

Merged
merged 9 commits into from
Jan 22, 2025
60 changes: 60 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import CommonConfig from "eslint-config-yscope/CommonConfig.mjs";
import JestConfig from "eslint-config-yscope/JestConfig.mjs";
import ReactConfigArray from "eslint-config-yscope/ReactConfigArray.mjs";
import StylisticConfigArray from "eslint-config-yscope/StylisticConfigArray.mjs";
import TsConfigArray from "eslint-config-yscope/TsConfigArray.mjs";
import Globals from "globals";


const EslintConfig = [
{
ignores: [
"dist/",
"node_modules/",
],
},
CommonConfig,
...TsConfigArray,
...StylisticConfigArray,
...ReactConfigArray,
{
rules: {
"no-restricted-imports": [
"error",
{
paths: [
{
message: "Please use path imports and name your imports with postfix " +
"\"Icon\" to avoid confusions.",
name: "@mui/icons-material",
},
],
patterns: [
{
group: [
"@mui/joy/*",
"!@mui/joy/styles",
],
message: "Please use the default import from \"@mui/joy\" instead.",
},
],
},
],
},
},
{
files: ["webpack.*.js"],
languageOptions: {
globals: {
...Globals.node,
},
},
},
{
files: ["test/**/*"],
...JestConfig,
},
];


export default EslintConfig;
3 changes: 2 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type {Config} from "jest";
import os from "node:os";
import pathPosix from "node:path/posix";

import type {Config} from "jest";


let PRIMARY_REPORTER: string | [string, Record<string, unknown>] = "default";
if ("undefined" !== typeof process.env.GITHUB_ACTIONS) {
Expand Down
Loading
Loading