Build, Test, and Push CFDM Docker Image / test (push) Failing after 3m29s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Has been skipped
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped
Build, Test, and Push CFDM Docker Image / update-wiki (push) Has been skipped
- Modified ESLint configuration to include additional global ignores for better linting control. - Updated component layouts in the ReUI kit to use flexbox for improved spacing and alignment. - Refactored the CertificatesPage to optimize chart data handling and state management. - Enhanced DashboardPage with state management for current timestamp to streamline expiration checks. Co-authored-by: Cursor <cursoragent@cursor.com>
103 lines
3.0 KiB
JavaScript
103 lines
3.0 KiB
JavaScript
import js from '@eslint/js'
|
|
import globals from 'globals'
|
|
import reactHooks from 'eslint-plugin-react-hooks'
|
|
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', 'src/components/blocks/**']),
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
extends: [
|
|
js.configs.recommended,
|
|
tseslint.configs.recommended,
|
|
reactHooks.configs.flat.recommended,
|
|
reactRefresh.configs.vite,
|
|
],
|
|
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',
|
|
},
|
|
},
|
|
{
|
|
files: [
|
|
'src/components/reui/**/*.{ts,tsx}',
|
|
'src/components/reui-kit/**/*.{ts,tsx}',
|
|
'src/components/columns/**/*.{ts,tsx}',
|
|
],
|
|
rules: {
|
|
'react-refresh/only-export-components': 'off',
|
|
'react-hooks/incompatible-library': 'off',
|
|
'react-hooks/use-memo': 'off',
|
|
'react-hooks/immutability': 'off',
|
|
'react-hooks/exhaustive-deps': 'off',
|
|
'no-restricted-syntax': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
'@typescript-eslint/no-unused-expressions': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'prefer-const': 'off',
|
|
},
|
|
},
|
|
])
|