Step 1: Installation
npm install -g git+ssh://email@example.com:kevin.ho/eslint-config-beacon.git eslint eslint-plugin-react babel-eslint
In your global
Note that the
eslint-config- portion of the module name is assumed by ESLint.
A specific project can extend this definition by including
eslint eslint-config-beacon eslint-plugin-react babel-eslint as saved dev-dependencies, and defining a local
.eslintrc.json. Project-level eslintrc files are recommended to be set as
root, which prevents users' global configs from producing inconsistent results:
Note on Parsing
This config now uses
babel-eslint as the parser by default. This enables linting some relatively modern code which ESLint's default parser does not handle, and was necessary for this project to lint itself. You still need to install
babel-eslint manually as it is a peer dependency of this config.
Step 2: Editor Integration
Using ESLint from the command line is not ideal. We want to integrate linting as an automatic step in our workflow, and even better -- as a background step in our code editor of choice. In this way, your editor will produce colored warnings and error marks in real-time as you write code. Beyond saving you from making mistakes, it also actively and effectively helps you to avoid definite errors and maintain a consistent company-wide code style.
Directions for ESLint's various editor integrations can be found here. ESLint is platform agnostic, so it works with WebStorm, VSCode, SublimeText, Atom, even Emacs and PyCharm!
Any rules added to your global or local
.eslintrc.json files will override the rules defined by this package. For example:
This turns on enforcing the use of semicolons, a rule which is ALREADY turned on by default in the current version of the
This package was bootstrapped via Fullstack Academy of Code / Grace Hopper Academy's
It is easy to override and extend this base config with custom rules, as explained above and in the ESLint docs.