parent
e6213d7aa5
commit
e30575c0dc
|
@ -31,6 +31,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
'bsky-internal/use-exact-imports': 'error',
|
||||||
'bsky-internal/use-typed-gates': 'error',
|
'bsky-internal/use-typed-gates': 'error',
|
||||||
'bsky-internal/keep-i18n-patch-in-sync': 'error',
|
'bsky-internal/keep-i18n-patch-in-sync': 'error',
|
||||||
'simple-import-sort/imports': [
|
'simple-import-sort/imports': [
|
||||||
|
|
|
@ -4,6 +4,7 @@ module.exports = {
|
||||||
rules: {
|
rules: {
|
||||||
'keep-i18n-patch-in-sync': require('./keep-i18n-patch-in-sync'),
|
'keep-i18n-patch-in-sync': require('./keep-i18n-patch-in-sync'),
|
||||||
'avoid-unwrapped-text': require('./avoid-unwrapped-text'),
|
'avoid-unwrapped-text': require('./avoid-unwrapped-text'),
|
||||||
|
'use-exact-imports': require('./use-exact-imports'),
|
||||||
'use-typed-gates': require('./use-typed-gates'),
|
'use-typed-gates': require('./use-typed-gates'),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/* eslint-disable bsky-internal/use-exact-imports */
|
||||||
|
const BANNED_IMPORTS = [
|
||||||
|
'@fortawesome/free-regular-svg-icons',
|
||||||
|
'@fortawesome/free-solid-svg-icons',
|
||||||
|
]
|
||||||
|
|
||||||
|
exports.create = function create(context) {
|
||||||
|
return {
|
||||||
|
Literal(node) {
|
||||||
|
if (typeof node.value !== 'string') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (BANNED_IMPORTS.includes(node.value)) {
|
||||||
|
context.report({
|
||||||
|
node,
|
||||||
|
message:
|
||||||
|
'Import the specific thing you want instead of the entire package',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
import {library} from '@fortawesome/fontawesome-svg-core'
|
import {library} from '@fortawesome/fontawesome-svg-core'
|
||||||
import {faAddressCard} from '@fortawesome/free-regular-svg-icons'
|
import {faAddressCard} from '@fortawesome/free-regular-svg-icons/faAddressCard'
|
||||||
import {faBell as farBell} from '@fortawesome/free-regular-svg-icons/faBell'
|
import {faBell as farBell} from '@fortawesome/free-regular-svg-icons/faBell'
|
||||||
import {faBookmark as farBookmark} from '@fortawesome/free-regular-svg-icons/faBookmark'
|
import {faBookmark as farBookmark} from '@fortawesome/free-regular-svg-icons/faBookmark'
|
||||||
import {faCalendar as farCalendar} from '@fortawesome/free-regular-svg-icons/faCalendar'
|
import {faCalendar as farCalendar} from '@fortawesome/free-regular-svg-icons/faCalendar'
|
||||||
|
@ -25,8 +25,6 @@ import {faSquareCheck} from '@fortawesome/free-regular-svg-icons/faSquareCheck'
|
||||||
import {faSquarePlus} from '@fortawesome/free-regular-svg-icons/faSquarePlus'
|
import {faSquarePlus} from '@fortawesome/free-regular-svg-icons/faSquarePlus'
|
||||||
import {faTrashCan} from '@fortawesome/free-regular-svg-icons/faTrashCan'
|
import {faTrashCan} from '@fortawesome/free-regular-svg-icons/faTrashCan'
|
||||||
import {faUser} from '@fortawesome/free-regular-svg-icons/faUser'
|
import {faUser} from '@fortawesome/free-regular-svg-icons/faUser'
|
||||||
import {faFlask} from '@fortawesome/free-solid-svg-icons'
|
|
||||||
import {faUniversalAccess} from '@fortawesome/free-solid-svg-icons'
|
|
||||||
import {faAngleDown} from '@fortawesome/free-solid-svg-icons/faAngleDown'
|
import {faAngleDown} from '@fortawesome/free-solid-svg-icons/faAngleDown'
|
||||||
import {faAngleLeft} from '@fortawesome/free-solid-svg-icons/faAngleLeft'
|
import {faAngleLeft} from '@fortawesome/free-solid-svg-icons/faAngleLeft'
|
||||||
import {faAngleRight} from '@fortawesome/free-solid-svg-icons/faAngleRight'
|
import {faAngleRight} from '@fortawesome/free-solid-svg-icons/faAngleRight'
|
||||||
|
@ -62,6 +60,7 @@ import {faExclamation} from '@fortawesome/free-solid-svg-icons/faExclamation'
|
||||||
import {faEye} from '@fortawesome/free-solid-svg-icons/faEye'
|
import {faEye} from '@fortawesome/free-solid-svg-icons/faEye'
|
||||||
import {faFilter} from '@fortawesome/free-solid-svg-icons/faFilter'
|
import {faFilter} from '@fortawesome/free-solid-svg-icons/faFilter'
|
||||||
import {faFire} from '@fortawesome/free-solid-svg-icons/faFire'
|
import {faFire} from '@fortawesome/free-solid-svg-icons/faFire'
|
||||||
|
import {faFlask} from '@fortawesome/free-solid-svg-icons/faFlask'
|
||||||
import {faGear} from '@fortawesome/free-solid-svg-icons/faGear'
|
import {faGear} from '@fortawesome/free-solid-svg-icons/faGear'
|
||||||
import {faGlobe} from '@fortawesome/free-solid-svg-icons/faGlobe'
|
import {faGlobe} from '@fortawesome/free-solid-svg-icons/faGlobe'
|
||||||
import {faHand} from '@fortawesome/free-solid-svg-icons/faHand'
|
import {faHand} from '@fortawesome/free-solid-svg-icons/faHand'
|
||||||
|
@ -97,6 +96,7 @@ import {faSignal} from '@fortawesome/free-solid-svg-icons/faSignal'
|
||||||
import {faSliders} from '@fortawesome/free-solid-svg-icons/faSliders'
|
import {faSliders} from '@fortawesome/free-solid-svg-icons/faSliders'
|
||||||
import {faThumbtack} from '@fortawesome/free-solid-svg-icons/faThumbtack'
|
import {faThumbtack} from '@fortawesome/free-solid-svg-icons/faThumbtack'
|
||||||
import {faTicket} from '@fortawesome/free-solid-svg-icons/faTicket'
|
import {faTicket} from '@fortawesome/free-solid-svg-icons/faTicket'
|
||||||
|
import {faUniversalAccess} from '@fortawesome/free-solid-svg-icons/faUniversalAccess'
|
||||||
import {faUserCheck} from '@fortawesome/free-solid-svg-icons/faUserCheck'
|
import {faUserCheck} from '@fortawesome/free-solid-svg-icons/faUserCheck'
|
||||||
import {faUserPlus} from '@fortawesome/free-solid-svg-icons/faUserPlus'
|
import {faUserPlus} from '@fortawesome/free-solid-svg-icons/faUserPlus'
|
||||||
import {faUsers} from '@fortawesome/free-solid-svg-icons/faUsers'
|
import {faUsers} from '@fortawesome/free-solid-svg-icons/faUsers'
|
||||||
|
|
Loading…
Reference in New Issue