Skip to content
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

eslint warnings don't fail the pre-commit hook or CI #172

Open
jacobtylerwalls opened this issue Jan 3, 2025 · 0 comments
Open

eslint warnings don't fail the pre-commit hook or CI #172

jacobtylerwalls opened this issue Jan 3, 2025 · 0 comments

Comments

@jacobtylerwalls
Copy link
Member

eslint warnings (vs. errors) don't fail the build or CI. I think it would be better to either silence messages we don't care about or elevate them to errors, otherwise they'll just accumulate.

Our eslint config pulls in some rules configured at the warning level, here:

...pluginVue.configs['flat/recommended'],

If you elevate one of them to an error, you get a bunch of fixes generated by the pre-commit hook. (I've also tinkered with this particular option following this instruction for prettier compat.)

diff --git a/eslint.config.mjs b/eslint.config.mjs
index ab51240..130a4ee 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -38,6 +38,9 @@ export default [
         },
         "rules": {
             "semi": ["error", "always"],
+            "vue/html-self-closing": [
+                "error", { "html": { "void": "any" } }
+            ],
         },
     },
 ];

I'll PR the fixes so you can see it.


But we already have some other warnings in the build if you npm run eslint:check:

/Users/.../prj/arches-lingo/arches_lingo/src/arches_lingo/components/generic/resource-instance-relationships/ResourceInstanceRelationshipsEditor.vue
  11:9  warning  Prop 'val' requires default value to be set  vue/require-default-prop

 1 problem (0 errors, 1 warning)

☝️ seems like something would have been nice to address at the source

/cc @chrabyrd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant