-
Notifications
You must be signed in to change notification settings - Fork 21
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
[Cleanup] Adopt eslint vue/recommended: Grant Finder: app files #2811
Conversation
QA Summary
Test CoverageCoverage report for `packages/client`
Coverage report for `packages/server`
Pusher: @jeffsmohan, Action: |
Terraform Summary
Hint: If "Terraform Format & Style" failed, run OutputValidation Output
Plan OutputNote: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:
# module.api.aws_ecs_task_definition.default[0] has changed
~ resource "aws_ecs_task_definition" "default" {
id = "gost-staging-api"
+ tags = {}
# (13 unchanged attributes hidden)
+ volume {
+ name = "data"
+ efs_volume_configuration {
+ file_system_id = "fs-08f95063c1cdbe191"
+ root_directory = "/"
+ transit_encryption = "ENABLED"
+ transit_encryption_port = 0
+ authorization_config {
+ access_point_id = "fsap-03bc0296928aade4f"
}
}
}
- volume {
- name = "data" -> null
- efs_volume_configuration {
- file_system_id = "fs-08f95063c1cdbe191" -> null
- root_directory = "/" -> null
- transit_encryption = "ENABLED" -> null
- authorization_config {
- access_point_id = "fsap-03bc0296928aade4f" -> null
}
}
}
# (1 unchanged block hidden)
}
# module.api.aws_iam_role.execution[0] has changed
~ resource "aws_iam_role" "execution" {
id = "gost-staging-api-ECSTaskExecution-20230217010414321500000009"
name = "gost-staging-api-ECSTaskExecution-20230217010414321500000009"
~ role_last_used = [
~ {
~ last_used_date = "2024-03-20T20:45:11Z" -> "2024-03-22T15:29:32Z"
# (1 unchanged element hidden)
},
]
tags = {}
# (11 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.api.aws_iam_role.task[0] has changed
~ resource "aws_iam_role" "task" {
id = "gost-staging-api-ECSTask-2023021701041477300000000a"
name = "gost-staging-api-ECSTask-2023021701041477300000000a"
~ role_last_used = [
~ {
~ last_used_date = "2024-03-20T20:26:58Z" -> "2024-03-22T15:29:33Z"
# (1 unchanged element hidden)
},
]
tags = {}
# (11 unchanged attributes hidden)
# (6 unchanged blocks hidden)
}
Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.
─────────────────────────────────────────────────────────────────────────────
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
~ update in-place
- destroy
+/- create replacement and then destroy
Terraform will perform the following actions:
# module.api.aws_ecs_service.default[0] will be updated in-place
~ resource "aws_ecs_service" "default" {
id = "arn:aws:ecs:us-west-2:357150818708:service/gost-staging/gost-staging-api"
name = "gost-staging-api"
tags = {}
~ task_definition = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-api:190" -> (known after apply)
# (15 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
# module.api.aws_ecs_task_definition.default[0] must be replaced
+/- resource "aws_ecs_task_definition" "default" {
~ arn = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-api:190" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-api" -> (known after apply)
~ container_definitions = jsonencode(
~ [ # forces replacement
~ {
~ dockerLabels = {
~ "com.datadoghq.tags.version" = "5751492e6865e85abd6f585caed71b1ab293f021" -> "5744cfb9e811075284f0c3a626b3e94c46622c98"
# (2 unchanged elements hidden)
}
~ environment = [
# (7 unchanged elements hidden)
{
name = "DD_SERVICE"
value = "gost"
},
~ {
name = "DD_VERSION"
~ value = "5751492e6865e85abd6f585caed71b1ab293f021" -> "5744cfb9e811075284f0c3a626b3e94c46622c98"
},
{
name = "ENABLE_GRANTS_DIGEST"
value = "false"
},
# (12 unchanged elements hidden)
]
~ image = "ghcr.io/usdigitalresponse/usdr-gost-api:5751492e6865e85abd6f585caed71b1ab293f021@sha256:27361bd5a2f243b0fecd17435b821e111866a76f4205036d28c3bdc1ffa9e950" -> "ghcr.io/usdigitalresponse/usdr-gost-api:5744cfb9e811075284f0c3a626b3e94c46622c98@sha256:e48ba0f8aad3f5334e7418d10c537f29ebf2789e44ffe244470e7b13281e565d"
name = "api"
- systemControls = [] -> null
- volumesFrom = [] -> null
# (9 unchanged elements hidden)
} # forces replacement,
~ {
~ dockerLabels = {
~ "com.datadoghq.tags.version" = "5751492e6865e85abd6f585caed71b1ab293f021" -> "5744cfb9e811075284f0c3a626b3e94c46622c98"
# (2 unchanged elements hidden)
}
~ environment = [
# (3 unchanged elements hidden)
{
name = "DD_SERVICE"
value = "gost"
},
~ {
name = "DD_VERSION"
~ value = "5751492e6865e85abd6f585caed71b1ab293f021" -> "5744cfb9e811075284f0c3a626b3e94c46622c98"
},
{
name = "ECS_FARGATE"
value = "true"
},
]
- mountPoints = [] -> null
name = "datadog"
- portMappings = [] -> null
- systemControls = [] -> null
- volumesFrom = [] -> null
# (6 unchanged elements hidden)
} # forces replacement,
]
)
~ id = "gost-staging-api" -> (known after apply)
~ revision = 190 -> (known after apply)
- tags = {} -> null
# (9 unchanged attributes hidden)
- volume {
- name = "data" -> null
- efs_volume_configuration {
- file_system_id = "fs-08f95063c1cdbe191" -> null
- root_directory = "/" -> null
- transit_encryption = "ENABLED" -> null
- transit_encryption_port = 0 -> null
- authorization_config {
- access_point_id = "fsap-03bc0296928aade4f" -> null
}
}
}
+ volume {
+ name = "data"
+ efs_volume_configuration {
+ file_system_id = "fs-08f95063c1cdbe191"
+ root_directory = "/"
+ transit_encryption = "ENABLED"
+ authorization_config {
+ access_point_id = "fsap-03bc0296928aade4f"
}
}
}
# (1 unchanged block hidden)
}
# module.arpa_audit_report.aws_ecs_service.default will be updated in-place
~ resource "aws_ecs_service" "default" {
id = "arn:aws:ecs:us-west-2:357150818708:service/gost-staging/gost-staging-arpa_audit_report"
name = "gost-staging-arpa_audit_report"
tags = {}
~ task_definition = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-arpa_audit_report:159" -> (known after apply)
# (15 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
# module.arpa_audit_report.aws_ecs_task_definition.consumer must be replaced
+/- resource "aws_ecs_task_definition" "consumer" {
~ arn = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-arpa_audit_report:159" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-arpa_audit_report" -> (known after apply)
~ container_definitions = (sensitive value) # forces replacement
~ id = "gost-staging-arpa_audit_report" -> (known after apply)
- ipc_mode = "" -> null
- pid_mode = "" -> null
~ revision = 159 -> (known after apply)
- tags = {} -> null
# (9 unchanged attributes hidden)
- volume {
- name = "data" -> null
- efs_volume_configuration {
- file_system_id = "fs-08f95063c1cdbe191" -> null
- root_directory = "/" -> null
- transit_encryption = "ENABLED" -> null
- transit_encryption_port = 0 -> null
- authorization_config {
- access_point_id = "fsap-03bc0296928aade4f" -> null
}
}
}
+ volume {
+ name = "data"
+ efs_volume_configuration {
+ file_system_id = "fs-08f95063c1cdbe191"
+ root_directory = "/"
+ transit_encryption = "ENABLED"
+ authorization_config {
+ access_point_id = "fsap-03bc0296928aade4f"
}
}
}
# (1 unchanged block hidden)
}
# module.arpa_treasury_report.aws_ecs_service.default will be updated in-place
~ resource "aws_ecs_service" "default" {
id = "arn:aws:ecs:us-west-2:357150818708:service/gost-staging/gost-staging-treasury_report"
name = "gost-staging-treasury_report"
tags = {}
~ task_definition = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-treasury_report:148" -> (known after apply)
# (15 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
# module.arpa_treasury_report.aws_ecs_task_definition.consumer must be replaced
+/- resource "aws_ecs_task_definition" "consumer" {
~ arn = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-treasury_report:148" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-treasury_report" -> (known after apply)
~ container_definitions = (sensitive value) # forces replacement
~ id = "gost-staging-treasury_report" -> (known after apply)
- ipc_mode = "" -> null
- pid_mode = "" -> null
~ revision = 148 -> (known after apply)
- tags = {} -> null
# (9 unchanged attributes hidden)
- volume {
- name = "data" -> null
- efs_volume_configuration {
- file_system_id = "fs-08f95063c1cdbe191" -> null
- root_directory = "/" -> null
- transit_encryption = "ENABLED" -> null
- transit_encryption_port = 0 -> null
- authorization_config {
- access_point_id = "fsap-03bc0296928aade4f" -> null
}
}
}
+ volume {
+ name = "data"
+ efs_volume_configuration {
+ file_system_id = "fs-08f95063c1cdbe191"
+ root_directory = "/"
+ transit_encryption = "ENABLED"
+ authorization_config {
+ access_point_id = "fsap-03bc0296928aade4f"
}
}
}
# (1 unchanged block hidden)
}
# module.consume_grants.aws_ecs_service.default will be updated in-place
~ resource "aws_ecs_service" "default" {
id = "arn:aws:ecs:us-west-2:357150818708:service/gost-staging/gost-staging-consume_grants"
name = "gost-staging-consume_grants"
tags = {}
~ task_definition = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-consume_grants:175" -> (known after apply)
# (15 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
# module.consume_grants.aws_ecs_task_definition.consume_grants must be replaced
+/- resource "aws_ecs_task_definition" "consume_grants" {
~ arn = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-consume_grants:175" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-consume_grants" -> (known after apply)
~ container_definitions = (sensitive value) # forces replacement
~ id = "gost-staging-consume_grants" -> (known after apply)
- ipc_mode = "" -> null
- pid_mode = "" -> null
~ revision = 175 -> (known after apply)
- tags = {} -> null
# (9 unchanged attributes hidden)
# (1 unchanged block hidden)
}
# module.website.aws_s3_object.deploy-config[0] will be updated in-place
~ resource "aws_s3_object" "deploy-config" {
~ content = <<-EOT
window.APP_CONFIG = window.APP_CONFIG || {};
window.APP_CONFIG.apiURLForGOST = 'https://api.staging.grants.usdr.dev/';
window.apiURLForGOST = window.APP_CONFIG.apiURLForGOST; // Legacy
window.APP_CONFIG.DD_RUM_ENABLED = true;
- window.APP_CONFIG.DD_RUM_CONFIG = {"allowedTracingUrls":["https://api.staging.grants.usdr.dev"],"applicationId":"15db471e-2ccb-4d3c-a6bf-99b750d748f5","clientToken":"pub50834fcc1999d53e546519b1a0f03934","defaultPrivacyLevel":"mask","env":"staging","service":"gost","sessionReplaySampleRate":1,"sessionSampleRate":10,"site":"datadoghq.com","trackLongTasks":true,"trackResources":true,"trackUserInteractions":true,"version":"5751492e6865e85abd6f585caed71b1ab293f021"};
+ window.APP_CONFIG.DD_RUM_CONFIG = {"allowedTracingUrls":["https://api.staging.grants.usdr.dev"],"applicationId":"15db471e-2ccb-4d3c-a6bf-99b750d748f5","clientToken":"pub50834fcc1999d53e546519b1a0f03934","defaultPrivacyLevel":"mask","env":"staging","service":"gost","sessionReplaySampleRate":1,"sessionSampleRate":10,"site":"datadoghq.com","trackLongTasks":true,"trackResources":true,"trackUserInteractions":true,"version":"5744cfb9e811075284f0c3a626b3e94c46622c98"};
window.APP_CONFIG.GOOGLE_TAG_ID = 'G-D5DFR7BN0N';
window.APP_CONFIG.featureFlags = {"myProfileEnabled":true,"newGrantsDetailPageEnabled":true,"newTerminologyEnabled":true};
window.APP_CONFIG.overrideFeatureFlag = (flagName, overrideValue) => {
const storageKey = 'featureFlags';
let overrides = {};
try {
overrides = JSON.parse(window.sessionStorage.getItem(storageKey)) || {};
} catch (e) {
console.error(`Error parsing window.sessionStorage.${storageKey} as JSON:`, e);
console.warn(`window.sessionStorage.${storageKey} will be replaced.`);
}
overrides[flagName] = overrideValue;
window.sessionStorage.setItem(storageKey, JSON.stringify(overrides));
console.log('New feature flag overrides in page session:',
window.sessionStorage.getItem(storageKey));
};
EOT
~ etag = "309013ae4b72ea6069d9b4b82848e11a" -> "0226c89b86908d83be33fab1052b2389"
id = "/config/deploy-config.js"
tags = {}
~ version_id = "WyZMdoLp.phztgpoZVpDt554O55xH8MK" -> (known after apply)
# (10 unchanged attributes hidden)
}
# module.website.aws_s3_object.origin_dist_artifact["css/main.5d456ea9.css"] will be created
+ resource "aws_s3_object" "origin_dist_artifact" {
+ acl = "private"
+ bucket = "gost-staging-origin-357150818708-us-west-2-website"
+ bucket_key_enabled = (known after apply)
+ content_type = "text/css"
+ etag = "d89ee55bed0adbf3f244c3fdea22440c"
+ force_destroy = false
+ id = (known after apply)
+ key = "dist/css/main.5d456ea9.css"
+ kms_key_id = (known after apply)
+ server_side_encryption = "AES256"
+ source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/css/main.5d456ea9.css"
+ source_hash = "d89ee55bed0adbf3f244c3fdea22440c"
+ storage_class = (known after apply)
+ tags_all = {
+ "env" = "staging"
+ "management" = "terraform"
+ "owner" = "grants"
+ "repo" = "usdr-gost"
+ "service" = "gost"
+ "usage" = "workload"
}
+ version_id = (known after apply)
}
# module.website.aws_s3_object.origin_dist_artifact["css/main.67bb0e76.css"] will be destroyed
# (because key ["css/main.67bb0e76.css"] is not in for_each map)
- resource "aws_s3_object" "origin_dist_artifact" {
- acl = "private" -> null
- bucket = "gost-staging-origin-357150818708-us-west-2-website" -> null
- bucket_key_enabled = false -> null
- content_type = "text/css" -> null
- etag = "0eb3f529e0871623e283ee0d64e423ff" -> null
- force_destroy = false -> null
- id = "dist/css/main.67bb0e76.css" -> null
- key = "dist/css/main.67bb0e76.css" -> null
- metadata = {} -> null
- server_side_encryption = "AES256" -> null
- source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/css/main.67bb0e76.css" -> null
- source_hash = "0eb3f529e0871623e283ee0d64e423ff" -> null
- storage_class = "STANDARD" -> null
- tags = {} -> null
- tags_all = {
- "env" = "staging"
- "management" = "terraform"
- "owner" = "grants"
- "repo" = "usdr-gost"
- "service" = "gost"
- "usage" = "workload"
} -> null
- version_id = "x0wB5itiUz3qWCJUukW3Z2GgbADII13p" -> null
}
# module.website.aws_s3_object.origin_dist_artifact["index.html"] will be updated in-place
~ resource "aws_s3_object" "origin_dist_artifact" {
~ etag = "ed0f0f79b605de7ba1907cf05e5ef0c1" -> "588f4a5f56473931df5673f4ed7ac8be"
id = "dist/index.html"
~ source_hash = "ed0f0f79b605de7ba1907cf05e5ef0c1" -> "588f4a5f56473931df5673f4ed7ac8be"
tags = {}
~ version_id = "WOtVVA8ksy6Biz2nYwyogSAVMQg0IfN." -> (known after apply)
# (11 unchanged attributes hidden)
}
# module.website.aws_s3_object.origin_dist_artifact["js/chunk-vendors.f6368cfa.js.map"] will be updated in-place
~ resource "aws_s3_object" "origin_dist_artifact" {
~ etag = "cd967123bc800ae4ec028dea0d1ad34d-2" -> "d4836e0e15d2d8b51f1ea8cf6e3b5b97"
id = "dist/js/chunk-vendors.f6368cfa.js.map"
tags = {}
~ version_id = "vQ6EBMQggyX7zNgpgwtqxNBHbQhdn_4M" -> (known after apply)
# (12 unchanged attributes hidden)
}
# module.website.aws_s3_object.origin_dist_artifact["js/main.cd9f7550.js"] will be created
+ resource "aws_s3_object" "origin_dist_artifact" {
+ acl = "private"
+ bucket = "gost-staging-origin-357150818708-us-west-2-website"
+ bucket_key_enabled = (known after apply)
+ content_type = "text/javascript"
+ etag = "ef8e3dbf86f20f526550f9bfb58a6ec6"
+ force_destroy = false
+ id = (known after apply)
+ key = "dist/js/main.cd9f7550.js"
+ kms_key_id = (known after apply)
+ server_side_encryption = "AES256"
+ source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/js/main.cd9f7550.js"
+ source_hash = "ef8e3dbf86f20f526550f9bfb58a6ec6"
+ storage_class = (known after apply)
+ tags_all = {
+ "env" = "staging"
+ "management" = "terraform"
+ "owner" = "grants"
+ "repo" = "usdr-gost"
+ "service" = "gost"
+ "usage" = "workload"
}
+ version_id = (known after apply)
}
# module.website.aws_s3_object.origin_dist_artifact["js/main.cd9f7550.js.map"] will be created
+ resource "aws_s3_object" "origin_dist_artifact" {
+ acl = "private"
+ bucket = "gost-staging-origin-357150818708-us-west-2-website"
+ bucket_key_enabled = (known after apply)
+ content_type = "application/json"
+ etag = "cc4ab004b5075a2087d4891e717cb316"
+ force_destroy = false
+ id = (known after apply)
+ key = "dist/js/main.cd9f7550.js.map"
+ kms_key_id = (known after apply)
+ server_side_encryption = "AES256"
+ source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/js/main.cd9f7550.js.map"
+ source_hash = "cc4ab004b5075a2087d4891e717cb316"
+ storage_class = (known after apply)
+ tags_all = {
+ "env" = "staging"
+ "management" = "terraform"
+ "owner" = "grants"
+ "repo" = "usdr-gost"
+ "service" = "gost"
+ "usage" = "workload"
}
+ version_id = (known after apply)
}
# module.website.aws_s3_object.origin_dist_artifact["js/main.dbc50207.js"] will be destroyed
# (because key ["js/main.dbc50207.js"] is not in for_each map)
- resource "aws_s3_object" "origin_dist_artifact" {
- acl = "private" -> null
- bucket = "gost-staging-origin-357150818708-us-west-2-website" -> null
- bucket_key_enabled = false -> null
- content_type = "text/javascript" -> null
- etag = "37d74ec61567562a0f5f2c8ee930c93d" -> null
- force_destroy = false -> null
- id = "dist/js/main.dbc50207.js" -> null
- key = "dist/js/main.dbc50207.js" -> null
- metadata = {} -> null
- server_side_encryption = "AES256" -> null
- source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/js/main.dbc50207.js" -> null
- source_hash = "37d74ec61567562a0f5f2c8ee930c93d" -> null
- storage_class = "STANDARD" -> null
- tags = {} -> null
- tags_all = {
- "env" = "staging"
- "management" = "terraform"
- "owner" = "grants"
- "repo" = "usdr-gost"
- "service" = "gost"
- "usage" = "workload"
} -> null
- version_id = "Mxc5sKR5Vh9JmAnoyLAV_WlSsYOm5e9R" -> null
}
# module.website.aws_s3_object.origin_dist_artifact["js/main.dbc50207.js.map"] will be destroyed
# (because key ["js/main.dbc50207.js.map"] is not in for_each map)
- resource "aws_s3_object" "origin_dist_artifact" {
- acl = "private" -> null
- bucket = "gost-staging-origin-357150818708-us-west-2-website" -> null
- bucket_key_enabled = false -> null
- content_type = "application/json" -> null
- etag = "0105913f1c7648d7d7c0dadb58a5f379" -> null
- force_destroy = false -> null
- id = "dist/js/main.dbc50207.js.map" -> null
- key = "dist/js/main.dbc50207.js.map" -> null
- metadata = {} -> null
- server_side_encryption = "AES256" -> null
- source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/js/main.dbc50207.js.map" -> null
- source_hash = "0105913f1c7648d7d7c0dadb58a5f379" -> null
- storage_class = "STANDARD" -> null
- tags = {} -> null
- tags_all = {
- "env" = "staging"
- "management" = "terraform"
- "owner" = "grants"
- "repo" = "usdr-gost"
- "service" = "gost"
- "usage" = "workload"
} -> null
- version_id = "rwkyEY2MT2UlV.3daz5t1XL_WKr2MXlZ" -> null
}
Plan: 7 to add, 7 to change, 7 to destroy. Pusher: @jeffsmohan, Action: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment/question.
@@ -34,7 +34,7 @@ Vue.use(BootstrapVue); | |||
Vue.use(IconsPlugin); | |||
Vue.use(Vuelidate); | |||
Vue.use(VueRouter); | |||
Vue.component('v-select', vSelect); | |||
Vue.component('VSelect', vSelect); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was surprised that this worked without updating all the places where <v-select>
is used, until I read this - https://v2.vuejs.org/v2/guide/components-registration#Name-Casing. But it's still confusing maybe? Is there another PR where the <v-select>
usages are updated to <VSelect>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good question! I meant to leave a note to this effect on the PR but forgot when writing it up.
As you saw at the link you pointed to, when a component is defined in PascalCase, you can reference it in either PascalCase or kebab-case in templates. That's why the change on this line didn't require the usages of v-select
in templates across the site to change.
Do we want to enforce consistency here? I suppose it's arguable whether this falls under (a) "that's confusing, why is the name different?" or (b) "that's just how Vue works". But for my part, I tend to prefer consistency whenever possible (and especially when easy to enforce).
There's a lint rule available to do this — vue/component-name-in-template-casing
— but apparently it's not included in the recommended set we adopted. So we have a couple options:
- We can add this rule to the linting migration before we go further down the implementation road.
- We could simply update existing v-select usages to match the VSelect casing, but skip enforcing anything with lint rules and accept that it might over time lose consistency.
- We could accept the status quo that Vue allows for either. (For example, we currently use most or all VueBootstrap components using kebab-casing.)
When I was talking with @TylerHendrickson about how to approach this migration, we went with the vue/recommended ruleset because it seemed like an easy way to adopt a community standard, but I'd personally be very open to going beyond and adding our own rules where it makes sense. And certainly including all the lint rules we want in a single migration project like https://github.com/usdigitalresponse/usdr-gost/milestone/21 is easier than kicking off another one later.
If we wanted to make a quick pass on other lint rules to add, I can evaluate the uncategorized vue linting rules and come up with a list of appealing ones. (For that matter, we could also take this opportunity to review how much of the @vue/airbnb
base ruleset is helpful, and whether there are other eslint rules beyond vue ones that we want to add. But that all really amps up the scope of the project.)
Sorry for the essay, but what are your thoughts on a good path forward @sanason @TylerHendrickson ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's perfectly fine if there's a desire to adopt additional standard conventions that go beyond vue/recommended
. IMO the best path forward would be to document the proposed set of additional linting rules as an ADR in a pull request. That would give everyone a chance to review the proposal(s) and potentially weigh in with opinions on what should ultimately be accepted or rejected, which helps ensure that there's group accountability for the decision.
For my part, a few details I think would be useful for this ADR to include:
- Rationale/justification that makes clear the perceived benefit/detriment of (not) adopting each given rule.
- Whether any rules are not generally auto-fixable by eslint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I may be able to take that on sometime soon, but that's obviously a bigger undertaking.
To unstick this ticket, I think I'd propose that we go with my option 3 above for now ("accept the status quo that Vue allows for either"). That is to say, unless and until we adopt stricter linting rules on the topic, we'll allow PascalCase or kebab-case for Vue components in templates, and expect devs to know and understand that they're interchangeable.
@sanason Thanks for raising a good question! After talking it through, I think my proposal would be to punt on solving it, unfortunately — see the comment thread above. Merged main and fixed a couple conflicts. Please re-review when you get a chance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Ticket #2767
Description
Brings the grants table vue files into compliance with new linting rules.
A few notes for the reviewer:
Screenshots / Demo Video
Testing
Confirmed that basic layout behavior remains unaffected by the change.
Automated and Unit Tests
Manual tests for Reviewer
Checklist