Last active
November 23, 2021 02:35
-
-
Save MariusRumpf/aeb2cfd5ba595e6a6f1ac089bfb3d592 to your computer and use it in GitHub Desktop.
Detect irregular whitespace in visual studio code with whitespace+ extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Whitespace+ irregular whitespace detection | |
// https://marketplace.visualstudio.com/items?itemName=davidhouchin.whitespace-plus | |
// Inspired by eslint https://github.com/eslint/eslint/blob/master/lib/rules/no-irregular-whitespace.js | |
{ | |
"mode": "all", | |
"autoStart": true, | |
"refreshRate": 100, | |
"elements": | |
[{ | |
"name": "space", | |
"enabled": true, | |
"pattern": "(\u0085|\ufeff|\u00a0|\u1680|\u180e|\u2000|\u2001|\u2002|\u2003|\u2004|\u2005|\u2006|\u2007|\u2008|\u2009|\u200a|\u200b|\u202f|\u205f|\u3000|\u2028|\u2029)", | |
"style": { | |
"borderWidth": "1px", | |
"borderRadius": "2px", | |
"borderStyle": "solid", | |
"light": { | |
"backgroundColor": "rgba(212, 0, 0, 0.3)", | |
"borderColor": "rgba(212, 0, 0, 0.4)" | |
}, | |
"dark": { | |
"backgroundColor": "rgba(212, 0, 0, 0.3)", | |
"borderColor": "rgba(212, 0, 0, 0.4)" | |
} | |
} | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you 🙌 and internet!