mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
chore: use import.meta.dirname instead of __dirname (#30738)
This commit is contained in:
parent
1c3a5cf508
commit
2a1691868e
5 changed files with 8 additions and 27 deletions
|
|
@ -2,13 +2,8 @@ import js from '@eslint/js';
|
|||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
||||
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
||||
import globals from 'globals';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import typescriptEslint from 'typescript-eslint';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
export default typescriptEslint.config([
|
||||
eslintPluginUnicorn.configs.recommended,
|
||||
eslintPluginPrettierRecommended,
|
||||
|
|
@ -29,7 +24,7 @@ export default typescriptEslint.config([
|
|||
|
||||
parserOptions: {
|
||||
project: 'tsconfig.json',
|
||||
tsconfigRootDir: __dirname,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue