Commit graph

247 commits

Author SHA1 Message Date
Boshen
4a447bca4f
feat(linter): add a simple linter example
closes #216
2023-03-28 21:44:54 +08:00
RiESAEX
d87250d7ff
feat(linter): no func assign (#220) 2023-03-28 16:36:15 +08:00
Wenzhe Wang
48385f48b4
fix: skip early error check for ts definition (#219) 2023-03-28 11:45:32 +08:00
yangchenye
88cd82b698
feat(macros): property generate declarations for nested modules (#212) 2023-03-27 10:30:47 +08:00
Boshen
31ec78bd8b
chore(linter): update snapshots 2023-03-26 22:24:39 +08:00
Boshen
a0cccf09f6
feat(diagnostics): bold warnings 2023-03-26 22:23:06 +08:00
Boshen
cda0c69ba1
fix(linter): change severity to warning for no_debugger and no_empty_pattern 2023-03-26 22:03:46 +08:00
Boshen
8a9cf9bed1
fix(linter): fix some checks on isolated_declaration
* check return type on AssignmentPattern
* do not check on return type of Constructor and Getter
2023-03-26 22:02:04 +08:00
Boshen
9487b3958e
feat(diagnostic): change termwidth and with_cause_chain on GraphicalReportHandler 2023-03-26 21:35:42 +08:00
Boshen
b65e8397de
feat(diagnostics): change color displays
related #203
2023-03-26 21:20:54 +08:00
Boshen
366dc3037a
feat(diagnostics): port miette GraphicalReportHandler for further tuning 2023-03-26 20:20:53 +08:00
Boshen
90f043fe66
feat(linter): improve target span and message on isolated_declaration 2023-03-26 19:55:01 +08:00
yangchenye
929b0efebb
feat(linter): implement isolated_declaration (#209)
* feat(linter): implement isolated_declaration

* Implement check for class elements

* Set up Export SymbolFlag and store declaration AST in Symbol

* Fix tests and comments
2023-03-26 04:37:10 -07:00
Boshen
ef19895cc3
feat(cli): add -A all -D isolated-declarations (#211)
* feat(linter): add restriction category for lint rules

* feat(cli): add "--allow" and "--deny" commands

* feat(linter): use a single instance of linter

* feat(cli): derive rules from args

* feat(cli): print number of rules
2023-03-26 04:34:31 -07:00
Boshen
d095d45818
refactor(semantic): add source_text and trivias to semantic 2023-03-25 14:19:53 +08:00
yangchenye
5ae3f5e007
feat(linter): implement eslint(no-class-assign) (#204) 2023-03-24 11:23:39 +08:00
Boshen
5939f817f0
refactor(linter): use the Span::new constructor instead of Span {} 2023-03-23 20:30:02 +08:00
RiESAEX
55ba093a85
feat(linter): implement validTypeof rule (#202) 2023-03-23 18:32:02 +08:00
Xuan
71e575ab41
feat(linter): implement no-new-symbol rule (#201) 2023-03-23 18:29:57 +08:00
yangchenye
0d8d67b593
feat(linter): implement eslint(no-const-assign) (#199)
* feat(linter): implement eslint(no-const-assign)

* feat(semantics & linter): resolve symbols

* Use run_on_symbol

* Add resolved_reference to SymbolTable
2023-03-23 12:55:40 +08:00
Boshen
9dfd4cd936
chore(rust): remove unnecessary missing_const_for_fn 2023-03-22 12:35:52 +08:00
Boshen
ff9a2c3ab0
feat(linter): eslint disable comments (#196)
feat(linter): eslint disable comments

closes #100
closes #170
2023-03-22 11:27:42 +08:00
yangchenye
2bb40844d2
fix(linter): skip abstract methods for dupe member check (#198) 2023-03-22 10:08:03 +08:00
yangchenye
3487772644
feat(linter): implement eslint(no-dupe-class-members) (#195) 2023-03-21 12:43:23 +08:00
Boshen
f52770d08a
chore(oxc_wasm): remove unnecessary lines from .gitignore 2023-03-20 14:38:09 +08:00
Boshen
b6a7c5bba9
fix(cli): remove extra source_text clone before linting 2023-03-19 12:58:00 +08:00
yangchenye
4549fb3cdd
fix(parser): parse decorator with separate grammar (#192) 2023-03-19 11:35:59 +08:00
Boshen
d134c1d89a
refactor(oxc_cli): clean up code around spawning tasks 2023-03-19 11:32:46 +08:00
Boshen
ea7ae1011f
chore(cli): removed unused glob dependency 2023-03-19 10:35:55 +08:00
Boshen
c20f60c289
feat(cli): add ignore_pattern to walker 2023-03-18 18:24:04 +08:00
Boshen
89542be81e
feat(cli): use a single walker for all paths 2023-03-18 17:58:42 +08:00
Boshen
5135118bc8
refactor(cli): move lint command and options into modules 2023-03-18 17:53:06 +08:00
Boshen
0ec5f0b111
refactor(cli): cleanup command 2023-03-18 15:48:45 +08:00
Boshen
37c7b7a752
refactor(oxc_parser): simply diagnostic messages 2023-03-18 14:39:44 +08:00
Boshen
14babe92a0
refactor(oxc_parser): remove unused diagnostics 2023-03-18 14:05:29 +08:00
Boshen
237e063d37
fix(rust): fix clippy warnings 2023-03-17 15:47:03 +08:00
Boshen
6a89f085b7
refactor(rust): add more clippy restriction rules 2023-03-17 14:51:25 +08:00
Boshen
a1315e3999
refactor(rust): add clippy::clone_on_ref_ptr 2023-03-17 14:51:25 +08:00
Boshen
57f3065d68
refactor: remove unused #[allow(clippy:..)] 2023-03-17 13:28:06 +08:00
Boshen
678cfae967
feat(cli, linter): propage --fix option and apply fixes
closes #68
2023-03-17 13:01:04 +08:00
Boshen
bee548b945
fix(coverage): correct the number on AST Parsed 2023-03-17 11:15:33 +08:00
Boshen
9ed682a38e
fix(semantic): fix function redeclaration errors
The problem here we face here is that TypeScript does not consider Annex
B.3.2, which makes implementation a bit more difficult.

This implementation conforms to test262.
2023-03-17 10:06:02 +08:00
Boshen
5b2474600f
fix(cli): should return semantic errors 2023-03-17 09:43:53 +08:00
yangchenye
37ad6f3a15
feat(parser): support decorators in class expression (#190)
feat(parser): support decorator in class expression
2023-03-17 09:33:04 +08:00
Boshen
164c2831e1 feat(linter): report export errors in javascript 2023-03-15 18:12:34 -07:00
Boshen
8d3a5c46ba feat(ast,semantic): add ModuleRecord 2023-03-15 18:12:34 -07:00
Boshen
26efbbe59c
chore(deps): bump insta 2023-03-15 21:31:08 +08:00
Xuan
ed0c4b1ea3
feat(linter): add no-dupe-keys rule (#188)
* feat(linter): add no-dupe-keys rule

* refactor(linter): use map.insert

* fix(linter): fix the comment
2023-03-15 16:23:42 +08:00
Boshen
d1c04523b6
feat(oxc_ast): add VisitMut trait
closes #184
2023-03-15 13:35:54 +08:00
yangchenye
aaaefc8ba5
feat(linter): implement eslint(no-unsafe-negation) (#186) 2023-03-15 11:36:56 +08:00