my fork of the bluesky client
1const BANNED_IMPORTS = [
2 '@fortawesome/free-regular-svg-icons',
3 '@fortawesome/free-solid-svg-icons',
4]
5
6exports.create = function create(context) {
7 return {
8 ImportDeclaration(node) {
9 const source = node.source
10 if (typeof source.value !== 'string') {
11 return
12 }
13 if (BANNED_IMPORTS.includes(source.value)) {
14 context.report({
15 node,
16 message:
17 'Import the specific thing you want instead of the entire package',
18 })
19 }
20 },
21 }
22}