chore: guard unsafe DOM HTML with ESLint #18
Frontend security / security (push) Successful in 10s
Frontend verify / verify (push) Failing after 4m0s
Frontend security / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Failing after 13m52s
Conventional commits / commits (pull_request) Successful in 33s
Frontend security / security (push) Successful in 10s
Frontend verify / verify (push) Failing after 4m0s
Frontend security / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Failing after 13m52s
Conventional commits / commits (pull_request) Successful in 33s
Enable no-unsanitized recommended rules and verify TypeScript DOM sink diagnostics.
This commit is contained in:
@@ -88,7 +88,7 @@ Knip, dependency rules приложения и stories, сборки прило
|
||||
`npm run lint` запускает ESLint с `--max-warnings=0`; `npm run lint:fix`
|
||||
применяет автофиксы. [Конфигурация](eslint.config.mjs) подключает рекомендованные
|
||||
наборы всех установленных плагинов: TypeScript, React, Hooks, Refresh, Query,
|
||||
Unicorn, import-x, SonarJS, RegExp, Security, Perfectionist, Stylistic,
|
||||
Unicorn, import-x, SonarJS, RegExp, Security, no-unsanitized, Perfectionist, Stylistic,
|
||||
Vitest, Testing Library, jest-dom и Storybook. Правила React, тестов и stories
|
||||
применяются к соответствующим файлам; generated/build artifacts исключены.
|
||||
|
||||
@@ -98,6 +98,8 @@ Stylistic отвечает за форматирование JS/TS/TSX, Perfecti
|
||||
`lint-staged` исправляет JS/TS/TSX перед commit. `lint:eslint` сначала собирает
|
||||
private packages, чтобы анализ типов использовал актуальные declarations.
|
||||
`npm run test:lint` проверяет действующие presets и ошибочные примеры.
|
||||
`no-unsanitized` проверяет опасные DOM HTML-присваивания и вызовы;
|
||||
React `dangerouslySetInnerHTML` отдельно проверяется React-плагином.
|
||||
|
||||
Точечные исключения в исходниках объясняют контракты и ограничения статического
|
||||
анализа; изменение nullable API fields, query keys или порядка race-операций
|
||||
|
||||
Reference in New Issue
Block a user