eslint-config-amaze0.1.1 • Public • Published
As stated earlier, linting allows developers to produce and commit clean, valid, and consistent code. By sharing our ruleset we can ensure our developers are coding to Deque’s best practices and formatting standards. Our standard rulesets (there are two of them) can be found on our private Bitbucket:
Each is suited for its respective environments. What works in React may not work in Node, as an example.
If your project is under source control (such as Git) it may already include a copy of this ruleset. If not, require this file in your app with:
npm install --save-dev eslint-config-amaze
Get a linter
Once you have the ruleset locally or installed as a dependency, you’ll need the ESLinter. Depending on which editor you use determines how you install it.
If you use Sublime do the following:
- Open your Command Palette and type
- When the plugin list appears, type
Alternatively, if you use Atom, do the following:
- Open your Settings/Preferences and navigate to Packages
- Search for
eslintand select the
Both of these plugins will check first in the project directory, but if no ESLint configuration file is found it will traverse into more global locations, starting with its install directory (if a dependency). This means that you could optionally save our standardized ESLint configuration ruleset somewhere globally and then point your plugins to its location. This would work for all of your projects without having to have it installed locally. However, any local rulesets will override any global rulesets, unless your editor allows either/or.
If you’re using Node (i.e., have a package.json) file you may need to install a few additional packages:
These should be included with this package.
Once you get the dependencies installed, if you're using this package by itself, you'll need to add the following file to the root of your repository:
The filename needs to be