zhaoyongjie commented on a change in pull request #17427:
URL: https://github.com/apache/superset/pull/17427#discussion_r749898360
##########
File path: superset-frontend/.eslintrc.js
##########
@@ -33,7 +33,44 @@ module.exports = {
browser: true,
},
settings: {
- 'import/resolver': 'webpack',
+ 'import/resolver': {
+ webpack: {},
+ node: {
+ extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
+ },
+ },
+ // Allow only core/src and core/test, avoid import modules from lib
+ 'import/internal-regex': /^@superset-ui\/core\/(src|test)\/.*/,
+ 'import/core-modules': [
Review comment:
This is for
- **Allow** `import { variable } from
'@superset-ui/core/src/some/other/module'` and `import { variable } from
'@superset-ui/core/test/some/other/module'`
- **Disallow** `import { variable } from
'@superset-ui/core/lib/some/other/module'` or `import { variable } from
'@superset-ui/chart-controls/lib/some/other/module'`
We should use `@superset-ui/core` instead of
`@superset-ui/core/src/some/other/module`
or`@superset-ui/core/test/some/other/module` after monorepo project.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]