(Alpha) JavaScript and TypeScript Rules
This release adds many new JavaScript and TypeScript rules using Sourcery’s (alpha-stage) multi-language functionality.
If you are interested in getting access to the Beta for Sourcery for JavaScript and Typescript, please sign up here.
Full Changelog
Added
- Docs: How To Use Sourcery For Code Reviews?
- Handle skip comments in JavaScript
no-evalJavaScript ruleremove-redundant-booleanJavaScript ruleuse-bracesJavaScript ruledont-negate-is-instanceof-operandsJavaScript ruleremove-unreachable-codeJavaScript rulemisplaced-break-or-continueJavaScript ruledont-shadow-argumentsJavaScript ruleremove-redundant-if-statementJavaScript ruledont-reassign-parametersJavaScript ruleinline-immediately-returned-variableJavaScript ruleavoid-function-declarations-in-blocksJavaScript rule- Some refactorings like
simplify-boolean-comparisonwill now trigger in match-case guard clauses possible-incorrect-bitwise-operatorJavaScript ruledont-self-assign-variablesJavaScript rulegenerators-should-yieldJavaScript rulethrow-new-errorsJavaScript ruleremove-redundant-slice-indexJavaScript ruleonly-delete-object-propertiesJavaScript ruledont-use-withJavaScript ruledont-concatenate-string-literalsJavaScript ruleno-new-symbolJavaScript rulereturn-outside-functionJavaScript ruleyield-outside-generatorJavaScript ruleavoid-infinite-loopsJavaScript rule
Changed
- Only show a maximum of 3 lines of code for comments in the CLI for Javascript rules
- Extended
use-array-literalto handle arguments use-object-destructuringandcombine-object-destructureextended to also work forletstatements- Added hover for JavaScript diagnostics
Fixed
- issue with replacement of subsequent indented new lines in JavaScript
- issue where JavaScript comments showed code actions that did nothing
- issue with partially-applied
use-bracesrefactoring remove-dict-keysno longer proposed when the target has multiple values- Correctly report number of scanned files even if they have no issues
merge_assign_and_aug_assigncan no longer incorrectly lead to access to a variable not assigned yet- Prevent
dict-literal,list-literalandremove-unnecessary-castfrom incorrectly triggering in match-case patterns