Note: this guide assumes you are using Babel, and requires that you use babel-preset-airbnb or the equivalent. It also assumes you are installing shims/polyfills in your app, with airbnb-browser-shims or the equivalent.
v1.2.1, this repository can be installed from the NPM registry. You'll also need a compatible version of ESLint, and eslint-plugin-import, which are peer dependencies. The preferred way to install requires npx, which comes with NPM 5+:
npx install-peerdeps --dev eslint-config-norton
Alternatively, you can use generator-norton-style (a Yeoman generator) to automatically add all required files and dependencies. Follow instructions on generator-norton-style's README to install Yeoman and generator-norton-style globally and then just follow the generator's prompts:
eslint-config-norton package is installed, you can use it by specifying
eslint-config-norton in the
extends section of your ESLint configuration. Note that generator-norton-style automatically sets up this file. You can then override anything you like from there.
.eslintrc.js with 2 spaces instead of tabs.
moduleexports =extends: 'norton' // or 'eslint-config-norton'rules:indent: 'error' 2'no-tabs': 'error';
.eslintrc.json in a browser environment with jQuery