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

[Snyk] Security upgrade eslint from 8.57.0 to 9.0.0 #2347

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .eslintrc.json

This file was deleted.

13 changes: 7 additions & 6 deletions Src/WitsmlExplorer.Frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest watch"
Expand Down Expand Up @@ -58,6 +58,7 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.0.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
Expand All @@ -70,13 +71,13 @@
"@types/react-window": "^1.8.5",
"@types/styled-components": "^5.1.26",
"@types/uuidv4": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.57.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-jest": "^28.2.0",
"eslint-plugin-react": "^6.2.2",
"jsdom": "^24.0.0",
"lint-staged": "^13.0.3",
"typescript": "^5.4.3",
Expand Down
46 changes: 46 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const js = require("@eslint/js");
const globals = require("globals");
const typescriptEslintPlugin = require("@typescript-eslint/eslint-plugin");
const typescriptEslintParser = require("@typescript-eslint/parser");
const reactEslintPlugin = require("eslint-plugin-react");
const prettierConfig = require("eslint-config-prettier");

module.exports = [
js.configs.recommended,
prettierConfig,
{
settings: {
react: {
version: "detect",
},
},
languageOptions: {
globals: globals.node,
ecmaVersion: 2021,
sourceType: "module",
parser: typescriptEslintParser,
// Assuming globals is correctly imported above; otherwise, specify globals manually
},
plugins: {
"react": reactEslintPlugin,
"@typescript-eslint": typescriptEslintPlugin,
},
rules: {
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off",
// allow jsx syntax in js files (for next.js project)
"react/jsx-filename-extension": ["warn", { extensions: [".js", ".jsx", ".ts", ".tsx"] }],
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": "error",
"no-console": ["error", { allow: ["warn", "error"] }],
"react/prop-types": 1,
"no-unused-vars": "off",
"no-empty-pattern": "off",
},
},
];
Loading
Loading