Utilizing the Vue CLI, I developed a Vue3 app with a Prettier/Eslint configuration. Upon making changes to the main.ts file as shown below:
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
createApp(App)
.use(router).mount("#app");
and running npm run serve
, a warning is displayed:
6:15 warning Delete
⏎
prettier/prettier
This behavior is expected. Running npm run lint
resolves the issue. But how can I check for style violations only?
I have a GitHub action workflow in place to validate code style and using npm run lint
is inadequate because the workflow fixes any issues it encounters.
In my search for a solution, I executed npx vue-cli-service help lint
which suggested using --no-fix
.
https://i.sstatic.net/sKNMy.png
However, even after running npm run lint --no-fix
, the file still gets auto-fixed.
https://i.sstatic.net/cr874.png
So, what command should I incorporate into my GitHub action to ensure that the workflow fails upon encountering invalid code style?