Skip to content

Commit 6066bb0

Browse files
authored
Merge pull request #959 from sheikhlimon/fix/lint-warnings
fix: lint warnings and update ESLint config
2 parents 856c737 + 18e8f5d commit 6066bb0

File tree

12 files changed

+335
-392
lines changed

12 files changed

+335
-392
lines changed

.eslintignore

Lines changed: 0 additions & 22 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 59 deletions
This file was deleted.

docusaurus.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { themes as prismThemes } from "prism-react-renderer";
22
import type { Config } from "@docusaurus/types";
33
import type * as Preset from "@docusaurus/preset-classic";
4-
import remarkMath from "remark-math";
5-
import rehypeKatex from "rehype-katex";
64
import * as dotenv from "dotenv";
75
dotenv.config();
86

eslint.config.mjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// eslint.config.mjs
2+
import tsParser from "@typescript-eslint/parser";
3+
import tsPlugin from "@typescript-eslint/eslint-plugin";
4+
import reactPlugin from "eslint-plugin-react";
5+
6+
export default [
7+
{
8+
files: ["**/*.{ts,tsx}"],
9+
ignores: ["node_modules/", "build/", ".docusaurus/", "static/", "dist/"],
10+
languageOptions: {
11+
parser: tsParser,
12+
parserOptions: {
13+
ecmaVersion: 2021,
14+
sourceType: "module",
15+
ecmaFeatures: { jsx: true },
16+
},
17+
globals: {
18+
React: "readonly",
19+
window: "readonly",
20+
document: "readonly",
21+
},
22+
},
23+
plugins: {
24+
"@typescript-eslint": tsPlugin,
25+
react: reactPlugin,
26+
},
27+
rules: {
28+
"react/react-in-jsx-scope": "off",
29+
"no-console": "off",
30+
"@typescript-eslint/no-unused-vars": "warn",
31+
"@typescript-eslint/no-explicit-any": "warn",
32+
},
33+
},
34+
{
35+
files: ["**/*.{js,jsx}"],
36+
ignores: ["node_modules/", "build/", ".docusaurus/", "static/", "dist/"],
37+
languageOptions: {
38+
globals: {
39+
window: "readonly",
40+
document: "readonly",
41+
},
42+
},
43+
rules: {
44+
"no-console": "off",
45+
},
46+
},
47+
];

0 commit comments

Comments
 (0)