Build and Push Docker Image / build (push) Successful in 1m21s
Replaces the hand-rolled aside plus mobile tab strip with the official shadcn Sidebar: it collapses to icons with tooltips, persists that state in a cookie and swaps itself for a Sheet on phones. The header now carries the trigger and the theme switch, and sign out moved into the footer dropdown. sidebar, sheet, tooltip and use-mobile were pulled from the @shadcn registry with their import paths rewritten by hand, so the existing button, input, separator and skeleton stayed untouched instead of being overwritten by the CLI. use-mobile is generated code that trips react-hooks/set-state-in-effect, so it joins components/ui in the eslint ignore list.
62 lines
1.8 KiB
JavaScript
62 lines
1.8 KiB
JavaScript
import globals from 'globals'
|
|
import js from '@eslint/js'
|
|
import pluginQuery from '@tanstack/eslint-plugin-query'
|
|
import reactHooks from 'eslint-plugin-react-hooks'
|
|
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
import { defineConfig } from 'eslint/config'
|
|
import tseslint from 'typescript-eslint'
|
|
|
|
export default defineConfig(
|
|
// O use-mobile vem gerado junto do sidebar do shadcn, mesma regra do ui/:
|
|
// não é código nosso, e ele viola react-hooks/set-state-in-effect de fábrica.
|
|
{ ignores: ['dist', 'src/components/ui', 'src/hooks/use-mobile.ts'] },
|
|
{
|
|
extends: [
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
...pluginQuery.configs['flat/recommended'],
|
|
],
|
|
files: ['**/*.{ts,tsx}'],
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
globals: globals.browser,
|
|
},
|
|
plugins: {
|
|
'react-hooks': reactHooks,
|
|
'react-refresh': reactRefresh,
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
'react-refresh/only-export-components': [
|
|
'warn',
|
|
{ allowConstantExport: true },
|
|
],
|
|
'no-console': 'error',
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
args: 'all',
|
|
argsIgnorePattern: '^_',
|
|
caughtErrors: 'all',
|
|
caughtErrorsIgnorePattern: '^_',
|
|
destructuredArrayIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
ignoreRestSiblings: true,
|
|
},
|
|
],
|
|
// Enforce type-only imports for TypeScript types
|
|
'@typescript-eslint/consistent-type-imports': [
|
|
'error',
|
|
{
|
|
prefer: 'type-imports',
|
|
fixStyle: 'inline-type-imports',
|
|
disallowTypeAnnotations: false,
|
|
},
|
|
],
|
|
// Prevent duplicate imports from the same module
|
|
'no-duplicate-imports': 'error',
|
|
},
|
|
}
|
|
)
|