0.1.1 • Published 5 years ago

eslint-plugin-fix-deps v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

eslint-plugin-fix-deps

An ESLint plugin to add dependencies to packages in monorepos using Bolt or Yarn Workspaces with bolt-check

Installing

yarn add eslint-plugin-fix-deps

Getting started

Make your eslint config look kind of like this

module.exports = {
  plugins: ["fix-deps"],
  rules: {
    "fix-deps/no-extraneous-dependencies": ["error", { projectDir: __dirname }]
  }
};

Credit/Inspiration

@Noviny told me that @lukebatchelor was going to write a script to add dependencies to package.jsons in monorepos that apply Bolt's constraints and I wanted that behaviour as an ESLint rule so I wrote this.

Most of the code here is from eslint-plugin-import and some from get-workspaces