fix(linter): add more expression support for iframe-has-title#22460
Conversation
d27c700 to
6ea6420
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
Leonabcd123
left a comment
There was a problem hiding this comment.
I don't think we can just skip LogicalExpression (and maybe others as well). Take for example the following:
<iframe title={'' ?? ''} />
eslint-plugin-jsx-a11y raises an error on this, but in this pr oxlint doesn't (while oxlint 1.64.0 does). Tbh I don't see any real world case where someone would write something like this, so I'm not sure if this even matters, just something to consider for compatibility with eslint-plugin-jsx-a11y.
|
Thank you for the information, I hadn't considered that. If there is some consistent policy for this project, please let me know. |
I think this PR is okay to merge as-is, but yeah we probably don't want to accept something like If you'd be interested in creating a follow-up PR, I think we'd gladly accept a change to deny cases for logical expressions where the first argument is an empty string such as |
# Oxlint ### 🚀 Features - 1ae291e linter/no-underscore-dangle: Add `allowInUsingDeclarations` option (#22483) (吴杨帆) - 0440b0f linter/eslint: Implement `id-match` rule (#22379) (Vladislav Sayapin) - 65bf119 linter: Implement react no-object-type-as-default-prop (#22481) (uhyo) - 2a6ddce linter/eslint: Implement `no-implied-eval` rule (#22391) (Vladislav Sayapin) - d3a3c1d linter: Auto detect agents from CLI and transition to the agent output format (#22068) (Jovi De Croock) - 625758a linter/vitest: Implement padding-around-after-all-blocks rule (#21788) (kapobajza) - 37680b0 linter: Implement react no-unstable-nested-components (#22248) (Jovi De Croock) - d8d9c74 linter: Implement import/newline-after-import rule (#19142) (Ryuya Yanagi) ### 🐛 Bug Fixes - 3f59e03 linter: Only call rayon/miette/tracing inits once (#21899) (Matiss Janis Aboltins) - 602dfd6 linter/promise/no-return-wrap: Detect Promise calls in all branches (#22474) (zennnnnnn11) - e182aee linter: Allow dialogs and popovers for no_autofocus (#22289) (mehm8128) - 7ffb710 linter/jest/vitest: Jest/no-standalone-expect ignores additionalTestBlockFunctions option for jest/vitest hooks (#22477) (kapobajza) - c6f2d3f linter: Add more expression support for iframe-has-title (#22460) (mehm8128) - 5747ff1 linter: Avoid enabling jest with vitest plugin (#22499) (camc314) - 863984f linter/no-find-dom-node: Run on all files (#22479) (bab) ### ⚡ Performance - 2afef79 linter: Optimize `no-loop-func` (#22491) (camchenry) - 4c9ca72 oxlint: Align walker thread count with rayon pool (#22494) (Boshen) ### 📚 Documentation - f7967c7 linter/id-match: Clarify `onlyDeclarations` config docs (#22523) (camc314) - 1e0c97f linter: Fix closing code block in documentation for `padding-around-after-all-blocks` rule. (#22513) (connorshea) - a9049fd linter: Exclude directly provide autoFocus to dialog pattern (#22510) (mehm8128) # Oxfmt ### 🐛 Bug Fixes - 8ee946f formatter/sort_imports: Use label to classify lines (#22512) (leaysgur) - 8c1da44 formatter: Normalize destructuring keys in DCR (#22478) (camc314)
close #22422