Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
So you set up ESLint, either globally or in specific projects, but you canât get the warnings to show up directly in Atom? Youâve come to the right place.
Install linter-eslint + peer dependencies
$ apm i linter-eslint linter linter-ui-default intentions busy-signal
Customize ESLint Settings
Open Atomâs Preferences to see your Packages. Under Community Packages, open linter-eslintâs settings and make the below changes.
Donât Point to Global (do the opposite if you want global)
- Check âDisable when no ESLint config is foundâ (Disabling)
- Uncheck âUse global ESLint installationâ (Global ESLint)
Silence Some Rules While Typing (optional)
- Check âIgnore fixable rules while typingâ (Automatic Fixes)
Fix on save (optional)
- Check âFix errors on saveâ (Automatic Fixes)
NOTE: you must disable/uninstall any other linter packages
Try saving a file that has some linter issues, and you should see some warnings. Reload atom if you ever have issues.
đ„ TIP 1: Turn off your linter when itâs too noisy! Open the âCommand Paletteâ (can be found in âViewâ OR use cmd + shift + P) and type âenableâ or âdisableâ and press Enter twice.
âšïž TIP 2: I like to keep âFix errors on saveâ off, so I added a keyboard shortcut (â+â+s) that auto-fixes them. To do so, add the following to Atomâs keymap.cson (click on âAtomâ in the menubar and select âKeymapâ):
'atom-text-editor:not([mini])': 'cmd-ctrl-s': 'linter-eslint:fix-file'
Set up ESLint in Atom was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.