mirror of
https://github.com/immich-app/packages.git
synced 2026-09-30 13:33:01 +08:00
64 lines
1.6 KiB
TypeScript
64 lines
1.6 KiB
TypeScript
import js from '@eslint/js';
|
|
import prettier from 'eslint-config-prettier';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import { defineConfig } from 'eslint/config';
|
|
import globals from 'globals';
|
|
import tseslint from 'typescript-eslint';
|
|
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
|
|
|
export default defineConfig([
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
...svelte.configs['flat/recommended'],
|
|
prettier,
|
|
...svelte.configs['flat/prettier'],
|
|
eslintPluginUnicorn.configs.recommended,
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: tseslint.parser,
|
|
extraFileExtensions: ['.svelte'],
|
|
},
|
|
},
|
|
rules: {
|
|
'svelte/no-navigation-without-resolve': 'off',
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
curly: 2,
|
|
'no-shadow': 'error',
|
|
'unicorn/prevent-abbreviations': 'off',
|
|
'unicorn/filename-case': 'off',
|
|
'unicorn/no-null': 'off',
|
|
'unicorn/prefer-top-level-await': 'off',
|
|
'unicorn/prefer-event-target': 'off',
|
|
'unicorn/no-thenable': 'off',
|
|
'unicorn/import-style': 'off',
|
|
'unicorn/prefer-structured-clone': 'off',
|
|
'unicorn/no-for-loop': 'off',
|
|
'unicorn/no-process-exit': 'off',
|
|
'prettier/prettier': 0,
|
|
'object-shorthand': ['error', 'always'],
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
ignores: ['packages/**/build/', 'packages/**/.svelte-kit/', 'packages/**/dist/'],
|
|
},
|
|
]);
|