Skip to content
21 changes: 12 additions & 9 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This is the main configuration file for ESLint. It is a JavaScript file that exports an ESLint configuration object.
// https://eslint.org/docs/user-guide/configuring
import pluginVue from 'eslint-plugin-vue'
import pluginCypress from 'eslint-plugin-cypress'
import js from '@eslint/js'
import globals from 'globals'
import eslintConfigPrettier from 'eslint-config-prettier'
Expand All @@ -11,9 +12,15 @@ export default defineConfig([
js.configs.recommended,
eslintConfigPrettier,
{
files: ['**/*.js,**/*.vue,**/*.cjs'],
// removed rules that seem to have no effect
rules: {},
files: ['tests/e2e/**/*.js'],
extends: [pluginCypress.configs.recommended],
rules: {
'cypress/no-unnecessary-waiting': 'off',
},
},
{
files: ['tests/e2e/**/*.js'],
extends: [pluginCypress.configs.globals],
},
{
ignores: ['dist/**/*.js', 'docs/**/*.js', 'documentation/**/*.js'],
Expand All @@ -24,14 +31,10 @@ export default defineConfig([
sourceType: 'module',
globals: {
...globals.node,
// TODO: we are using vitest and there is a plugin e.g. it, expect, describe
...globals.jest,
// e.g. it, expect, describe
...globals.vitest,
// e.g. document, alert, window
...globals.browser,
// Global vitest and Cypress variables so they don't violate no-undef
vi: 'readonly',
cy: 'readonly',
Cypress: 'readonly',
},
},
},
Expand Down
Loading