chore: Replace ESLint configuration file with new format and update dependencies
Some checks failed
CI / skip-ci-check (pull_request) Successful in 1m34s
CI / lint-and-type-check (pull_request) Failing after 2m17s
CI / python-lint (pull_request) Failing after 2m0s
CI / test-backend (pull_request) Successful in 3m42s
CI / build (pull_request) Successful in 4m42s
CI / secret-scanning (pull_request) Successful in 1m42s
CI / dependency-scan (pull_request) Successful in 1m41s
CI / sast-scan (pull_request) Successful in 2m44s
CI / workflow-summary (pull_request) Failing after 1m34s

This commit removes the old ESLint configuration file and introduces a new configuration file in ES module format. It also updates several ESLint-related dependencies to their latest versions, ensuring improved linting capabilities and compatibility with the current codebase. Additionally, the linting command in package.json has been simplified for better usability.
This commit is contained in:
Tanya 2026-01-12 14:42:45 -05:00
parent 3d410a94a8
commit df7053dbd4
4 changed files with 807 additions and 764 deletions

View File

@ -1,71 +0,0 @@
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
},
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
],
settings: {
react: {
version: 'detect',
},
},
rules: {
'max-len': [
'error',
{
code: 120,
tabWidth: 2,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreComments: true,
},
],
'react/react-in-jsx-scope': 'off',
'react/no-unescaped-entities': [
'error',
{
forbid: ['>', '}'],
},
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'react-hooks/exhaustive-deps': 'warn',
},
overrides: [
{
files: ['**/Help.tsx', '**/Dashboard.tsx'],
rules: {
'react/no-unescaped-entities': 'off',
},
},
],
}

View File

@ -0,0 +1,84 @@
import js from '@eslint/js';
import globals from 'globals';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: ['dist', 'node_modules'],
},
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
...globals.node,
...globals.es2021,
},
parser: tseslint.parser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
},
},
plugins: {
'@typescript-eslint': tseslint.plugin,
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
...js.configs.recommended.rules,
...tseslint.configs.recommended.rules,
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'max-len': [
'error',
{
code: 120,
tabWidth: 2,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreComments: true,
},
],
'react/react-in-jsx-scope': 'off',
'react/no-unescaped-entities': [
'error',
{
forbid: ['>', '}'],
},
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'react-hooks/exhaustive-deps': 'warn',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
{
files: ['**/Help.tsx', '**/Dashboard.tsx'],
rules: {
'react/no-unescaped-entities': 'off',
},
},
);

File diff suppressed because it is too large Load Diff

View File

@ -7,29 +7,32 @@
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
"lint": "eslint . --max-warnings 0"
},
"dependencies": {
"@tanstack/react-query": "^5.8.4",
"axios": "^1.6.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.20.0"
"react-router-dom": "^6.30.3"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@typescript-eslint/eslint-plugin": "^8.53.0",
"@typescript-eslint/parser": "^8.53.0",
"@vitejs/plugin-react": "^4.2.0",
"autoprefixer": "^10.4.16",
"eslint": "^8.53.0",
"eslint": "^9.39.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.4",
"globals": "^17.0.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5",
"typescript": "^5.2.2",
"typescript-eslint": "^8.53.0",
"vite": "^7.3.1"
}
}