@urbandoor/eslint-plugin-urbandoor

3.0.0 • Public • Published

@urbandoor/eslint-plugin-urbandoor

license standard-readme compliant npm (scoped) npm

Dependabot badge semantic-release

CircleCI

UrbanDoor's eslint configuration(s)

Table of Contents

Install

npm install @urbandoor/eslint-plugin-urbandoor

ESLint doesn't support plugins in plugins, so you'll need to run the following script (borrowed from airbnb) to install the requisite peerDependencies.

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

Usage

At UrbanDoor, we use JavaScript in a few different ways, so this plugin exports several different configurations:

  • node: node scripts

    extends:
      - 'plugin:@urbandoor/urbandoor/node'
  • modern: in browsers via transpilation (be it webpack, webpacker, babel, or typescript)

    extends:
      - 'plugin:@urbandoor/urbandoor/modern'
  • legacy: in browsers via the rails asset pipeline

    extends:
      - 'plugin:@urbandoor/urbandoor/legacy'
  • common: use as a base when none of the others will do

    extends:
      - 'plugin:@urbandoor/urbandoor/common'

This project includes eslint-plugin-prettier and eslint-config-prettier but does not provide a prettier config. We ran into a number of inconsistencies when trying to configure eslint/prettier but still needing to include .prettierrc in the consuming repo. If your repo includes a .prettierrc, everything should "just work".

Maintainer

Ian Remmel

Contribute

PRs generally welcome, but ruleset changes will require a detailed justification. Please open issues before proposing changes of more than a line or two.

License

MIT © Urbandoor Inc. 2018 until at least now

Readme

Keywords

none

Package Sidebar

Install

npm i @urbandoor/eslint-plugin-urbandoor

Weekly Downloads

8

Version

3.0.0

License

MIT

Unpacked Size

18.7 kB

Total Files

29

Last publish

Collaborators

  • urbandoor-automation