mirror of
https://github.com/immich-app/discord-bot.git
synced 2026-09-30 13:32:52 +08:00
58 lines
1.2 KiB
JavaScript
58 lines
1.2 KiB
JavaScript
import js from '@eslint/js';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
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',
|
|
'src/generated',
|
|
],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
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-restricted-imports': [
|
|
'error',
|
|
{
|
|
patterns: [
|
|
{
|
|
group: ['.*'],
|
|
message: 'Relative imports are not allowed.',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|