Chore: Add codemod and betterer config to make barrel imports explicit (#80913)
* chore: add codemod for highlighting barrel imports * style(frontend): add no-barrel-files plugin to betterer * chore(betterer): update betterer file * ci(frontend-metrics): track occurrences of barrel files being imported * chore: clean up explicit barrel imports codemod script * chore(codeowners): add explicit barrel imports script * Add no-barrel-files plugin to betterer configuration Co-Authored-By: LeventeBalogh <balogh.levente.hu@gmail.com> --------- Co-authored-by: LeventeBalogh <balogh.levente.hu@gmail.com>
This commit is contained in:
co-authored by
LeventeBalogh
parent
453a75b767
commit
1dfd34ee79
@@ -11,6 +11,7 @@ ACCESSIBILITY_ERRORS="$(grep -oP '\"errors\":(\d+),' pa11y-ci-results.json | gre
|
||||
DIRECTIVES="$(grep -r -o directive public/app/ | wc -l)"
|
||||
CONTROLLERS="$(grep -r -oP 'class .*Ctrl' public/app/ | wc -l)"
|
||||
LEGACY_FORMS="$(grep -r -oP 'LegacyForms;' public/app | wc -l)"
|
||||
BARREL_IMPORTS="$(grep -r -oP '@todo: replace barrel import path' public/app | wc -l)"
|
||||
CLASSNAME_PROP="$(grep -r -o -E --include="*.ts*" "\.*.className=\W.*\W.*" public/app | wc -l)"
|
||||
EMOTION_IMPORTS="$(grep -r -o -E --include="*.ts*" --exclude="*.test*" "\{.*css.*\} from '@emotion/css'" public/app | wc -l)"
|
||||
TS_FILES="$(find public/app -type f -name "*.ts*" -not -name "*.test*" | wc -l)"
|
||||
@@ -29,6 +30,7 @@ echo -e "Accessibility errors: $ACCESSIBILITY_ERRORS"
|
||||
echo -e "Directives: $DIRECTIVES"
|
||||
echo -e "Controllers: $CONTROLLERS"
|
||||
echo -e "Legacy forms: $LEGACY_FORMS"
|
||||
echo -e "Barrel imports: $BARREL_IMPORTS"
|
||||
echo -e "Total bundle folder size: $TOTAL_BUNDLE"
|
||||
echo -e "Total outdated dependencies: $OUTDATED_DEPENDENCIES"
|
||||
echo -e "Low vulnerabilities: $LOW_VULNERABILITIES"
|
||||
|
||||
Reference in New Issue
Block a user