Skip to content

Commit

Permalink
fix: fix eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
Uninen committed Oct 24, 2024
1 parent 945927d commit 39bbaf0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 119 deletions.
100 changes: 0 additions & 100 deletions .eslintrc-auto-import.json

This file was deleted.

11 changes: 3 additions & 8 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import vueTsEslintConfig from '@vue/eslint-config-typescript'
import pluginPlaywright from 'eslint-plugin-playwright'
import security from 'eslint-plugin-security'
import pluginVue from 'eslint-plugin-vue'
import autoImportGlobals from './.eslintrc-auto-import.json' assert { type: 'json' }
// import autoImportGlobals from './.eslintrc-auto-import.json' with { type: 'json' }

export default [
{
Expand All @@ -14,7 +14,7 @@ export default [

{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/test-results/**'],
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/test-results/**', '*.config.*'],
},

{
Expand All @@ -27,12 +27,7 @@ export default [
'id-length': [2, { exceptions: ['i', 'j', '_'] }],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_' }],
},
},

{
languageOptions: {
globals: autoImportGlobals.globals,
},
// languageOptions: autoImportGlobals,
},

...pluginVue.configs['flat/recommended'],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test-e2e": "playwright test --headed",
"test:ci": "vitest run --coverage",
"test:ci-e2e": "playwright test",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"lint": "eslint . --fix",
"type-check": "vue-tsc --build --force"
},
"dependencies": {
Expand Down
12 changes: 5 additions & 7 deletions tests/e2e/scrollbars.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import { expect, test } from '@playwright/test'
test('homepage should not have scrollbars', async ({ page }) => {
await page.goto('/')

const html = await page.$('html')
if (html) {
const scrollWidth = Number(await html.getAttribute('scrollWidth'))
const clientWidth = Number(await html.getAttribute('clientWidth'))
const scrollBarWidth = scrollWidth - clientWidth
const html = page.locator('html')
const scrollWidth = Number(await html.getAttribute('scrollWidth'))
const clientWidth = Number(await html.getAttribute('clientWidth'))
const scrollBarWidth = scrollWidth - clientWidth

expect(scrollBarWidth).toBe(0)
}
expect(scrollBarWidth).toBe(0)
})
3 changes: 0 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ export default defineConfig({
],
dts: 'auto-imports.d.ts',
vueTemplate: true,
eslintrc: {
enabled: true,
},
}),
Components({
dts: 'components.d.ts',
Expand Down

0 comments on commit 39bbaf0

Please sign in to comment.