forked from twilio-labs/paste
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.repo.js
31 lines (30 loc) · 996 Bytes
/
.eslintrc.repo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const path = require("path");
const cachedPackages = require("./tools/.cache/packages.json");
module.exports = {
extends: ["./.eslintrc.js"],
root: true,
// lint everything but:
// - src files in packages as they need to be linted with the context of their local package.json file to make no-extraneous-dependencies work
// - standalone apps or websites
// - vs-code extensions
// - cypress
ignorePatterns: [
"packages/**/src",
"packages/paste-theme-designer",
"packages/paste-token-contrast-checker",
"packages/paste-website",
"templates/paste-nextjs-template",
"apps/vs-code-intellisense",
"cypress",
],
rules: {
"import/no-extraneous-dependencies": [
"error",
{
// when linting the repo globally, local packages are not installed, so we need to
// manually tell eslint where to look for them
packageDir: [path.join(__dirname, "./"), ...cachedPackages.map((pkg) => pkg.location)],
},
],
},
};