mirror of
https://github.com/jsmorabito/obsidian-commander.git
synced 2026-07-22 06:40:31 +00:00
Replaces the legacy .eslintrc/.eslintignore (typescript-eslint 5.x) with a flat eslint.config.mts on typescript-eslint 8.x, preserving the existing return-type/accessibility rules and adding the obsidianmd recommended rules. Also bumps the minimatch override, which was pinned to an old major that's incompatible with the new ESLint 9 toolchain. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
42 lines
1 KiB
TypeScript
42 lines
1 KiB
TypeScript
import tseslint from 'typescript-eslint';
|
|
import obsidianmd from 'eslint-plugin-obsidianmd';
|
|
import globals from 'globals';
|
|
import { globalIgnores } from 'eslint/config';
|
|
|
|
export default tseslint.config(
|
|
globalIgnores([
|
|
'node_modules',
|
|
'build',
|
|
'scripts',
|
|
'main.js',
|
|
'main.css',
|
|
'styles.css',
|
|
'tailwind.config.js',
|
|
]),
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
parserOptions: {
|
|
projectService: {
|
|
allowDefaultProject: ['eslint.config.mts', 'manifest.json'],
|
|
},
|
|
tsconfigRootDir: import.meta.dirname,
|
|
extraFileExtensions: ['.json'],
|
|
},
|
|
},
|
|
},
|
|
...tseslint.configs.recommended,
|
|
{
|
|
rules: {
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
'no-prototype-builtins': 'off',
|
|
'@typescript-eslint/no-empty-function': 'error',
|
|
'@typescript-eslint/class-literal-property-style': ['error', 'fields'],
|
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
'@typescript-eslint/explicit-member-accessibility': 'error',
|
|
},
|
|
},
|
|
...obsidianmd.configs.recommended,
|
|
);
|