Closed platypii closed 1 year ago
@garyhodgson what do you think?
personally, I like simple concise code. Which makes maintenance far easier.
@platypii is there a way to configure JSLint to flag default exports?
Just pushed some last minute cleanup of the imports. I think it's good now.
There is an ESLint rule no-default-export
that we could set, but eslint appears to not be setup currently?
Just pushed some last minute cleanup of the imports. I think it's good now.
There is an ESLint rule
no-default-export
that we could set, but eslint appears to not be setup currently?
The basic rules are from sandardx but additional rules can be set. See package.json
Added lint check. Also made some more updates: updated import/export for packages outside of modeling, and removed default exports from typescript .d.ts files.
reviewing... but there's a lot of file... ;)
@platypii anything else pending? if not then i will merge.
Yup looks good!
This is what it would look like if we got rid of all the
export default
in the V3 branch, and instead use named import/exports for everything.I think it's a good best practice. Instead of there being two ways to do something, this makes it so that we are consistent in always doing it one way. No need to think about how to import or export. This removes the need to add "export default" at the bottom of each file, so it saves hundreds of lines of code. It feels like cleaner use of ES modules.
Everything is exactly the same for users. The exported API doesn't change at all. This just simplifies how modules are imported internally in the codebase.
Let me know what you guys think.
All Submissions: