mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-13 15:34:13 +03:00
2cdbc5e205
* feat: fix clickoutside for multi modal case, fix select list options display. * Move select to a separate folder * Serach field CSS tweak * Replace the old `Select` with the new one * Remove old `Select` component and switch `SelectNew` component name * Added `$effect` type to eslint config * Added the `searchable` property to `Select` * disable text selection and added an animation * dropzone hover animation update * Remove focus state outline * Move `Listitem` to `ProjectPopup` as a snippet * rename `useResize` to `resizeObserver` * Rename `useAutoHeight` to `autoHeight` * remove unused component `PopupMenuItem` * Update `Unupply` modal design * Handle `Select` position on resize * added an animation to the new context menu * Right click context menu added * revert right click context menu * Context menu: add `item` arg for the `open` method * updated context menu for `Filter`, `FileItem`, branch `kebab` menu * Updated Dropdown context menus * Temporary remove `copy PR link` * Rename: `BranchLanePopupMenu ` to `BranchLaneContextMenu` * FileListItem uncomment commented code * Hunk context menu updated * Remove `PopupMenu` * Replace the old `ContextMenu` file with the new one * Added blocking overlay for dropdown context menus * animation timing update * `Select` folder renamed to `select` * import fix * import fix * remove commented code and `console.log` * add arrow navigation to the `Select` component * case sensitivity added * Update HunkViewer.svelte * remove duplicated folder
159 lines
3.6 KiB
JavaScript
159 lines
3.6 KiB
JavaScript
import js from '@eslint/js';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
import eslintPluginSvelte from 'eslint-plugin-svelte';
|
|
import globals from 'globals';
|
|
import tsEslint from 'typescript-eslint';
|
|
import pluginImportX from 'eslint-plugin-import-x';
|
|
// Flat config support: https://github.com/storybookjs/eslint-plugin-storybook/pull/156
|
|
import storybook from 'eslint-plugin-storybook';
|
|
import svelteParser from 'svelte-eslint-parser';
|
|
|
|
export default tsEslint.config(
|
|
js.configs.recommended,
|
|
...storybook.configs['flat/recommended'],
|
|
...tsEslint.configs.recommended,
|
|
...eslintPluginSvelte.configs['flat/recommended'],
|
|
eslintConfigPrettier,
|
|
...eslintPluginSvelte.configs['flat/prettier'],
|
|
{
|
|
files: ['**/*.svelte'],
|
|
languageOptions: {
|
|
ecmaVersion: 2021,
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.node,
|
|
...globals.browser,
|
|
$state: 'readonly',
|
|
$derived: 'readonly',
|
|
$props: 'readonly',
|
|
$bindable: 'readonly',
|
|
$inspect: 'readonly',
|
|
$host: 'readonly',
|
|
$effect: 'readonly'
|
|
},
|
|
parser: svelteParser,
|
|
parserOptions: {
|
|
parser: tsParser,
|
|
extraFileExtensions: ['.svelte']
|
|
}
|
|
}
|
|
},
|
|
{
|
|
ignores: [
|
|
'**/.*', // dotfiles aren't ignored by default in FlatConfig
|
|
'.*', // dotfiles aren't ignored by default in FlatConfig
|
|
'**/.DS_Store',
|
|
'**/node_modules',
|
|
'**/butler/target',
|
|
'**/build',
|
|
'**/dist',
|
|
'.svelte-kit',
|
|
'**/package',
|
|
'**/e2e',
|
|
'**/.env',
|
|
'**/.env.*',
|
|
'!**/.env.example',
|
|
'**/pnpm-lock.yaml',
|
|
'**/package-lock.json',
|
|
'**/yarn.lock',
|
|
'.github',
|
|
'.vscode',
|
|
'src-tauri',
|
|
'**/eslint.config.js',
|
|
'**/eslint.config.mjs',
|
|
'**/svelte.config.js',
|
|
'**/postcss.config.cjs',
|
|
'**/playwright.config.ts',
|
|
'**/.pnpm-store',
|
|
'!.storybook',
|
|
'target/',
|
|
'crates/'
|
|
]
|
|
},
|
|
{
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: tsEslint.parser,
|
|
project: ['./packages/**/tsconfig.json', './app/tsconfig.json'],
|
|
extraFileExtensions: ['.svelte']
|
|
}
|
|
},
|
|
rules: {
|
|
eqeqeq: ['error', 'always'],
|
|
'import-x/no-cycle': 'error',
|
|
|
|
'import-x/order': [
|
|
'error',
|
|
{
|
|
alphabetize: {
|
|
order: 'asc',
|
|
orderImportKind: 'asc',
|
|
caseInsensitive: false
|
|
},
|
|
|
|
groups: [
|
|
'index',
|
|
'sibling',
|
|
'parent',
|
|
'internal',
|
|
'external',
|
|
'builtin',
|
|
'object',
|
|
'type'
|
|
],
|
|
|
|
'newlines-between': 'never'
|
|
}
|
|
],
|
|
|
|
'import-x/no-unresolved': [
|
|
'error',
|
|
{
|
|
ignore: ['^\\$app', '^\\$env']
|
|
}
|
|
],
|
|
|
|
'import-x/no-relative-packages': 'error', // Don't allow packages to have relative imports between each other
|
|
'func-style': [2, 'declaration'],
|
|
'@typescript-eslint/no-namespace': 'off',
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_'
|
|
}
|
|
],
|
|
|
|
'no-return-await': 'off',
|
|
'@typescript-eslint/return-await': ['error', 'always'],
|
|
'@typescript-eslint/promise-function-async': 'error',
|
|
'@typescript-eslint/await-thenable': 'error',
|
|
'svelte/no-at-html-tags': 'off'
|
|
},
|
|
settings: {
|
|
'import-x/extensions': ['.ts'],
|
|
'import-x/parsers': {
|
|
'@typescript-eslint/parser': ['.ts']
|
|
},
|
|
'import-x/resolver': {
|
|
typescript: {
|
|
project: [
|
|
'./app/tsconfig.json',
|
|
'./app/.svelte-kit/tsconfig.json',
|
|
'./packages/**/tsconfig.json',
|
|
'./packages/ui/.svelte-kit/tsconfig.json'
|
|
]
|
|
}
|
|
}
|
|
},
|
|
plugins: {
|
|
'import-x': pluginImportX
|
|
}
|
|
}
|
|
);
|