Atom is a popular free code editor created by GitHub developers for programmers. It is actively being developed, there are hundreds of plugins for it, and it is easy to customize it to your needs.
Atom is built on Electron technology, so it works on Windows, Linux and macOS. Among the basic features of the editor, available immediately after installation:
- Syntax highlighting for many popular languages and file formats
- easy navigation
- built-in Markdown preview
- smart auto-completion
- built-in batch manager
The package manager is needed to install and remove extension packages (plugins). For convenient JavaScript development for the backend and frontend, you need to install several packages.
To install a new package, go to the “Install” tab in the settings, enter the name of the package in the search box, and click “Install”.
Encoding Standards
Eslint is a utility that checks coding standards in JavaScript. The de facto standard in the JS world.
You need to first install eslint on the system, and then install the Atom extension that will use the installed linter. There are different ways to integrate linter with the extension. We will look at installing linter globally on the system.
You need to first install eslint on the system, and then install the Atom extension that will use the installed linter. There are different ways to integrate linter with the extension. We will look at installing linter globally on the system.
Install Node.js using the package manager of your operating system.
Install eslint with the npm install -g eslint command. You will probably need to use sudo.
Install the plugins that configure eslint. Without them (by default) eslint doesn’t check anything.
npm install -g eslint-config-airbnb-base eslint-plugin-import
eslint requires a configuration file. Create a .eslintrc.yml file in the root of your project with the following content:
extends:
- 'airbnb-base'
env:
node: true
browser: true
Install the “linter-eslint” extension in Atom.
Check the Use Global Eslint checkbox in the extension settings (Settings -> Packages -> Linter Eslint).
Automatic addition
The built-in autofill in the editor works according to the most primitive scheme, analyzing the contents of the files. With the third-party utility “tern” you can achieve more advanced behavior. “tern” can:
- suggest function arguments
- define type of expression
- find a definition of something
- perform automatic refactoring
The atom-ternjs extension does not require installation of anything else and works by itself.
Automatic addition of files and modules
The useful extension autocomplete-modules automatically appends file and module names during import.
Switch to definitions
The js-hyperclick allows you to quickly navigate to a function or variable definition on click.