-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find unused exports #3178
Merged
Merged
Find unused exports #3178
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24a2216
to
8d10e47
Compare
This was referenced Jan 17, 2023
himdel
added a commit
to himdel/ansible-hub-ui
that referenced
this pull request
Feb 7, 2023
… forth for find-unused-exports $ npm run imports-to-relative ; npm run find-unused-exports ; npm run imports-to-src > ansible-hub-ui@0.1.0 imports-to-relative > perl -i -pe 's#from '\''src/#from '\''../#' src/*/*.* ; perl -i -pe 's#from '\''src/#from '\''../../#' src/*/*/*.* ; perl -i -pe 's#from '\''src/#from '\''../../../#' src/*/*/*/*.* > ansible-hub-ui@0.1.0 find-unused-exports > npx find-unused-exports --module-glob 'src/**/*.{js,ts,jsx,tsx}' --resolve-file-extensions 'tsx,ts,jsx,js' --resolve-index-files src/containers/token/token-insights.tsx default 1 unused export in 1 module. > ansible-hub-ui@0.1.0 imports-to-src > perl -i -pe 's#from '\''\.\./#from '\''src/#' src/*/*.* ; perl -i -pe 's#from '\''\.\./\.\./#from '\''src/#' src/*/*/*.* ; perl -i -pe 's#from '\''\.\./\.\./\.\./#from '\''src/#' src/*/*/*/*.* (ansible#3178)
himdel
added a commit
to himdel/ansible-hub-ui
that referenced
this pull request
Feb 7, 2023
and clean up unused exports (ansible#3178, ansible#319)
himdel
added a commit
to himdel/ansible-hub-ui
that referenced
this pull request
Feb 7, 2023
and clean up unused exports (ansible#3178)
himdel
added a commit
to himdel/ansible-hub-ui
that referenced
this pull request
Feb 7, 2023
and clean up unused exports (ansible#3178)
himdel
added a commit
to himdel/ansible-hub-ui
that referenced
this pull request
Feb 7, 2023
and clean up unused exports (ansible#3178)
himdel
added a commit
that referenced
this pull request
Feb 8, 2023
* Drop more insights-related code No-Issue * npm run imports-to-relative, find-unused-exports, imports-to-src and clean up unused exports (#3178, #319) * prettier: add plugin to sort imports sort external imports first, then src/, then any relative paths sort imports by source name, sort specifiers bump prettier to 2.8 ensure app.scss goes before patternfly.scss (#3198) * npm run prettier * sort index.ts exports perl -i -npe 's/^export/import/' src/**/index.ts npm run prettier perl -i -npe 's/^import/export/' src/**/index.ts
himdel
added a commit
that referenced
this pull request
Feb 8, 2023
* Drop more insights-related code No-Issue * npm run imports-to-relative, find-unused-exports, imports-to-src and clean up unused exports (#3178) * prettier: add plugin to sort imports sort external imports first, then src/, then any relative paths sort imports by source name, sort specifiers bump prettier to 2.8 ensure app.scss goes before patternfly.scss (#3198) * npm run prettier * sort index.ts exports perl -i -npe 's/^export/import/' src/**/index.ts npm run prettier perl -i -npe 's/^import/export/' src/**/index.ts
himdel
added a commit
that referenced
this pull request
Feb 8, 2023
* Drop more insights-related code No-Issue * npm run imports-to-relative, find-unused-exports, imports-to-src and clean up unused exports (#3178) * prettier: add plugin to sort imports sort external imports first, then src/, then any relative paths sort imports by source name, sort specifiers bump prettier to 2.8 ensure app.scss goes before patternfly.scss (#3198) * npm run prettier * sort index.ts exports perl -i -npe 's/^export/import/' src/**/index.ts npm run prettier perl -i -npe 's/^import/export/' src/**/index.ts
himdel
added a commit
that referenced
this pull request
Feb 8, 2023
* Drop more insights-related code No-Issue * npm run imports-to-relative, find-unused-exports, imports-to-src and clean up unused exports (#3178) * prettier: add plugin to sort imports sort external imports first, then src/, then any relative paths sort imports by source name, sort specifiers bump prettier to 2.8 ensure app.scss goes before patternfly.scss (#3198) * npm run prettier * sort index.ts exports perl -i -npe 's/^export/import/' src/**/index.ts npm run prettier perl -i -npe 's/^import/export/' src/**/index.ts
https://github.com/jaydenseric/find-unused-exports Note: the task doesn't work, as it will ignore any import from 'src/...' No-Issues
8d10e47
to
9337720
Compare
… forth for find-unused-exports $ npm run imports-to-relative ; npm run find-unused-exports ; npm run imports-to-src > ansible-hub-ui@0.1.0 imports-to-relative > perl -i -pe 's#from '\''src/#from '\''../#' src/*/*.* ; perl -i -pe 's#from '\''src/#from '\''../../#' src/*/*/*.* ; perl -i -pe 's#from '\''src/#from '\''../../../#' src/*/*/*/*.* > ansible-hub-ui@0.1.0 find-unused-exports > npx find-unused-exports --module-glob 'src/**/*.{js,ts,jsx,tsx}' --resolve-file-extensions 'tsx,ts,jsx,js' --resolve-index-files src/containers/token/token-insights.tsx default 1 unused export in 1 module. > ansible-hub-ui@0.1.0 imports-to-src > perl -i -pe 's#from '\''\.\./#from '\''src/#' src/*/*.* ; perl -i -pe 's#from '\''\.\./\.\./#from '\''src/#' src/*/*/*.* ; perl -i -pe 's#from '\''\.\./\.\./\.\./#from '\''src/#' src/*/*/*/*.* No-Issue
9337720
to
e233166
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using https://github.com/jaydenseric/find-unused-exports to find dead exports/dead code, and cleaning up.
Except it doesn't know about our
src/
alias.So adding tasks to undo/redo the src convert .. and making this a draft, the way to run it now is...
Cleanup of unused exports happened in #3176
tooling maybe
https://github.com/jaydenseric/find-unused-exports/issues/4
?Or switch to https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.md ?
Or just add
"lint:exports": "npm-run-all imports-to-relative find-unused-exports imports-to-src prettier"
?