ePublishing ESLint Configuration
Copyright (C) 2017, ePublishing, Inc.
1. Peer Dependencies
First, install this package's peer dependencies and save them to your project's package.json file in
$ cd my_epublishing_project$ npm install --save-dev eslint eslint-plugin-import eslint-plugin-react
You can simplify this step by using an external utility instead of the command in the above example:
# This first command only needs to be run a single time. It will install# a CLI utility called "install-peerdeps" as a global Node module:$ npm install --global install-peerdeps# Once you've installed the utility, run it from the root of your project:$ install-peerdeps --dev @epublishing/eslint-config-epublishing
2. Install this Package
$ npm install --save-dev @epublishing/eslint-config-epublishing
3. Configure ESLint
Create a file named
.eslintrc in the root of your project and give it the following contents for starters:
You can then add additional configuration to your
.eslintrc to override any of the defaults defined by this package. See the ESLint docs for more information.
ESLint will automatically use the project's
.eslintrc file, so all you have to do in order to lint your scripts in terminal is:
# Install the eslint CLI utility if necessary:$ npm install -g eslint# Lint all .js files in found in app/js against configured rules:$ eslint app/js/**/*.js
Plugins that provide inline error reporting are available for most editors and IDEs:
This repository includes
bumped as a development dependency and defines a few hooks to simplify the process of publishing a new release to Bitbucket and the NPM registry.
npm run release $TYPE
$TYPE can be any of the release arguments accepted by the
bumped release command.
Fix a bug and publish a new patch release:
$ npm run release patch> @firstname.lastname@example.org release /home/mike/development/work/eslint-config-epublishing> bumped release "patch"bumped Releases version 0.1.2.post bumped Starting Publishing tag to Bitbucketpost bumped Everything up-to-datepost bumped To bitbucket.org:epub_dev/eslint-config-epublishing.git* [new tag] v0.1.2 -> v0.1.2post bumped Finished Publishing tag to GitHub after 1.9s.post bumped Starting Publishing to NPMpost bumped + @email@example.com bumped Finished Publishing to NPM after 3.9s.