branch: elpa/flycheck
commit 5f661852d5a5f35a3749ff6e17b75b49826a5081
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Add oxlint checker for JavaScript and TypeScript
    
    Add javascript-oxlint checker using oxlint's checkstyle output
    format.  Oxlint is a fast JavaScript/TypeScript linter from the
    Oxc project that can be used as an alternative to ESLint.
    
    Closes #2047
---
 flycheck.el | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/flycheck.el b/flycheck.el
index 36884e33a5..2479af79d7 100644
--- a/flycheck.el
+++ b/flycheck.el
@@ -167,6 +167,7 @@
     haskell-hlint
     html-tidy
     javascript-eslint
+    javascript-oxlint
     javascript-jshint
     javascript-standard
     json-jsonlint
@@ -10076,6 +10077,21 @@ See URL `https://eslint.org/'."
             (with-no-warnings (seq-contains error-code ?/)))
            `(url . ,(format url error-code))))))
 
+(flycheck-define-checker javascript-oxlint
+  "A JavaScript and TypeScript linter using oxlint.
+
+See URL `https://oxc.rs/'."
+  :command ("oxlint"
+            "--format" "checkstyle"
+            source-inplace)
+  :error-parser flycheck-parse-checkstyle
+  :error-filter
+  (lambda (errors)
+    (flycheck-sanitize-errors
+     (flycheck-dequalify-error-ids errors)))
+  :modes (js-mode js-jsx-mode js2-mode js2-jsx-mode js3-mode rjsx-mode
+                  typescript-mode js-ts-mode typescript-ts-mode tsx-ts-mode))
+
 (flycheck-define-checker javascript-standard
   "A Javascript code and style checker for the (Semi-)Standard Style.
 

Reply via email to