2.0.0 • Published 5 years ago

@ish/eslint-config v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@ish/eslint-config

ISH Web's ESLint shareable config, based on Airbnb's base config

npm

Installation

Using bash:

(export PKG=@ish/eslint-config; npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest")

Using cmd:

npm install --save-dev @ish/eslint-config eslint eslint-plugin-import

Available configurations

  • @ish/eslint-config: default settings
  • @ish/eslint-config/dashboard: adds settings relevant to all Dashboard components

Usage

Default

Use in our custom packages

Add the following to package.json:

"eslintConfig": {
  "extends": "@ish/eslint-config"
}

Or create an .eslintrc.js file containing:

'use strict';

module.exports = {
  extends: '@ish/eslint-config',
};

Dashboard

Use in all Dashboard components

Add the following to package.json:

"eslintConfig": {
  "extends": "@ish/eslint-config/dashboard"
}

Or create an .eslintrc.js file containing:

'use strict';

module.exports = {
  extends: '@ish/eslint-config/dashboard',
};

How to publish

You must have an npm account with access to the @ish organization and must be logged in using npm adduser.

  • Checkout master branch and run git pull --ff-only

  • Reinstall dependencies: rm -rf node_modules && npm install

  • Run tests: npm test

  • Update CHANGELOG.md and commit.

  • Bump package version using npm version with one of these semver arguments:

    • patch (does not break lint): Changes to project metadata, documentation or structure
    • minor (does not break lint): Loosen existing rules, add a new configuration or small dependencies update
    • major (might break lint): New rules, stricter rules or big dependencies update
  • Check if everything is OK and run git push --follow-tags

  • Publish using npm publish --access public