-
Notifications
You must be signed in to change notification settings - Fork 662
Expand file tree
/
Copy path.adiorc.js
More file actions
48 lines (47 loc) · 1.66 KB
/
.adiorc.js
File metadata and controls
48 lines (47 loc) · 1.66 KB
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
import path from "path";
import get from "lodash/get.js";
import getWorkspaces from "get-yarn-workspaces";
export default {
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", "~"],
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",
"apollo-cache",
"apollo-client",
"apollo-link",
"apollo-utilities",
"graphql",
"react-dom"
],
devDependencies: true,
peerDependencies: true
},
ignoreDirs: ["node_modules/", "dist/", "build/", "nextjs/"],
packages: getWorkspaces()
.filter(pkg => !pkg.includes("system-requirements"))
.map(pkg => pkg.replace(/\//g, path.sep).replace(process.cwd() + path.sep, ""))
};