mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 06:03:01 -05:00
Fix lint violations (vol.3) (#6301)
* Fix lint violations * Refactor code for clarity and consistency - Updated various components to improve readability and maintainability, including: - Changed `while (1)` to `while (true)` for better clarity. - Simplified conditional checks by removing unnecessary boolean casts. - Added missing `key` props in mapped elements to ensure proper rendering in lists. - Adjusted the handling of hidden states in budget components for clearer logic. - Cleaned up linting rules in `.oxlintrc.json` to streamline configuration. * Enhance accessibility and linting compliance - Updated `.oxlintrc.json` to add a warning for `jsx-a11y/no-autofocus` and removed several disabled rules. - Added `aria-level` attributes to improve semantic structure in `Page.tsx`, `Modal.tsx`, and `ReportCardName.tsx`. - Replaced `<label>` elements with `<Text>` components in various modals to ensure proper accessibility. - Added `htmlFor` attributes to labels in `ImportTransactionsModal.tsx` for better form accessibility. - Disabled specific linting rules inline to address accessibility concerns in `Image.jsx` and `Toggle.tsx`. * Add new keywords to spelling allowlist - Updated `.github/actions/docs-spelling/allow/keywords.txt` to include `oxfmt` and `oxlint` for improved spell-checking in documentation and code comments. * Disable no-autofocus rule in .oxlintrc.json * Update Trans component usage in MergeUnusedPayeesModal * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5a4fc5823c
commit
0aa96ecaee
@@ -2,15 +2,12 @@
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": ["react", "typescript", "import", "jsx-a11y"],
|
||||
"rules": {
|
||||
"jsx-a11y/no-autofocus": ["warn", { "ignoreNonDOM": true }],
|
||||
|
||||
// TODO fix all these and re-enable
|
||||
"jsx-a11y/alt-text": "off",
|
||||
"jsx-a11y/aria-role": "off",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/label-has-associated-control": "off",
|
||||
"jsx-a11y/prefer-tag-over-role": "off",
|
||||
"jsx-a11y/role-has-required-aria-props": "off",
|
||||
"jsx-a11y/tabindex-no-positive": "off",
|
||||
"no-autofocus": "off",
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user