-
- Downloads
Disable default export rules
This is part of the work to implement the consensus reached in the [RFC][1] to prefer named exports over defalt exports. Future iterations will migrate existing default exports to named exports. The bulk of the changes in this commit were performed with the following script: ```bash set -u changed-files() { local trunk="origin/master" local file= local committed_files=$(git diff "$trunk"... --numstat \ | awk '/\.(js|vue)$/{ print $3 }') local changed_files=$(git diff --numstat \ | awk '/\.(js|vue)$/{ print $3 }') for file in ${committed_files[@]} ${changed_files[@]}; do if [ -f "$file" ]; then echo "$file" fi done } git grep -lz "import/prefer-default-export" -- '**/*.js' \ | xargs -0 perl -0pi -e \ "s/[^\n]*eslint-disable[^\n]*"\ "import\/prefer-default-export[^\n]*\n//mgs" git grep -lz "rfcs/-/issues/20" -- '**/*.js' \ | xargs -0 perl -0pi -e \ "s/[^\n]*rfcs\/-\/issues\/20[^\n]*\n//mgs" yarn prettier --write $(changed-files) ``` The script is [idempotent][2], to help make it easier to keep up-to-date. [1]: https://gitlab.com/gitlab-org/frontend/rfcs/-/issues/20 [2]: https://en.wikipedia.org/wiki/Idempotence
Showing
- ee/app/assets/javascripts/approvals/stores/modules/base/getters.js 0 additions, 1 deletion...sets/javascripts/approvals/stores/modules/base/getters.js
- ee/app/assets/javascripts/billings/stores/modules/subscription/getters.js 0 additions, 1 deletion...vascripts/billings/stores/modules/subscription/getters.js
- ee/app/assets/javascripts/dependencies/components/constants.js 0 additions, 1 deletion...p/assets/javascripts/dependencies/components/constants.js
- ee/app/assets/javascripts/dependencies/store/constants.js 0 additions, 1 deletionee/app/assets/javascripts/dependencies/store/constants.js
- ee/app/assets/javascripts/dependencies/store/utils.js 0 additions, 1 deletionee/app/assets/javascripts/dependencies/store/utils.js
- ee/app/assets/javascripts/environments/stores/helpers.js 0 additions, 1 deletionee/app/assets/javascripts/environments/stores/helpers.js
- ee/app/assets/javascripts/filtered_search/constants.js 0 additions, 1 deletionee/app/assets/javascripts/filtered_search/constants.js
- ee/app/assets/javascripts/geo_node_form/store/getters.js 0 additions, 1 deletionee/app/assets/javascripts/geo_node_form/store/getters.js
- ee/app/assets/javascripts/geo_replicable/store/getters.js 0 additions, 1 deletionee/app/assets/javascripts/geo_replicable/store/getters.js
- ee/app/assets/javascripts/geo_replicable/utils.js 0 additions, 1 deletionee/app/assets/javascripts/geo_replicable/utils.js
- ee/app/assets/javascripts/geo_settings/store/getters.js 0 additions, 1 deletionee/app/assets/javascripts/geo_settings/store/getters.js
- ee/app/assets/javascripts/issues_analytics/utils.js 0 additions, 1 deletionee/app/assets/javascripts/issues_analytics/utils.js
- ee/app/assets/javascripts/license_compliance/store/constants.js 0 additions, 1 deletion.../assets/javascripts/license_compliance/store/constants.js
- ee/app/assets/javascripts/licenses/store/getters.js 0 additions, 1 deletionee/app/assets/javascripts/licenses/store/getters.js
- ee/app/assets/javascripts/on_demand_scans/constants.js 0 additions, 1 deletionee/app/assets/javascripts/on_demand_scans/constants.js
- ee/app/assets/javascripts/pages/groups/saml_providers/saml_members/store/actions.js 0 additions, 1 deletion...pages/groups/saml_providers/saml_members/store/actions.js
- ee/app/assets/javascripts/pages/groups/saml_providers/saml_members/store/mutation_types.js 0 additions, 1 deletion...roups/saml_providers/saml_members/store/mutation_types.js
- ee/app/assets/javascripts/pages/projects/pipelines/show/utils.js 0 additions, 1 deletion...assets/javascripts/pages/projects/pipelines/show/utils.js
- ee/app/assets/javascripts/repository/utils/commit.js 0 additions, 1 deletionee/app/assets/javascripts/repository/utils/commit.js
- ee/app/assets/javascripts/security_configuration/modules/configuration/actions.js 0 additions, 1 deletion...s/security_configuration/modules/configuration/actions.js
Please register or sign in to comment