chore: Update package.json and pnpm-lock.yaml to add husky for Git hooks; enhance Docker workflow with pnpm setup and linting steps; refactor various components to utilize new form components and improve UI consistency.
Build, Test, and Push CFDM Docker Image / test (push) Successful in 4m5s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 2m26s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 8s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped
Build, Test, and Push CFDM Docker Image / test (push) Successful in 4m5s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 2m26s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 8s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped
This commit is contained in:
@@ -5,6 +5,8 @@ import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
import tseslint from 'typescript-eslint'
|
||||
import { defineConfig, globalIgnores } from 'eslint/config'
|
||||
|
||||
const rawHtmlElements = ['table', 'select', 'hr']
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores(['dist']),
|
||||
{
|
||||
@@ -18,5 +20,64 @@ export default defineConfig([
|
||||
languageOptions: {
|
||||
globals: globals.browser,
|
||||
},
|
||||
rules: {
|
||||
'react-hooks/set-state-in-effect': 'off',
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
patterns: [
|
||||
{
|
||||
group: ['@/components/ui/*'],
|
||||
message: 'Импортируйте примитивы через @cfdm/ui/components/*',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
...rawHtmlElements.map((name) => ({
|
||||
selector: `JSXOpeningElement[name.name="${name}"]`,
|
||||
message: `Используйте shadcn-компонент вместо <${name}>`,
|
||||
})),
|
||||
{
|
||||
selector:
|
||||
'JSXAttribute[name.name="className"] Literal[value=/\\bspace-[xy]-/]',
|
||||
message: 'Используйте flex + gap-* вместо space-y-* / space-x-*',
|
||||
},
|
||||
{
|
||||
selector:
|
||||
'JSXAttribute[name.name="className"] Literal[value=/\\bbg-(emerald|red|green|blue|yellow|orange)-/]',
|
||||
message: 'Используйте semantic tokens (bg-primary, bg-muted и т.д.)',
|
||||
},
|
||||
{
|
||||
selector:
|
||||
'JSXAttribute[name.name="className"] Literal[value=/\\btext-(blue|red|green)-/]',
|
||||
message: 'Используйте semantic tokens (text-foreground, text-muted-foreground)',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['src/routes/**/*.{ts,tsx}'],
|
||||
rules: {
|
||||
'react-refresh/only-export-components': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['src/components/tagged-input.tsx'],
|
||||
rules: {
|
||||
'react-refresh/only-export-components': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'**/services-board/*-row.tsx',
|
||||
'**/groups-board/*-row.tsx',
|
||||
'**/layout/app-shell.tsx',
|
||||
'**/service-binding-card.tsx',
|
||||
],
|
||||
rules: {
|
||||
'no-restricted-syntax': 'off',
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user