mirror of
https://github.com/AventurasTeam/Aventuras.git
synced 2026-04-26 10:51:24 +00:00
* fix: prettier, eslint, pipeline * fix: eslintignore, branch trigger * fix: eslint missing package * chore: format * fix: eslint config * chore: lint wip * chore: lint * chore: lint * chore: typecheck wip * fix: typecheck * fix: typecheck * fix: pipeline: add build step * feat: pre-push code quality check
66 lines
1.6 KiB
JavaScript
66 lines
1.6 KiB
JavaScript
import svelte from 'eslint-plugin-svelte'
|
|
import globals from 'globals'
|
|
import tseslint from 'typescript-eslint'
|
|
import prettier from 'eslint-config-prettier'
|
|
import eslintPluginPrettier from 'eslint-plugin-prettier'
|
|
import unusedImports from 'eslint-plugin-unused-imports'
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default [
|
|
...tseslint.configs.recommended,
|
|
...svelte.configs['flat/recommended'],
|
|
prettier,
|
|
...svelte.configs['flat/prettier'],
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.svelte'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: tseslint.parser,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.svelte.ts'],
|
|
languageOptions: {
|
|
parser: tseslint.parser,
|
|
parserOptions: {
|
|
project: true,
|
|
extraFileExtensions: ['.svelte'],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
ignores: ['build/', '.svelte-kit/', 'dist/', 'node_modules/', 'src-tauri/'],
|
|
},
|
|
{
|
|
plugins: {
|
|
'unused-imports': unusedImports,
|
|
prettier: eslintPluginPrettier,
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
'unused-imports/no-unused-vars': [
|
|
'error',
|
|
{
|
|
vars: 'all',
|
|
varsIgnorePattern: '^_',
|
|
args: 'after-used',
|
|
argsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
'unused-imports/no-unused-imports': 'error',
|
|
'prettier/prettier': 'warn',
|
|
'svelte/no-navigation-without-resolve': 'off',
|
|
'svelte/no-at-html-tags': 'off',
|
|
},
|
|
},
|
|
]
|