Closed UglyHobbitFeet closed 1 month ago
@UglyHobbitFeet
I was not able to run your configuration successfully.
The following alternative configuration works when run against https://github.com/cypress-io/cypress-component-testing-apps/tree/main/vue3-vite-ts (and reports genuine linting errors). This may help you, however it is out-of-scope to provide individual configuration support here in this issue list. I should also say that I'm not familiar with typescript-eslint
. I just used the documentation.
// @ts-check
import globals from 'globals'
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint'
import pluginCypress from 'eslint-plugin-cypress/flat'
export default [
eslint.configs.recommended,
pluginCypress.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
globals: {
...globals.node
},
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
}
}
]
If you think you have found a bug in eslint-plugin-cypress
we would really need a full reproducible example.
The ESLint organization also hosts a Discord server where you can ask for help with configurations.
BTW: @vue/eslint-config-typescript@13.0.0, which you list in your package.json
, is not compatible with ESLint v9 / flat config. You would need to be using @vue/eslint-config-typescript@14.0.0.
Thanks for looking into this and providing an example. I have used your config and updated deps and it seems to compile without the original errors!
When I run eslint I get the Parsing Error: 'Unexpected Token' when including pluginCypress. When I remove pluginCypress the error goes away. Please let me know if it's something obvious or if I need to post another config file (tsconfig.json, vite.config.mts, cypress.config.ts, etc). Thanks!
package.json (eslint deps)
eslint.config.mjs