Skip to content

Commit

Permalink
chore: use eslint v9 with flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
cexbrayat committed Aug 2, 2024
1 parent c1d0ffd commit 2f19fdf
Show file tree
Hide file tree
Showing 21 changed files with 196 additions and 235 deletions.
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

0 comments on commit 2f19fdf

Please sign in to comment.