TidGi-Desktop/eslint.config.mjs
lin onetwo a42af638b6 lint
2025-10-31 00:10:44 +08:00

36 lines
1.1 KiB
JavaScript

import tidgiConfig from 'eslint-config-tidgi';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export default [
...tidgiConfig,
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['./*.js', './*.mjs', './*.*.js', './*.*.ts', './*.*.mjs'],
},
tsconfigRootDir: __dirname,
},
},
rules: {
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/require-await': 'off',
},
},
{
files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx', "*.env.d.ts"],
rules: {
'@typescript-eslint/unbound-method': 'off',
'unicorn/prevent-abbreviations': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
},
},
];