You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2024. It is now read-only.
Here's another option to use lint-staged at the project root, but still calling linters at package-level. This respects the linter and formatter configs/ignore files of each package.
constpackage=require('./package.json');const{ workspaces }=package;// or manually define workspaces as ['package-a', 'package-b']constpattern='**/*.{js,jsx,ts,tsx}';constlinter='node_modules/.bin/eslint --fix';construles=Object.fromEntries(workspaces.map(workspace=>[`${workspace}/${pattern}`,`./${workspace}/${linter}`]))module.exports={// results into...// 'package-a/**/*.{js,jsx,ts,tsx}': 'package-a/node_modules/.bin/eslint --fix',// 'package-b/**/*.{js,jsx,ts,tsx}': 'package-b/node_modules/.bin/eslint --fix'
...rules}