@@ -11,6 +11,27 @@ module.exports = {
1111 extends : `${ coreLocation } /packages/volto/.eslintrc` ,
1212 rules : {
1313 'import/no-unresolved' : 1 ,
14+ 'import/named' : 'error' ,
15+ 'react/jsx-filename-extension' : [ 1 , { extensions : [ '.tsx' , '.jsx' ] } ] ,
16+ 'no-restricted-imports' : [
17+ 'error' ,
18+ {
19+ name : '@plone/volto/components' ,
20+ message :
21+ 'Importing from barrel files is not allowed. Please use direct imports of the modules instead.' ,
22+ } ,
23+ {
24+ name : '@plone/volto/helpers' ,
25+ message :
26+ 'Importing from barrel files is not allowed. Please use direct imports of the modules instead.' ,
27+ } ,
28+ {
29+ name : '@plone/volto/actions' ,
30+ message :
31+ 'Importing from barrel files is not allowed. Please use direct imports of the modules instead.' ,
32+ } ,
33+ ] ,
34+ 'react/jsx-key' : [ 2 , { checkFragmentShorthand : true } ] ,
1435 } ,
1536 settings : {
1637 'import/resolver' : {
@@ -24,7 +45,7 @@ module.exports = {
2445 [ '@plone/registry' , `${ coreLocation } /packages/registry/src` ] ,
2546 [
2647 '@kitconcept/volto-separator-block' ,
27- '. /packages/volto-separator-block/src' ,
48+ ` ${ projectRootPath } /packages/volto-separator-block/src` ,
2849 ] ,
2950 ] ,
3051 extensions : [ '.js' , '.jsx' , '.ts' , '.tsx' , '.json' ] ,
0 commit comments