Commit graph

2248 commits

Author SHA1 Message Date
Tapan Prakash
0280e06f59
feat(linter): Refine test for no-distracting-elements (#1824)
Added support for component settings for eslint-plugin-jsx-a11y
no-distracting-elements rule based on
https://github.com/oxc-project/oxc/pull/1668 PR.
Updated the test cases.
2023-12-26 12:15:37 +00:00
IWANABETHATGUY
c1bac34c76
fix(lsp): make the server available in nvim-lspconfig (#1823)
1. It seems that nvim-lspconfig diagnostics handler require **version**
of **document**, now we can use
`oxc_vscode` language server in neomvin with
[nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)


![image](https://github.com/oxc-project/oxc/assets/17974631/6b147333-341f-4226-a466-2b3d17b77215)
2023-12-26 16:37:25 +08:00
Cameron
7be3b1eec6
feat(linter) eslint plugin react: button has type (#1785) 2023-12-26 15:57:53 +08:00
msdlisper
f0ad356108
feat(linter): refine jsx-a11y settings (#1816)
refine jsx-a11y settings for #1141
2023-12-26 15:55:52 +08:00
Cameron
7d9d920148
feat(linter) oxc: approx constant (#1818)
Co-authored-by: Dunqing <dengqing0821@gmail.com>
2023-12-26 12:19:44 +08:00
Cameron
ce851bb9a5
feat(linter) handle more cases for const-comparisons (#1817)
closes #1711
2023-12-26 10:25:26 +08:00
Dunqing
ca04312130
feat(semantic): add ClassTable (#1793) 2023-12-25 23:59:35 +08:00
IWANABETHATGUY
bd11b02cac
chore: better diagnostic when config is not a json file (#1813)
1. Closed https://github.com/oxc-project/oxc/pull/1804
2023-12-25 22:50:13 +08:00
msdlisper
d984d59e68
feat(linter): eslint-plugin-jsx-a11y lang (#1812)
lang linter for #1141
2023-12-25 18:36:55 +08:00
Boshen
601153fe8f
refactor(benchmark): use more complicated files (#1811)
closes #1806

---------

Co-authored-by: Dunqing <dengqing0821@gmail.com>
2023-12-25 17:27:02 +08:00
Boshen
c59508675d
chore(linter): remove the implementation from constructor_super
This should be implemented by a CFG
2023-12-25 15:37:49 +08:00
dependabot[bot]
868c35451d
chore(deps): bump the dependencies group with 5 updates (#1808) 2023-12-25 15:17:47 +08:00
秦宇航
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