81 lines
2.6 KiB
JavaScript
Executable file
81 lines
2.6 KiB
JavaScript
Executable file
module.exports = {
|
|
root: true,
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
node: true,
|
|
},
|
|
ignorePatterns: ['src/utils/monaco.d.ts', 'vite.config.ts', 'dist', 'coverage', 'playwright.config.ts', 'tests/e2e/**'],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
project: ['./tsconfig.json'],
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:react/recommended',
|
|
'plugin:react-hooks/recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
],
|
|
overrides: [
|
|
{
|
|
files: ['src/__tests__/**/*', '*.test.ts', '*.test.tsx', 'src/test/setupTests.ts'],
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
'@typescript-eslint/require-await': 'off',
|
|
'@typescript-eslint/unbound-method': 'off',
|
|
'@typescript-eslint/ban-types': 'off',
|
|
'no-empty': 'off'
|
|
}
|
|
},
|
|
{
|
|
files: ['*.ts', '*.tsx'],
|
|
parserOptions: {
|
|
project: ['./tsconfig.json'],
|
|
},
|
|
},
|
|
],
|
|
rules: {
|
|
'react/react-in-jsx-scope': 'off',
|
|
'react/prop-types': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/no-floating-promises': 'warn',
|
|
'@typescript-eslint/no-misused-promises': [
|
|
'warn',
|
|
{
|
|
checksVoidReturn: {
|
|
attributes: false,
|
|
},
|
|
},
|
|
],
|
|
// Relax strict type-safety rules to warnings for progressive improvement
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
'@typescript-eslint/require-await': 'warn',
|
|
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
|
'@typescript-eslint/ban-types': 'warn',
|
|
'@typescript-eslint/unbound-method': 'warn',
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
'no-empty': 'warn',
|
|
'prefer-const': 'warn',
|
|
'no-inner-declarations': 'warn',
|
|
'no-useless-escape': 'warn',
|
|
}
|
|
};
|