@urbandoor/eslint-plugin-urbandoor
v3.0.0@urbandoor/eslint-plugin-urbandoor
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 scriptsextends: - '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 pipelineextends: - 'plugin:@urbandoor/urbandoor/legacy'
common
: use as a base when none of the others will doextends: - '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
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