-
Notifications
You must be signed in to change notification settings - Fork 617
/
.adiorc.js
73 lines (72 loc) · 2.14 KB
/
.adiorc.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const get = require("lodash/get");
const getWorkspaces = require("get-yarn-workspaces");
const path = require("path");
module.exports = {
parser: {
plugins: ["jsx", "classProperties", "dynamicImport", "throwExpressions", "typescript"]
},
traverse: ({ path, push }) => {
const { node } = path;
if (node.type === "CallExpression") {
if (
get(node, "callee.property.name") === "resolve" &&
get(node, "callee.object.name") === "require"
) {
const possiblePackage = get(node, "arguments.0.value");
if (typeof possiblePackage === "string") {
return push(possiblePackage);
}
}
}
},
ignore: {
src: [
"~tests",
"~",
"async_hooks",
"aws-sdk",
"buffer",
"child_process",
"crypto",
"events",
"follow-redirects",
"fs",
"http",
"https",
"inspector",
"node:fs",
"node:timers",
"node:path",
"os",
"path",
"readline",
"stream",
"util",
"url",
"worker_threads"
],
dependencies: [
"@babel/runtime",
// Packages below are defined as peerDependencies in many 3rd party packages
// and make yarn go crazy with warnings. We define these packages as "dependencies"
// in our own packages, but we don't directly use them:
"@emotion/react",
"@svgr/webpack",
"@types/react",
"@webiny/cli",
"prop-types",
"apollo-cache",
"apollo-client",
"apollo-link",
"apollo-utilities",
"graphql",
"react-dom"
],
devDependencies: true,
peerDependencies: true
},
ignoreDirs: ["node_modules/", "dist/", "build/"],
packages: getWorkspaces().map(pkg =>
pkg.replace(/\//g, path.sep).replace(process.cwd() + path.sep, "")
)
};