mirror of
https://github.com/Dvorinka/excalidraw-full.git
synced 2026-06-05 06:32:56 +00:00
refactor(frontend): improve type safety and migrate to ESLint 9
Migrate the frontend to ESLint 9, add `eslint.config.mjs`, and replace various `any` types with more specific or safer alternatives across the codebase. - Update `package.json` with new ESLint and TypeScript-ESLint dependencies - Replace `any` with `Record<string, unknown>` or specific types in `TemplatePicker`, `Editor`, and `FileBrowser` - Improve error handling in `TeamSettings` and `Templates` using type guards - Add explicit type imports for Excalidraw elements in `Editor.tsx` - Refactor `Modal.tsx` for cleaner conditional logic - Add `check` script to `package.json` for type checking
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import tseslint from 'typescript-eslint';
|
||||
import pluginReact from 'eslint-plugin-react';
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ['dist/', 'node_modules/', 'dist-test/', '*.config.*', 'eslint.config.mjs', 'e2e/', 'playwright/'] },
|
||||
tseslint.configs.recommended,
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
plugins: { react: pluginReact },
|
||||
languageOptions: {
|
||||
parserOptions: { project: './tsconfig.json' },
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'@typescript-eslint/no-non-null-assertion': 'warn',
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
},
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user