秦宇航
ae27a8d1e6
feat(transformer): add partial support for babel-plugin-transform-instanceof ( #1802 )
2023-12-25 15:06:41 +08:00
Boshen
a1accdca7f
Release oxlint and vscode extension v0.0.22
2023-12-25 13:12:07 +08:00
Boshen
b4138aa657
feat(linter): change double-comparisons to correctness
2023-12-25 13:06:40 +08:00
Dunqing
d41e3fd268
feat(ast): enter/leave ClassBody and PrivateInExpression ( #1792 )
2023-12-25 10:52:21 +08:00
overlookmotel
1feec95a94
fix(parser) fix typo in expecting_directives variable name ( #1801 )
...
Renamves `expecting_diretives ` to `expecting_directives` to fix spelling
2023-12-24 16:51:02 +00:00
poteboy
32413f58ad
feat(linter): eslint-plugin-jsx-a11y aria-props ( #1797 )
...
Implemented eslint-plugin-jsx-a11y aria_props as part of #1141
This PR introduces the aria-props rule, implemented based on the
[WAI-ARIA 1.1
specifications](https://www.w3.org/TR/wai-aria/#state_prop_def ).
2023-12-24 16:47:18 +00:00
poteboy
bf527f4fc1
feat(linter): eslint-plugin-jsx-a11y no-aria-hidden-on-focusable ( #1795 )
...
Implemented eslint-plugin-jsx-a11y no-aria-hidden-on-focusable as part
of #1141
### Key Points
- Implements `no-aria-hidden-on-focusable` as per the
[eslint-plugin-jsx-a11y
documentation](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-aria-hidden-on-focusable.md ).
- Incorporates HTML's `focus()` API criteria based on the [W3C's DOM
Level 2 HTML
specification](https://www.w3.org/TR/DOM-Level-2-HTML/html.html ) to
accurately identify focusable elements.
2023-12-24 09:29:40 +00:00
Cameron
3102b22c32
fix(linter) fix incorrect report in prefer-string-replace-all ( #1796 )
2023-12-24 09:37:32 +08:00
magic-akari
5b2696b711
refactor(parser): report this parameter error ( #1788 )
...
- follow up: #1728
2023-12-23 22:09:14 +08:00
Milo
b25f014e84
fix(linter): fix a typo in no_redeclare message ( #1789 )
2023-12-23 12:48:50 +00:00
Cameron
29a4a35fd8
fix(prettier) add missing closing brace for dock debug ( #1786 )
2023-12-23 10:59:13 +08:00
Boshen
51a243b989
perf(linter): reduce the RuleEnum enum size from 168 to 16 bytes ( #1783 )
...
Co-authored-by: Dunqing <dengqing0821@gmail.com>
2023-12-22 22:54:41 +08:00
Dunqing
521aa2cf9d
feat(linter/eslint/no-useless-escape): support auto fix ( #1743 )
...
There are many errors in the vitest repo related to this rule.
2023-12-22 22:23:34 +08:00
Tapan Prakash
b8a90c1b9b
feat(linter): eslint-plugin-jsx-a11y no-distracting-elements rule ( #1767 )
...
Implemented eslint-plugin-jsx-a11y no-distracting-elements as part of
https://github.com/oxc-project/oxc/issues/1141 porting recommended
rules.
Doc:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-distracting-elements.md
Test:
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/__tests__/src/rules/no-distracting-elements-test.js
2023-12-22 13:04:29 +08:00
Wenzhe Wang
18f0e20c56
docs(linter): update comments ( #1779 )
2023-12-22 12:20:22 +08:00
Wenzhe Wang
0bf7596949
fix(linter): support read the third item in config file ( #1771 )
...
closes : #1757
2023-12-21 22:51:57 +08:00
Boshen
2286181223
fix(linter): update snapshots
2023-12-21 22:07:53 +08:00
Boshen
5d7ea9d7a1
fix(linter): change non-error lints to warning
2023-12-21 21:55:22 +08:00
IWANABETHATGUY
fc7c857f80
fix(vscode): don't lint files in .gitignore and .eslintignore ( #1765 )
...
Closed https://github.com/oxc-project/oxc/issues/1752
2023-12-21 21:45:32 +08:00
Boshen
2e707bc1c7
perf(linter): use simd (memchr) for no-useless-escape search ( #1766 )
2023-12-21 19:14:16 +08:00
Boshen
82dc4035eb
chore(linter): bump oxc_resolver to v1.0.1
2023-12-21 16:43:27 +08:00
Boshen
da67fe1ca2
refactor(semantic): remove unused methods from AstNode
2023-12-21 16:08:14 +08:00
Boshen
6d4202241b
fix(linter): improve the help message for const-comparisons ( #1764 )
...
closes #1741
2023-12-21 16:04:39 +08:00
Boshen
d0cc3ec9a2
perf(linter): change regex to static in no_commented_out_tests
2023-12-21 15:35:57 +08:00
Boshen
e741b8fec4
perf(linter): precompute rule.name() ( #1759 )
...
enum static dispatch has become slow because there are 200 enum variants
2023-12-21 12:06:01 +08:00
Cameron
fc3a1a21a3
feat(linter) deepscan: bad char at comparison ( #1750 )
2023-12-20 12:39:27 +08:00
Cameron
a34c7fcbcc
feat(linter) deepscan: bad replace all arg ( #1749 )
2023-12-20 12:34:27 +08:00
Cameron
266667b892
chore: add deepscan to rulegen ( #1748 )
2023-12-20 12:29:28 +08:00
Cameron
df29e8da72
fix(cli) skip run lint when --rules is passed ( #1747 )
...
not sure if there is a cleaner way to do this.
maybe change `check_options` to return an Option - none if no CliResult, Some if there is a cli result (something was incorrect or the cmd was handled)
2023-12-20 12:24:45 +08:00
Boshen
2b4d1bf142
fix(parser): await in jsx expression
...
closes #1740
2023-12-19 20:23:16 +08:00
Cameron
3b1212e8bd
fix(linter) false positives for empty brace spaces ( #1742 )
...
closes #1699
2023-12-19 20:23:09 +08:00
Boshen
289ceb08e4
chore(MAINTENANCE): update MAINTENANCE guide
2023-12-19 19:54:01 +08:00
Boshen
0e563b301d
fix(linter): fix missing ` in the help message for const-comparisons
2023-12-19 19:51:12 +08:00
Dunqing
117f44cb30
feat(linter/eslint/no-cond-assign): span points to the operator ( #1739 )
...
close : #1726
2023-12-19 11:29:30 +00:00
Boshen
2d3ac95eda
refactor(linter): shrink the error span for require_yield
...
closes #1721
2023-12-19 19:19:05 +08:00
Boshen
38cb487903
refactor(linter): explain no-empty-pattern
...
closes #1720
2023-12-19 19:18:57 +08:00
Boshen
c61a6c6694
chore(benchmark): remove vue from test benchmark because it is flaky
2023-12-19 19:05:42 +08:00
Boshen
cc20eb0b18
chore(MAINTENANCE): make the repos easier to clone
2023-12-19 18:59:04 +08:00
Boshen
3a38d79d93
chore(linter): reference the new oxc rules
2023-12-19 18:58:51 +08:00
Cameron
0a611ac046
feat(linter) no double comparisons ( #1712 )
...
https://rust-lang.github.io/rust-clippy/master/index.html#/double_comparisons
<img width="1134" alt="Screenshot 2023-12-17 at 22 34 06"
src="https://github.com/oxc-project/oxc/assets/18101008/ae268c31-132f-451d-9e24-d3f1c89e5b42 ">
2023-12-19 10:55:32 +00:00
Cameron
de1d6ad1dd
feat(linter) no const comparisons ( #1710 )
...
Reports errors when a comparison is redundant, or impossible.
A redundant check would be `foo > 5 && foo > 10`
An impossible check would be `foo > 5 && foo < 5`
https://rust-lang.github.io/rust-clippy/master/index.html#/redundant_comparisons
https://rust-lang.github.io/rust-clippy/master/index.html#/impossible
<img width="1134" alt="Screenshot 2023-12-17 at 21 18 34"
src="https://github.com/oxc-project/oxc/assets/18101008/3574199c-03fb-409c-8ffb-0dc1f685c347 ">
2023-12-19 18:50:45 +08:00
Dunqing
8e6004ffc6
fix(linter/eslint/no-obj-calls): correctly resolves the binding name ( #1738 )
...
close : #1733
2023-12-19 18:39:58 +08:00
magic-akari
a2858ed452
refactor(ast): introduce ThisParameter ( #1728 )
...
Most TypeScript types can be eliminated during the code generation phase
by not printing the corresponding AST nodes.
The changes in this PR enable applying a similar technique to the `this`
parameter.
2023-12-19 13:20:33 +08:00
legend80s
f8b386ef58
feat(linter): correct example and docs url for number_arg_out_of_range ( #1737 )
2023-12-19 05:14:43 +00:00
Cameron
7f65d6a15c
fix(linter) improve span of bad-remove-event-listener, merge rules ( #1734 )
...
closes #1725
2023-12-18 23:52:11 +08:00
Cameron
f1d1563cde
fix(linter) improve span for no-unneccessary-await ( #1732 )
...
closes #1718
2023-12-18 21:34:28 +08:00
Cameron
78931e6187
feat(linter) improve span for no useless catch ( #1731 )
...
closes #1719
2023-12-18 21:29:28 +08:00
Cameron
360f3b01da
fix(linter) shrink span for prefer-string-starts-with-ends-with ( #1730 )
...
closes #1722
2023-12-18 21:25:27 +08:00
Cameron
4ebb3fb218
fix(cli): conflict between --import-plugin and -D correctness ( #1729 )
...
closes #1727
2023-12-18 21:20:48 +08:00
Boshen
2046e85664
ci: fix release vscode
2023-12-18 19:02:56 +08:00