mirror of
https://github.com/immich-app/discord-bot.git
synced 2026-09-30 21:37:38 +08:00
52 lines
1.2 KiB
JavaScript
52 lines
1.2 KiB
JavaScript
import js from '@eslint/js';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
export default [
|
|
{
|
|
ignores: [
|
|
'**/.DS_Store',
|
|
'**/node_modules',
|
|
'build',
|
|
'**/.env',
|
|
'**/.env.*',
|
|
'!**/.env.example',
|
|
'**/*.md',
|
|
'.github',
|
|
'**/pnpm-lock.yaml',
|
|
'**/package-lock.json',
|
|
'**/yarn.lock',
|
|
],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
plugins: {
|
|
'no-relative-import-paths': noRelativeImportPaths,
|
|
},
|
|
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
ecmaVersion: 5,
|
|
sourceType: 'module',
|
|
|
|
parserOptions: {
|
|
project: 'tsconfig.json',
|
|
tsconfigRootDir: __dirname,
|
|
},
|
|
},
|
|
|
|
rules: {
|
|
'@typescript-eslint/no-floating-promises': 'error',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'no-relative-import-paths/no-relative-import-paths': 'error',
|
|
},
|
|
},
|
|
];
|