-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
34 lines (32 loc) · 916 Bytes
/
.eslintrc.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
const fs = require('fs');
const projectRootPath = __dirname;
let coreLocation;
if (fs.existsSync(`${projectRootPath}/core`))
coreLocation = `${projectRootPath}/core`;
else if (fs.existsSync(`${projectRootPath}/../../core`))
coreLocation = `${projectRootPath}/../../core`;
module.exports = {
extends: `${coreLocation}/packages/volto/.eslintrc`,
rules: {
'import/no-unresolved': 1,
},
settings: {
'import/resolver': {
alias: {
map: [
['@plone/volto', `${coreLocation}/packages/volto/src`],
[
'@plone/volto-slate',
`${coreLocation}/core/packages/volto-slate/src`,
],
['@plone/registry', `${coreLocation}/packages/registry/src`],
[
'volto-hydra',
'./packages/volto-hydra/src',
],
],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
},
},
};