Skip to content
This repository was archived by the owner on Apr 18, 2021. It is now read-only.

Understanding Dependency Hierarchy

Aubrey Portwood edited this page Sep 28, 2020 · 5 revisions

js-coding-standards installs some other WebDevStudio packages that control how JavaScript is linted. js-coding-standards does not contain any linting configuration, but instead simply requires the below configuration and plugin to install coding standards.

Dependency Tree

By installing js-coding-standards you install @webdevstudios/eslint-config-js-coding-standards for a selection of common rules which utilizes a custom ESLint plugin @webdevstudios/eslint-plugin-js-coding-standards for custom rules.

Why

This was done because eslint requires prefixes like eslint-config or eslint-plugin in order to extend through e.g. eslintrc.js. Since we wanted to keep our coding standard packages consistent, we wanted to keep the js-coding-standards module name.

Use ~ Ranges

The reason we install @webdevstudios/*-js-coding-standards sub-dependancies as ~ ranges is because, say we introduce new rules or changes to rules in one of those sub-packages, those would automatically introduced into js-coding-standards which might be locked at a version constraint to lock in certain rules, we don't want that. But we do allow PATCH updates because mostly those are going to be fixes, not changes to any rules.

Clone this wiki locally