1
0
Fork 0
mirror of synced 2024-07-17 12:15:59 +12:00
budibase/eslint-local-rules/index.js

22 lines
537 B
JavaScript
Raw Normal View History

2023-11-18 02:39:52 +13:00
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.`,
})
}
},
}
},
},
}