From 96f4bc2489e0859472dfd60c3943533a5ca551b2 Mon Sep 17 00:00:00 2001 From: bluwy Date: Thu, 28 Sep 2023 22:24:28 +0800 Subject: [PATCH] Add docs for invalid jsx --- site/rules.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/rules.md b/site/rules.md index b48feac..69d24ee 100644 --- a/site/rules.md +++ b/site/rules.md @@ -25,6 +25,10 @@ If the file has an invalid format through explicit entrypoints, e.g. the `"main" Invalid format checks are the same as [above](#implicit_index_js_invalid_format), except scoped down for explicit extensions for better error messages. +## `FILE_INVALID_JSX_EXTENSION` + +JSX extensions such as `.cjsx`, `.mjsx`, `.ctsx`, and `.mtsx` are invalid and are usually mistaken as ESM and CJS variants of JSX. Many tooling don't support these extensions by default. Instead they should be written in plain ESM using the `.jsx` extension. + ## `FILE_DOES_NOT_EXIST` The specified file does not exist.