forked from twilio-labs/paste
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.repo.js
32 lines (31 loc) · 1.01 KB
/
.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
32
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',
'packages/paste-nextjs-template',
'packages/paste-cra-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((package) => package.location)],
},
],
},
};