TidGi-Desktop/eslint.config.mjs
lin onetwo 5cd8437e10
Feat/subwiki external attachment (#671)
* lint

* fix: Use macos-15 (Intel) for x64 builds to get correct dugite git binaries

* Refactor routing utilities and improve files/ external in sub-wiki

Moves routing utility functions to be exported via $tw.utils and updates type usage for better plugin integration. Adds support for excluding external attachments folders (configurable via $:/config/ExternalAttachments/WikiFolderToMove) from file watching. Updates build script to include new entry points and adjusts loader to use the correct module path. Adds and renames relevant .meta and type definition files.

* Add sub-wiki support for external file access

Introduces sub-wiki path management and updates file retrieval logic to search both main and sub-wiki external attachment folders, as configured by `$:/config/ExternalAttachments/WikiFolderToMove`. Adds documentation for sub-wiki features and ensures consistent file access and exclusion across main and sub-wikis.

* Update FileSystemAdaptor.routing.test.ts

* Update fix-location-info.ts

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: test

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-16 17:01:09 +08:00

37 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',
'@typescript-eslint/no-dynamic-delete': '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',
},
},
];