Emoji Eraser highlights emojis as diagnostics and provides a command to remove all emojis from the current file.
When I'm programming, I often use emojis as placeholders while I'm sketching things out, then later swap them out for SVGs (or other proper assets). Having them highlighted makes them easy to find and replace when it's time to "clean it up."
Also: I'm not a fan of how often AI tooling sprinkles emojis into text and documentation these days. This extension helps me catch and remove them before they slip into commits.
Emoji Eraser exists to:
- Make emojis visible (as diagnostics) instead of quietly hiding in plain sight.
- Remove them fast (bulk command + per-emoji quick fix).
- Stay configurable so you can ignore the places where emojis are welcome (comments, strings, Markdown).
- 🔍 Shows a diagnostic on each detected emoji.
- ⚙️ Configurable diagnostic severity (Error, Warning, Information, Hint).
- 💡 Quick Fix: Click the lightbulb to remove individual emojis.
- 📝 Separate options to ignore emojis in comments, strings, and Markdown files.
- 🎯 File exclusion patterns to skip specific files or folders.
- 🗑️ Command Palette: Emoji Eraser: Remove all emojis (current file).
- 🖱️ Explorer right-click menu: Emoji Eraser submenu with actions to:
- Remove emojis from selected file(s)
- Exclude this file / exclude this folder
- Exclude all files with the same extension (e.g.
*.rs)
-
emojiChecker.ignoreInComments(boolean, default:true)- Ignores emojis in code comments (best-effort parsing for common languages).
-
emojiChecker.ignoreInStrings(boolean, default:false)- Ignores emojis in string literals (
'...',"...",`...`). - Includes Python triple-quoted strings.
- Ignores emojis in string literals (
-
emojiChecker.ignoreMarkdown(boolean, default:true)- Ignores all emojis in Markdown and MDX files.
-
emojiChecker.excludePatterns(array, default:[])- Glob-like patterns for files/folders to exclude from emoji checking.
- These are matched against the workspace-relative path.
- Simple examples (the "easy to type" ones):
"*.md"→ exclude all Markdown files (anywhere in the workspace)"README.md"→ exclude any file namedREADME.md"node_modules"→ exclude anynode_modulesfolder and everything inside it
- Path examples:
"dist/**"→ excludedist/at the workspace root"**/dist/**"→ exclude anydist/folder anywhere"test/**"or"**/test/**"→ exclude tests
-
emojiChecker.severity(string, default:"Error")- Options:
"Error","Warning","Information","Hint" - Controls the diagnostic severity level shown in the editor.
- Options:
- Open the project in VS Code.
- Press F5 to launch an Extension Development Host.
- Open a file containing emojis (e.g.,
test/sample.txt). - See diagnostics on detected emojis.
- Quick Fix: Click the 💡 lightbulb icon on an emoji diagnostic and select "Remove this emoji".
- Bulk Remove (current file): Run Emoji Eraser: Remove all emojis (current file) from the Command Palette.
- Bulk Remove (many files): Select files in the Explorer, right-click, then choose Emoji Eraser → Remove emojis from selected file(s).
Only emojis in plain code/text are highlighted:
const x = "Hello 😀"; // ← emoji ignored (in string)
// Nice work! 🔥 // ← emoji ignored (in comment)
const y = 🎉; // ← emoji DETECTED (plain code)Set "emojiChecker.ignoreInComments": true and "emojiChecker.ignoreInStrings": false:
const x = "Hello 😀"; // ← emoji DETECTED (in string)
// Nice work! 🔥 // ← emoji ignored (in comment)Set both to false:
const x = "Hello 😀"; // ← emoji DETECTED
// Nice work! 🔥 // ← emoji DETECTED
