ui icon indicating copy to clipboard operation
ui copied to clipboard

Lint lodash imports to prevent importing the whole library

Open pleek91 opened this issue 2 years ago • 3 comments

Why This project uses lodash which is very large if the whole thing is imported. Its very easy to accidentally add the whole library as a dependency by importing a method incorrectly. We should lint the imports to help prevent this.

What Lint importing methods only.

Existing eslint rule I think can be used for this. https://github.com/wix/eslint-plugin-lodash/blob/master/docs/rules/import-scope.md

pleek91 avatar Nov 05 '21 16:11 pleek91

@zhen0 @pleek91 should close? https://github.com/PrefectHQ/ui/pull/1107

stackoverfloweth avatar Dec 05 '21 17:12 stackoverfloweth

Is #1107 the fix and this would prevent it from being broken again? Or are you saying this is no longer needed.

pleek91 avatar Dec 05 '21 17:12 pleek91

@pleek91 Oops, misread this issue. You're correct

stackoverfloweth avatar Dec 05 '21 17:12 stackoverfloweth