mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
chore: Imports directly from files instead of index files (#4400)
Currently we import from `index.js` files where we could simply import the actual file(s) or module we need. This also creates a bit of confusion since it isn't obvious from where stuff is coming from, especially when we are importing types such as `Discord<XYZ>` types both from `@discordeno/types` and a `index.js` in the same file, one such example is `transformers/reverse/component.ts`. As far as I can tell, this does not have any specific advantage beside readability, maybe something with tree-shaking. (and for us, tree-shaking doesn't really matter) The only files that still import index.js files are: - index.js files themself - bot/src/handlers.js since it does a `import * as handlers from './handlers/index.js'` and the alternative is like 90 lines of imports Co-authored-by: Link <link20050703@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { expect } from 'chai'
|
||||
import { describe, it } from 'mocha'
|
||||
import { createDesiredPropertiesObject } from '../../src/index.js'
|
||||
import { createDesiredPropertiesObject } from '../../src/desiredProperties.js'
|
||||
|
||||
describe('desired properties', () => {
|
||||
it('fills defaults', () => {
|
||||
|
||||
Reference in New Issue
Block a user