diff --git a/docs/src/_data/further_reading_links.json b/docs/src/_data/further_reading_links.json index 045bd4faf62..a33ce6c0b3b 100644 --- a/docs/src/_data/further_reading_links.json +++ b/docs/src/_data/further_reading_links.json @@ -740,5 +740,12 @@ "logo": "https://v8.dev/favicon.ico", "title": "RegExp v flag with set notation and properties of strings · V8", "description": "The new RegExp `v` flag enables `unicodeSets` mode, unlocking support for extended character classes, including Unicode properties of strings, set notation, and improved case-insensitive matching." + }, + "https://codepoints.net/U+1680": { + "domain": "codepoints.net", + "url": "https://codepoints.net/U+1680", + "logo": "https://codepoints.net/favicon.ico", + "title": "U+1680 OGHAM SPACE MARK:   – Unicode – Codepoints", + "description": " , codepoint U+1680 OGHAM SPACE MARK in Unicode, is located in the block “Ogham”. It belongs to the Ogham script and is a Space Separator." } } \ No newline at end of file diff --git a/docs/src/rules/no-irregular-whitespace.md b/docs/src/rules/no-irregular-whitespace.md index c0683645628..4118defe631 100644 --- a/docs/src/rules/no-irregular-whitespace.md +++ b/docs/src/rules/no-irregular-whitespace.md @@ -4,6 +4,7 @@ rule_type: problem further_reading: - https://es5.github.io/#x7.2 - https://web.archive.org/web/20200414142829/http://timelessrepo.com/json-isnt-a-javascript-subset +- https://codepoints.net/U+1680 --- @@ -16,11 +17,17 @@ A simple fix for this problem could be to rewrite the offending line from scratc Known issues these spaces cause: +* Ogham Space Mark + * Is a valid token separator, but is rendered as a visible glyph in most typefaces, which may be misleading in source code. +* Mongolian Vowel Separator + * Is no longer considered a space separator since Unicode 6.3. It will result in a syntax error in current parsers when used in place of a regular token separator. +* Line Separator and Paragraph Separator + * These have always been valid whitespace characters and line terminators, but were considered illegal in string literals prior to ECMAScript 2019. * Zero Width Space - * Is NOT considered a separator for tokens and is often parsed as an `Unexpected token ILLEGAL` - * Is NOT shown in modern browsers making code repository software expected to resolve the visualization -* Line Separator - * Is NOT a valid character within JSON which would cause parse errors + * Is NOT considered a separator for tokens and is often parsed as an `Unexpected token ILLEGAL`. + * Is NOT shown in modern browsers making code repository software expected to resolve the visualization. + +In JSON, none of the characters listed as irregular whitespace by this rule may appear outside of a string. ## Rule Details @@ -86,7 +93,7 @@ var thing = function /**/(){ return 'test'; } -var thing = function᠎/**/(){ +var thing = function /**/(){ return 'test'; } @@ -204,7 +211,7 @@ Examples of additional **correct** code for this rule with the `{ "skipJSXText": /*eslint-env es6*/ function Thing() { - return
text in JSX
; + return
text in JSX
; // before `JSX` } ```