Sort error keys with ESLint (#13020)

This commit is contained in:
Sosuke Suzuki
2021-03-19 05:01:57 +09:00
committed by GitHub
parent 21e8e59f7d
commit beb7cf8b24
2 changed files with 7 additions and 3 deletions

View File

@@ -19,11 +19,12 @@ import { Errors } from "../../parser/error";
const HEX_NUMBER = /^[\da-fA-F]+$/;
const DECIMAL_NUMBER = /^\d+$/;
/* eslint sort-keys: "error" */
const JsxErrors = Object.freeze({
AttributeIsEmpty:
"JSX attributes must only be assigned a non-empty expression",
MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>",
MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>",
MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>",
UnexpectedSequenceExpression:
"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
UnsupportedJsxValue:
@@ -32,6 +33,7 @@ const JsxErrors = Object.freeze({
UnwrappedAdjacentJSXElements:
"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?",
});
/* eslint-disable sort-keys */
// Be aware that this file is always executed and not only when the plugin is enabled.
// Therefore this contexts and tokens do always exist.