I'm not sure if it was intentional, but something that seemed to be
"Tuning" was written as "Turing", so I've corrected it.
If it's unnecessary, please close it 🙏🏻
When building the vsix file, it was necessary to execute the build
command before the package command.
As a result, the documentation has been updated!
Adds first `eslint-plugin-jsx-a11y` rule.
Had to comment out a couple of tests with TODOs related to evaluating
logical expressions and polymorphic components, but I think these are
largely edge cases for detecting validity of alt text. The most
important cases are covered.
This PR fixes the covered span (specifically the stop position) of
`eslint-disable-next-line` comments.
Note that the covered span is not very accurate in the case of
multi-line comments. For example, the start and stop positions of the
`eslint-disable-next-line` comment in the example below are marked in
comments.
```js
/* eslint-disable-next-line no-debugger --
* Here's a very long description about why this configuration is necessary
* along with some additional information
**/
// ^start
debugger;
// ^stop
debugger;
```
The stop position has an offset of one or two depending on the line
ending (\r\n or \n). I am not sure if this would be a problem.
Adds the `just new-jsx-a11y-rule` for bootstrapping
`eslint-plugin-jsx-a11y` linting rules.
One tricky thing about the tests in that repo is that the aren't
provided as array expressions
(e.g., `[case0, case1, case2, ...]`) but rather separate arguments to
`[].concat()`
(e.g., `[].concat(case0, case1, case2, ...)`). There is probably a more
elegant way to match
these expressions, but this is what I came up with.
The other thing I introduced in this PR is prefer Rust's raw strings
(`r#`) when generating the
test cases. Sometimes running `just new-*` spit out unescaped back
quotes, which caused issues.
closes#1093
e.g.
```
RUST_BACKTRACE=full cargo run --bin=oxc_cli lint -D=suspicious -D=style -D=restriction -D=pedantic -D=nursery -D=correctness -A=no-useless-escape ./tasks/coverage/typescript/tests/cases/compiler/corrupted.ts
```
Results in:
```
× Failed to open file
help: Failed to open file "./tasks/coverage/typescript/tests/cases/compiler/corrupted.ts" with error "stream did not contain valid UTF-8"
Finished in 10ms on 1 file with 126 rules using 12 threads.
Found 0 warnings and 1 error.
```