Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use eslint v9 with flat config #2488

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .eslintrc.js

This file was deleted.

30 changes: 30 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'

export default [
{
ignores: ['docs/.vitepress', 'coverage', 'dist']
},
...tseslint.config({
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
prettierPluginRecommended
],
rules: {
'prettier/prettier': ['error'],
'no-restricted-imports': [
'error',
{
patterns: ['src/*']
}
],

// Currently, disabled to avoid a lot of changes during migration
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-ts-comment': 'off'
}
})
]
1 change: 1 addition & 0 deletions examples/TodoApp.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* yarn build. Then you can run this with `yarn test examples`
*/
import { mount } from '../dist/vue-test-utils.cjs.js'
import { test, expect } from 'vitest'

import TodoApp from './TodoApp.vue'

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@vue/compiler-dom": "3.4.35",
"@vue/compiler-sfc": "3.4.35",
"@vue/server-renderer": "3.4.35",
"eslint": "8.57.0",
"eslint": "9.8.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.2.1",
"husky": "9.1.4",
Expand Down Expand Up @@ -77,7 +77,7 @@
"tsd": "tsc -p test-dts/tsconfig.tsd.json",
"build": "rollup -c rollup.config.ts --bundleConfigAsCjs",
"prepare": "rollup -c rollup.config.ts --bundleConfigAsCjs",
"lint": "eslint --ext .ts src/ tests/",
"lint": "eslint .",
"lint:fix": "pnpm run lint --fix",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
Expand Down
Loading