Created
January 28, 2025 19:30
-
-
Save frontandrews/8dd22277439f6e71abfeab56c69ed6e8 to your computer and use it in GitHub Desktop.
Eslint config with cypress and vitest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pluginVue from 'eslint-plugin-vue'; | |
import vueTsEslintConfig from '@vue/eslint-config-typescript'; | |
import tsEslint from 'typescript-eslint' | |
import pluginVitest from '@vitest/eslint-plugin'; | |
import pluginCypress from 'eslint-plugin-cypress/flat'; | |
export default [ | |
{ | |
name: 'app/files-to-lint', | |
files: ['**/*.{ts,mts,tsx,vue}'], | |
}, | |
{ | |
name: 'app/files-to-ignore', | |
ignores: ['**/build/**', '**/coverage/**', '.yarn/**', '**/*.spec.ts', '.cache/**','.cache/Cypress/**'], | |
}, | |
{ | |
files: ['**/*.{ts,tsx,vue}'], | |
languageOptions: { | |
parser: tsEslint.parser, | |
}, | |
}, | |
...pluginVue.configs['flat/recommended'], | |
...vueTsEslintConfig(), | |
{ | |
...pluginVitest.configs.recommended, | |
files: ['__tests__/*'], | |
}, | |
{ | |
...pluginCypress.configs.recommended, | |
files: [ | |
'cypress/xxxx/**/*.{cy,spec}.{js,ts,jsx,tsx}', | |
], | |
}, | |
{ | |
rules: { | |
// Custom rules | |
}, | |
}, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment