DonIsaac
7afa1f06c3
feat(linter): support suggestions and dangerous fixes ( #4223 )
2024-07-18 02:20:30 +00:00
github-actions[bot]
697c0efdef
Release oxlint v0.6.1 ( #4326 )
...
## [0.6.1] - 2024-07-17
### Features
- 83c2c62 codegen: Add option for choosing quotes; remove slow
`choose_quot` method (#4219 ) (Boshen)
- 1f8968a linter: Add eslint-plugin-promise rules: avoid-new,
no-new-statics, params-names (#4293 ) (Jelle van der Waa)
- a4dc56c linter: Add fixer for
unicorn/no_useless_promise_resolve_reject (#4244 ) (Burlin)
- 6fb808f linter: Add typescript-eslint/no-confusing-non-null-assertion
(#4224 ) (Jaden Rodriguez)
- 126b66c linter: Support eslint-plugin-vitest/valid-describe-callback
(#4185 ) (cinchen)
- 05b9a73 linter: Support eslint-plugin-vitest/valid-expect (#4183 )
(cinchen)
- 3e56b2b linter: Support eslint-plugin-vitest/no-test-prefixes (#4182 )
(cinchen)
- 3016f03 linter: Let fixer functions return a `None` fix (#4210 )
(DonIsaac)
- bbe6137 linter: Implement unicorn/no-useless-undefined (#4079 )
(Burlin)
- 20cdb1f semantic: Align class scope with typescript (#4195 ) (Dunqing)
### Bug Fixes
- 9df60da linter: Correct find first non whitespace logic in
@typescript-eslint/consistent-type-imports (#4198 ) (mysteryven)
- 67240dc linter: Not ignore adjacent spans when fixing (#4217 )
(mysteryven)
- dd07a54 linter: Global variables should always check the builtin
variables (#4209 ) (Jelle van der Waa)
- 351ecf2 semantic: Incorrect resolve references for `TSTypeQuery`
(#4310 ) (Dunqing)
- 1108f2a semantic: Resolve references to the incorrect symbol (#4280 )
(Dunqing)
### Performance
- 0fdc88b linter: Optimize no-dupe-keys (#4292 ) (lucab)
### Refactor
- 2c7bb9f ast: Pass final `ScopeFlags` into `visit_function` (#4283 )
(overlookmotel)
- aa22073 codegen: Improve print API (#4196 ) (Boshen)
- b5a8f3c linter: Use get_first_parameter_name from unicorn utils
(#4255 ) (Jelle van der Waa)
- 7089a3d linter: Split up fixer code into separate files (#4222 )
(DonIsaac)
- ace4f1f semantic: Update the order of `visit_function` and `Visit`
fields in the builder to be consistent (#4248 ) (Dunqing)
- 7f1addd semantic: Correct scope in CatchClause (#4192 ) (Dunqing)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-17 21:18:28 +08:00
Jelle van der Waa
1f8968a521
feat(linter): Add eslint-plugin-promise rules: avoid-new, no-new-statics, params-names ( #4293 )
...
This introduces the `eslint-plugin-promise` plugin and implements three
relatively simple rules.
Split off from https://github.com/oxc-project/oxc/pull/4252
2024-07-17 09:21:20 +08:00
Boshen
83bd40db4e
chore: turn off doctest for all [[bin]]
2024-07-14 16:55:19 +08:00
github-actions[bot]
4f26e51b74
Release oxlint v0.6.0 ( #4194 )
...
## [0.6.0] - 2024-07-11
- 5731e39 ast: [**BREAKING**] Store span details inside comment struct
(#4132 ) (Luca Bruno)
### Features
- fb549e1 linter: Add vitest/no-focused-tests rule (#4178 ) (mysteryven)
- 6c49007 linter: Add fixer for
@typescript-eslint/consistent-type-imports (#3984 ) (mysteryven)
- 278c3e9 linter: Add fixer for jsx-a11y/aria-props (#4176 ) (DonIsaac)
- 2188144 linter: Eslint-plugin-jest/prefer-hooks-in-order (#4052 )
(cinchen)
- cc58614 linter: Better schemas for allow/warn/deny (#4150 ) (DonIsaac)
- c5b4be0 linter: Add fixer for prefer-node-protocol (#4129 ) (DonIsaac)
- 7ec0c0b linter/eslint: Implement no-label-var (#4087 ) (Jelle van der
Waa)
### Bug Fixes
- ed4c54c eslint/radix: Detect yield Number.parseInt variant (#4110 )
(Jelle van der Waa)
- e9ad03b linter: Fixer for no-debugger creates incorrect code (#4184 )
(DonIsaac)
- bd69571 linter: Fix top level return panic in
eslint/array_callback_return (#4167 ) (Boshen)
- c8f5664 linter: Fix panic with unicode in
unicorn/prefer_dom_node_dataset (#4166 ) (Boshen)
- f2b3273 linter: Fix fixer panic in
typescript/consistent_indexed_object_style (#4165 ) (Boshen)
- 2334515 linter: Panic in `get_enclosing_function` (#4121 ) (DonIsaac)
- 1b91d40 linter: Incorrect fixer for `no-unused-labels` (#4123 ) (Don
Isaac)
- 1729249 linter: Incorrect fix in
`no-single-promise-in-promise-methods` rule; (#4094 ) (DonIsaac)
- cc7e893 linter/tree-shaking: Avoid recursive function stackoverflow
(#4191 ) (mysteryven)
- 28eeee0 parser: Fix asi error diagnostic pointing at invalid text
causing crash (#4163 ) (Boshen)
- 0f02608 semantic: Bind `TSImportEqualsDeclaration`s (#4100 ) (Don
Isaac)
### Performance
- ddfa343 diagnostic: Use `Cow<'static, str>` over `String` (#4175 )
(DonIsaac)
### Refactor
- 2687ebc react: Use find_binding helper for finding React binding
(#4108 ) (Jelle van der Waa)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-11 14:38:41 +08:00
github-actions[bot]
0c7f3eecc6
Release oxlint v0.5.3 ( #4082 )
...
## [0.5.3] - 2024-07-07
### Features
- 1681b11 linter: Eslint-plugin-jest/consistent-test-it (#4053 )
(cinchen)
- 6876490 linter: Add rule no-undefined (#4041 ) (jordan boyer)
- bf04dee linter: Implement unicorn/no-negation-in-equality-check
(#4034 ) (Nissim Chekroun)
- aa45604 linter/eslint: Implement no-multi-str (#4038 ) (Jelle van der
Waa)
### Bug Fixes
- 7b2dc3b linter: Fix panic in import/namespace (#4080 ) (Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-07 19:31:03 +08:00
github-actions[bot]
b66ad0b675
Release oxlint v0.6.0 ( #4029 )
...
## [0.6.0] - 2024-07-02
- c98d8aa ast: [**BREAKING**] Rename `visit_arrow_expression` to
`visit_arrow_function_expression`. (#3995 ) (rzvxa)
### Features
- dc6d45e ast,codegen: Add `TSParenthesizedType` and print type
parentheses correctly (#3979 ) (Boshen)
- b257d53 linter: Support report
`@typescript-eslint/consistent-type-imports` (#3895 ) (mysteryven)
- 2114475 linter: Implement @typescript-eslint/no-dynamic-delete (#3971 )
(kaykdm)
- 10a3c9a linter/eslint-plugin-react: Implement no-set-state (#3975 )
(Jelle van der Waa)
### Bug Fixes
- 432d6d9 linter: Find disabled directives using the message's `Span`.
(#4010 ) (rzvxa)
- dbbb6fc linter: Global variable check should always check builtin
variables (#3973 ) (Boshen)
### Performance
- 1eac3d2 semantic: Use `Atom<'a>` for `Reference`s (#3972 ) (Don Isaac)
### Refactor
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-02 22:07:52 +08:00
github-actions[bot]
21b964b214
Release oxlint v0.5.1 ( #3967 )
...
## [0.5.1] - 2024-06-29
### Features
- f64ad4b semantic: Make jsdoc building optional (turned off by default)
(#3955 ) (Boshen)
### Bug Fixes
- c26975a linter: Only show the filename for max-lines (#3966 ) (Boshen)
- 94329e4 linter: Handle useful but empty constructors in
no-useless-constructor (#3951 ) (DonIsaac)
- 6498a08 linter: No-useless-spread fixer with multiple spread elements
(#3950 ) (DonIsaac)
- 750cb43 oxlint: Gate custom allocators by feature flag (#3945 ) (Luca
Bruno)
### Refactor
- 1cca2a8 eslint: Convert with_labels to with_label where applicable
(#3946 ) (Jelle van der Waa)
- 2705df9 linter: Improve diagnostic labeling (#3960 ) (DonIsaac)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-29 17:01:56 +08:00
Luca Bruno
750cb43624
fix(oxlint): gate custom allocators by feature flag ( #3945 )
...
This tweaks the conditional compilation of custom allocators by wiring
the dedicated Cargo feature flag `allocator` to the source code. It
ensures that allocator gating is directly checking the relevant feature
instead of trying to infer it from the build profile.
2024-06-28 21:34:46 +08:00
github-actions[bot]
06e4ce4f5d
Release oxlint v0.5.0 ( #3940 )
...
## [0.5.0] - 2024-06-27
- 6796891 ast: [**BREAKING**] Rename all instances of `BigintLiteral` to
`BigIntLiteral`. (#3898 ) (rzvxa)
- ae09a97 ast: [**BREAKING**] Remove `Modifiers` from ts nodes (#3846 )
(Boshen)
- 1af5ed3 ast: [**BREAKING**] Replace `Modifiers` with `declare` and
`const` on `EnumDeclaration` (#3845 ) (Boshen)
- ee6ec4e ast: [**BREAKING**] Replace `Modifiers` with `declare` and
`abstract` on `Class` (#3841 ) (Boshen)
- 4456034 ast: [**BREAKING**] Add `IdentifierReference` to
`ExportSpecifier` (#3820 ) (Boshen)
- 0537d29 cfg: [**BREAKING**] Move control flow to its own crate.
(#3728 ) (rzvxa)
- 5c38a0f codegen: [**BREAKING**] New code gen API (#3740 ) (Boshen)
- 4bce59d semantic/cfg: [**BREAKING**] Re-export `petgraph` as
`control_flow::graph`. (#3722 ) (rzvxa)
### Features
- 3ae2628 linter: Change `no-import-assign` to correctness (#3928 )
(Boshen)
- a89d501 linter: Implement
@typescript-eslint/no-non-null-asserted-nulli… (#3850 ) (kaykdm)
- fc48cb4 linter: eslint-plugin-jest/prefer-jest-mocked (#3865 )
(cinchen)
- 63b98bd linter: Accept multiple fixes when fix code (#3842 )
(mysteryven)
- 328445b linter: Support `vitest/no-disabled-tests` (#3717 )
(mysteryven)
- 8c61f9c linter: Implement @typescript-eslint/no-non-null-assertion
(#3825 ) (kaykdm)
- 080ecbd linter: Add `no-fallthrough`. (#3673 ) (rzvxa)
- 9493fbe linter: Add `oxc/no-optional-chaining` rule (#3700 )
(mysteryven)
- 139adfe linter: Add `@typescript-eslint/no-import-type-side_effects`
(#3699 ) (mysteryven)
- 5f84500 linter/eslint-plugin-react: Implement prefer-es6-class (#3812 )
(Jelle van der Waa)
- fafe67c linter/import: Implement max-dependencies (#3814 ) (Jelle van
der Waa)
- d5f6aeb semantic: Check for illegal symbol modifiers (#3838 ) (Don
Isaac)
### Bug Fixes
- 4bd2c88 linter: Fix and promote `getter-return` to correctness.
(#3777 ) (rzvxa)
- 1190dee linter: False positives with setters in the `getter-return`
rule. (#3714 ) (rzvxa)
- de0690f linter: Do not run getter-return in typescript (#3693 )
(Boshen)
- cf71c23 linter: Edge case with infinite loops. (#3672 ) (rzvxa)
- 5902331 oxlint: Properly report error (#3889 ) (Luca Bruno)
- 99a40ce semantic: `export default foo` should have
`ExportLocalName::Default(NameSpan)` entry (#3823 ) (Boshen)
- abd6ac8 semantic/cfg: Discrete finalization path after `NewFunction`s.
(#3671 ) (rzvxa)
### Performance
- 4f7ff7e Do not pass `&Atom` to functions (#3818 ) (overlookmotel)
### Refactor
- 4d2b7f1 linter: `LintContext` can now only be constructed with a cfg
enabled semantic. (#3761 ) (rzvxa)
- 7302429 linter/prefer_number_properties: Remove the unused
`IdentifierName` check (#3822 ) (Boshen)
- d8ad321 semantic: Make control flow generation optional. (#3737 )
(rzvxa)
### Testing
- 887da40 linter: Enable `no-fallthrough` test with `disable-next-line`.
(#3766 ) (rzvxa)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-27 15:09:13 +08:00
Luca Bruno
5902331cac
fix(oxlint): properly report error ( #3889 )
...
This fixes an incorrect error formatting in the lint runner logic.
2024-06-25 01:16:56 +03:30
mysteryven
328445b4ca
feat(linter): support vitest/no-disabled-tests ( #3717 )
2024-06-24 15:16:32 +00:00
Boshen
051ceb6539
chore: improve some format by running cargo +nightly fmt
2024-06-19 00:48:30 +08:00
Boshen
1c7f19c868
chore(oxlint): remove unused code (format command) ( #3716 )
2024-06-17 12:16:21 +00:00
Boshen
982e6f08df
chore: make println and eprintln opt-in ( #3712 )
...
I noticed accidental `println` can be merged, which isn't really nice.
2024-06-17 10:40:34 +00:00
github-actions[bot]
6168969f94
Release oxlint v0.4.4 ( #3669 )
...
## [0.4.4] - 2024-06-14
### Features
- 8f5655d linter: Add eslint/no-useless-constructor (#3594 ) (Don Isaac)
- 29c78db linter: Implement
@typescript-eslint/explicit-function-return-type (#3455 ) (kaykdm)
- 21d3425 linter: Typescript-eslint no-useless-empty-export (#3605 )
(keita hino)
- 85c3b83 linter: Eslint-plugin-jest/max-nested-describes (#3585 )
(cinchen)
- f6d9ca6 linter: Add `eslint/sort-imports` rule (#3568 ) (Wang Wenzhe)
- 046ff3f linter/eslint: Add `no_unreachable` rule. (#3238 ) (rzvxa)
- e32ce00 linter/jsdoc: Implement require-param-name rule (#3636 ) (Yuji
Sugiura)
- 110661c linter/jsdoc: Implement require-param-description (#3621 )
(Yuji Sugiura)
- d6370f1 linter/jsdoc: Implement require-param-type rule (#3601 ) (Yuji
Sugiura)
- d9c5b33 semantic/cfg: Add `Condition` instruction. (#3567 ) (Ali
Rezvani)
- f2dfd66 semantic/cfg: Add iteration instructions. (#3566 ) (rzvxa)
### Bug Fixes
- f0b689d linter: Panic in jsdoc/require-param (#3590 ) (Don Isaac)
- e148a32 semantic/cfg: Correct unreachability propagation in
try-finally. (#3667 ) (Ali Rezvani)
### Refactor
- 84304b4 linter: Add a `ctx.module_record()` method (#3637 ) (Boshen)
- f98f777 linter: Add rule fixer (#3589 ) (Don Isaac)
- fa11644 linter: Pass `Rc` by value (#3587 ) (overlookmotel)
- f702fb9 semantic/cfg: Cleanup control flow and it's builder. (#3650 )
(rzvxa)
- 5793ff1 transformer: Replace `&’a Trivias` with `Rc<Trivias>` (#3580 )
(Dunqing)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-14 15:05:26 +08:00
github-actions[bot]
8cbf937e84
Release oxlint v0.4.3 ( #3581 )
...
## [0.4.3] - 2024-06-07
### Features
- 1fb9d23 linter: Add fixer for no-useless-fallback-in-spread rule
(#3544 ) (Don Isaac)
- 6506d08 linter: Add fixer for no-single-promise-in-promise-methods
(#3531 ) (Don Isaac)
- daf559f linter: Eslint-plugin-jest/no-large-snapshot (#3436 ) (cinchen)
- 4c17bc6 linter: Eslint/no-constructor-return (#3321 ) (谭光志)
- 4a075cc linter/jsdoc: Implement require-param rule (#3554 ) (Yuji
Sugiura)
- 747500a linter/jsdoc: Implement require-returns-type rule (#3458 )
(Yuji Sugiura)
- 6b39654 linter/tree-shaking: Support options (#3504 ) (Wang Wenzhe)
- 0cdb45a oxc_codegen: Preserve annotate comment (#3465 )
(IWANABETHATGUY)
### Bug Fixes
- b188778 linter/eslint: Fix `require-await` false positives in
`ForOfStatement`. (#3457 ) (rzvxa)
- 350cd91 parser: Should parser error when function declaration has no
name (#3461 ) (Dunqing)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-07 16:39:51 +08:00
Boshen
1dbc23417d
chore: regenerate changelogs with commit id and author
2024-06-07 01:22:28 +08:00
Boshen
769227b7b4
chore: regenerate changelogs
2024-06-06 15:51:53 +08:00
Boshen
0674604d7a
chore: regenerate changelog
2024-06-06 01:29:38 +08:00
Boshen
21505e885c
refactor(cli): move crates/oxc_cli to apps/oxlint ( #3413 )
...
We need to split the cli crate up to reduce dependencies,
the current cli crate is pulling in `oxc_prettier`, which is redundant
for the linter.
2024-05-26 05:00:30 +00:00