Skip to content

Commit 6525466

Browse files
committed
fix(lint): resolve ESLint errors and deprecation warnings
- Remove unused __dirname import from eslint.config.mjs - Add missing globals (exports, setTimeout, setInterval, etc.) to config - Migrate .eslintignore patterns to eslint.config.mjs ignores array - Remove unused 'showSignUpButton' prop from Navigation component - Remove unused 'height' and 'width' props from Toggle component This resolves all ESLint check failures in the CI pipeline. Signed-off-by: MANISH KUMAR <146671113+manishpatel00@users.noreply.github.com>
1 parent ce50a19 commit 6525466

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

site/eslint.config.mjs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import js from "@eslint/js";
22
import reactPlugin from "eslint-plugin-react";
33
import babelParser from "@babel/eslint-parser";
4-
import { fileURLToPath } from "url";
5-
import { dirname } from "path";
6-
7-
const __filename = fileURLToPath(import.meta.url);
8-
const __dirname = dirname(__filename);
94

105
export default [
116
js.configs.recommended,
@@ -19,6 +14,17 @@ export default [
1914
".github/**",
2015
"assets/**",
2116
"public/**",
17+
".babelrc",
18+
".env.development",
19+
"CNAME",
20+
"CODE_OF_CONDUCT.md",
21+
"CODEOWNERS",
22+
"font-preload-cache.json",
23+
"LICENSE",
24+
"Makefile",
25+
"README.md",
26+
"package.json",
27+
"package-lock.json",
2228
],
2329
plugins: {
2430
react: reactPlugin,
@@ -44,9 +50,14 @@ export default [
4450
process: "readonly",
4551
module: "writable",
4652
require: "readonly",
53+
exports: "writable",
4754
__dirname: "readonly",
4855
__filename: "readonly",
4956
define: "readonly",
57+
setTimeout: "readonly",
58+
setInterval: "readonly",
59+
clearTimeout: "readonly",
60+
clearInterval: "readonly",
5061
},
5162
},
5263
settings: {

site/src/components/Navigation/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import CloudIcon from "./CloudIcon";
99
import KanvasIcon from "./KanvasIcon";
1010
import LogoutIcon from "./LogoutIcon";
1111

12-
function Navigation({ theme, toggleTheme, showSignUpButton }) {
12+
function Navigation({ theme, toggleTheme }) {
1313
const [userData, setUserData] = useState(null);
1414
const [openNav, setOpenNav] = useState(false);
1515
const Logo = theme === "light" ? mesheryLogo : mesheryLogoLight;

site/src/components/Toggle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const toggleStyle = {
55
cursor: "pointer",
66
};
77

8-
export const Toggle = ({ theme, toggleTheme, height, width }) => {
8+
export const Toggle = ({ theme, toggleTheme }) => {
99
return (
1010
<div className="themeToggle" onClick={toggleTheme} style={toggleStyle}>
1111
{theme === "dark" ? (

0 commit comments

Comments
 (0)