eslintsast

run eslint in multi repository project


let's say, I have following project structure:

back/package.json
back/lib/Content/*.js
front/package.json
slices/budget/back/package.json
slices/budget/back/lib/Content/*.js
slices/budget/front/package.json
slices/accounting/back/package.json
slices/accounting/back/lib/Content/*.js
slices/accounting/front/package.json

how do I?

cd back && eslint ./lib/**/*.js ../slices/**/lib/Content/*.js

specifically, I want to

what I receive

cd back && npm run lint

> back@1.0.0 lint
> eslint ../


Oops! Something went wrong! :(

ESLint: 8.23.1

ESLint couldn't find a configuration file

reason: https://eslint.org/docs/latest/user-guide/configuring/configuration-files#using-configuration-files


Solution

  • no real answer, except to create .eslintignore, .eslintrc, package.json at project root