1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00
budibase/eslint-local-rules/index.js
2023-11-17 14:39:52 +01:00

22 lines
537 B
JavaScript

module.exports = {
"no-budibase-imports": {
create: function (context) {
return {
ImportDeclaration(node) {
const importPath = node.source.value
if (
/^@budibase\/[^/]+\/.*$/.test(importPath) &&
importPath !== "@budibase/backend-core/tests"
) {
context.report({
node,
message: `Importing from @budibase is not allowed, except for @budibase/backend-core/tests.`,
})
}
},
}
},
},
}