@epublishing/eslint-config-epublishing
ePublishing JavaScript Coding Standards for ESLint
Last updated 2 years ago by mikedamage .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @epublishing/eslint-config-epublishing 
SYNC missed versions from official npm registry.

ePublishing ESLint Configuration

Copyright (C) 2017, ePublishing, Inc.

Installation Steps

1. Peer Dependencies

First, install this package's peer dependencies and save them to your project's package.json file in devDependencies:

$ cd my_epublishing_project
$ npm install --save-dev eslint eslint-plugin-import eslint-plugin-react

Optional Alternative

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:

{
  "extends": [ "@epublishing/epublishing" ]
}

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.

Usage

Command Line

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

Editor Integration

Plugins that provide inline error reporting are available for most editors and IDEs:

Release Workflow

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

Where $TYPE can be any of the release arguments accepted by the bumped release command.

Examples

Fix a bug and publish a new patch release:

$ npm run release patch

  > @epublishing/eslint-config-epublishing@0.1.1 release /home/mike/development/work/eslint-config-epublishing
  > bumped release "patch"


  bumped Releases version 0.1.2.

  post bumped Starting Publishing tag to Bitbucket
  post bumped Everything up-to-date
  post bumped To bitbucket.org:epub_dev/eslint-config-epublishing.git
   * [new tag]         v0.1.2 -> v0.1.2
  post bumped Finished Publishing tag to GitHub after 1.9s.

  post bumped Starting Publishing to NPM
  post bumped + @epublishing/eslint-config-epublishing@0.1.2
  post bumped Finished Publishing to NPM after 3.9s.

Current Tags

  • 0.2.0                                ...           latest (2 years ago)

9 Versions

  • 0.2.0                                ...           2 years ago
  • 0.1.7                                ...           3 years ago
  • 0.1.6                                ...           3 years ago
  • 0.1.5                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 2
Last Month 13
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |