[−][src]Struct rslint_core::groups::errors::NoIrregularWhitespace
Disallow weird/irregular whitespace.
ECMAScript allows a wide selection of unicode whitespace, they are however known to cause issues with various parsers, therefore they should never be used.
A lot of the whitespace is invisible, therefore is hard to detect, it may have been inserted by accident.
Whitespace such as line separator causes issues since line separators are not valid JSON which may cause many issues.
This rule disallows the following whitespace:
\u000B - Line Tabulation (\v) - <VT>
\u000C - Form Feed (\f) - <FF>
\u00A0 - No-Break Space - <NBSP>
\u0085 - Next Line
\u1680 - Ogham Space Mark
\u180E - Mongolian Vowel Separator - <MVS>
\ufeff - Zero Width No-Break Space - <BOM>
\u2000 - En Quad
\u2001 - Em Quad
\u2002 - En Space - <ENSP>
\u2003 - Em Space - <EMSP>
\u2004 - Tree-Per-Em
\u2005 - Four-Per-Em
\u2006 - Six-Per-Em
\u2007 - Figure Space
\u2008 - Punctuation Space - <PUNCSP>
\u2009 - Thin Space
\u200A - Hair Space
\u200B - Zero Width Space - <ZWSP>
\u2028 - Line Separator
\u2029 - Paragraph Separator
\u202F - Narrow No-Break Space
\u205f - Medium Mathematical Space
\u3000 - Ideographic Space
Fields
skip_strings: bool
Whether to allow any whitespace in string literals (true by default)
skip_comments: bool
Whether to allow any whitespace in comments (false by default)
skip_regex: bool
Whether to allow any whitespace in regular expressions (false by default)
skip_templates: bool
Whether to allow any whitespace in template literals (false by default)
Implementations
impl NoIrregularWhitespace
[src]
Trait Implementations
impl Clone for NoIrregularWhitespace
[src]
fn clone(&self) -> NoIrregularWhitespace
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl CstRule for NoIrregularWhitespace
[src]
fn check_root(&self, root: &SyntaxNode, ctx: &mut RuleCtx) -> Option<()>
[src]
fn check_node(&self, node: &SyntaxNode, ctx: &mut RuleCtx) -> Option<()>
[src]
fn check_token(&self, token: &SyntaxToken, ctx: &mut RuleCtx) -> Option<()>
[src]
impl Debug for NoIrregularWhitespace
[src]
impl Default for NoIrregularWhitespace
[src]
impl<'de> Deserialize<'de> for NoIrregularWhitespace where
NoIrregularWhitespace: Default,
[src]
NoIrregularWhitespace: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Rule for NoIrregularWhitespace
[src]
impl Serialize for NoIrregularWhitespace
[src]
Auto Trait Implementations
impl RefUnwindSafe for NoIrregularWhitespace
impl Send for NoIrregularWhitespace
impl Sync for NoIrregularWhitespace
impl Unpin for NoIrregularWhitespace
impl UnwindSafe for NoIrregularWhitespace
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
impl<T> Erasable for T
unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>
const ACK_1_1_0: bool
fn erase(this: NonNull<Self>) -> NonNull<Erased>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,