Skip to content

Commit 7f7f942

Browse files
committed
Update dependencies.
Update eslint config.
1 parent 462612d commit 7f7f942

13 files changed

+947
-973
lines changed

.yarnrc.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

eslint.config.js

Lines changed: 59 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,92 @@
1-
import eslint from '@eslint/js';
2-
import tseslint from 'typescript-eslint';
3-
import eslintConfigPrettier from 'eslint-config-prettier';
1+
import configPrettier from '@vue/eslint-config-prettier';
2+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
43

54
import pluginImport from 'eslint-plugin-import';
6-
import pluginTsdoc from 'eslint-plugin-tsdoc';
7-
//import pluginVue from 'eslint-plugin-vue';
5+
import pluginVue from 'eslint-plugin-vue';
6+
import pluginVueA11y from 'eslint-plugin-vuejs-accessibility';
7+
8+
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
9+
// import { configureVueProject } from '@vue/eslint-config-typescript'
10+
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
11+
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
12+
813
/**
914
* ESLint Config
1015
*/
11-
// @ts-check
12-
export default tseslint.config(
16+
export default defineConfigWithVueTs(
17+
{
18+
name: 'app/files-to-lint',
19+
files: ['**/*.{ts,mts,tsx,vue}']
20+
},
1321
{
22+
name: 'app/files-to-ignore',
1423
ignores: [
1524
'.vscode/',
1625
'.yarn/',
17-
'dist/',
18-
'docs/',
19-
'public/',
20-
'src/** /*.generated.*',
26+
'**/dist/**',
27+
'**/dist-ssr/**',
28+
'**/coverage/**',
2129
'eslint.config.js',
22-
],
30+
'pnpm-lock.yaml',
31+
'playwright-report',
32+
'test-results',
33+
'public/',
34+
'src/**/*.generated.*'
35+
]
2336
},
24-
eslint.configs.recommended,
25-
...tseslint.configs.recommended,
26-
...tseslint.configs.stylistic,
37+
pluginVue.configs['flat/recommended'],
38+
...pluginVueA11y.configs['flat/recommended'],
39+
vueTsConfigs.recommended,
2740
{
28-
languageOptions: {
29-
parserOptions: {
30-
project: [
31-
'tsconfig.app.json',
32-
'tsconfig.node.json',
33-
'tsconfig.docs.json',
34-
],
35-
tsconfigRootDir: import.meta.dirname,
36-
extraFileExtensions: ['.vue'],
37-
ecmaVersion: 'latest',
38-
sourceType: 'module',
39-
},
40-
},
4141
plugins: {
42-
import: pluginImport,
43-
tsdoc: pluginTsdoc,
44-
//vue: pluginVue,
42+
import: pluginImport
4543
},
44+
4645
settings: {
4746
// This will do the trick
4847
'import/parsers': {
4948
espree: ['.js', '.cjs', '.mjs', '.jsx'],
5049
'@typescript-eslint/parser': ['.ts', '.tsx'],
51-
'vue-eslint-parser': ['.vue'],
50+
'vue-eslint-parser': ['.vue']
5251
},
5352
'import/resolver': {
5453
typescript: true,
5554
node: true,
56-
alias: {
57-
map: [
58-
['@', './src'],
59-
['~', './node_modules'],
60-
['vue-codemirror6', './src'],
61-
],
62-
extensions: ['.js', '.ts', '.jsx', '.tsx', '.vue'],
63-
},
55+
'eslint-import-resolver-custom-alias': {
56+
alias: {
57+
'@': './src',
58+
'~': './node_modules'
59+
},
60+
extensions: ['.js', '.ts', '.jsx', '.tsx', '.vue']
61+
}
6462
},
6563
vite: {
66-
configPath: './vite.config.ts',
67-
},
64+
configPath: './vite.config.ts'
65+
}
6866
},
6967
rules: {
70-
'@typescript-eslint/consistent-type-imports': 'error',
71-
'@typescript-eslint/no-import-type-side-effects': 'error',
7268
// ...importPlugin.configs["recommended"].rules,
7369
'no-unused-vars': 'warn',
7470
// const lines: string[] = []; style
7571
'@typescript-eslint/array-type': [
7672
'error',
7773
{
78-
default: 'array',
79-
},
74+
default: 'array'
75+
}
8076
],
8177
// Enable @ts-ignore etc.
8278
'@typescript-eslint/ban-ts-comment': 'off',
8379
// Left-hand side style
84-
'@typescript-eslint/consistent-generic-constructors': [
85-
'error',
86-
'type-annotation',
87-
],
80+
'@typescript-eslint/consistent-generic-constructors': ['error', 'type-annotation'],
8881
// Enable import sort order, see bellow.
8982
'@typescript-eslint/consistent-type-imports': [
9083
'off',
9184
{
92-
prefer: 'type-imports',
93-
},
85+
prefer: 'type-imports'
86+
}
9487
],
9588
// Fix for pinia
9689
'@typescript-eslint/explicit-function-return-type': 'off',
97-
// Allow short land for pretter
98-
'@typescript-eslint/no-confusing-void-expression': [
99-
'error',
100-
{
101-
ignoreArrowShorthand: true,
102-
},
103-
],
10490
'@typescript-eslint/no-explicit-any': 'off',
10591
'@typescript-eslint/no-unused-vars': 'off',
10692
// Fix for vite import.meta.env
@@ -116,55 +102,41 @@ export default tseslint.config(
116102
'import/order': [
117103
'error',
118104
{
119-
groups: [
120-
'builtin',
121-
'external',
122-
'parent',
123-
'sibling',
124-
'index',
125-
'object',
126-
'type',
127-
],
105+
groups: ['builtin', 'external', 'parent', 'sibling', 'index', 'object', 'type'],
128106
pathGroups: [
129107
// Vue Core
130108
{
131109
pattern:
132-
'{vue,vue-router,vuex,@/stores,vue-i18n,pinia,vite,vitest,vitest/**,@vitejs/**,@vue/**}',
110+
'{vue,vue-router,vuex,@/store,vue-i18n,pinia,vite,vitest,vitest/**,@vitejs/**,@vue/**}',
133111
group: 'external',
134-
position: 'before',
112+
position: 'before'
135113
},
136114
// Internal Codes
137115
{
138116
pattern: '{@/**}',
139117
group: 'internal',
140-
position: 'before',
141-
},
118+
position: 'before'
119+
}
142120
],
143121
pathGroupsExcludedImportTypes: ['builtin'],
144122
alphabetize: {
145-
order: 'asc',
123+
order: 'asc'
146124
},
147-
'newlines-between': 'always',
148-
},
125+
'newlines-between': 'always'
126+
}
149127
],
150-
'tsdoc/syntax': 'warn',
151-
/*
152128
// A tag with no content should be written like <br />.
153129
'vue/html-self-closing': [
154130
'error',
155131
{
156132
html: {
157-
void: 'always',
158-
},
159-
},
133+
void: 'always'
134+
}
135+
}
160136
],
161137
// Mitigate non-multiword component name errors to warnings.
162-
'vue/multi-word-component-names': 'warn',
163-
// for Vuetify Labs Fix (v-data-tables etc.)
164-
'vuetify/no-deprecated-components': 'warn',
165-
*/
166-
},
138+
'vue/multi-word-component-names': 'warn'
139+
}
167140
},
168-
// ...pluginVue.configs['flat/recommended'],
169-
eslintConfigPrettier
141+
configPrettier
170142
);

package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json.schemastore.org/package.json",
33
"name": "vue-codemirror6",
4-
"version": "1.3.10",
4+
"version": "1.3.11",
55
"license": "MIT",
66
"description": "CodeMirror6 Component for vue2 and vue3.",
77
"keywords": [
@@ -56,7 +56,7 @@
5656
"engines": {
5757
"pnpm": ">=9.15.0"
5858
},
59-
"packageManager": "pnpm@9.15.3",
59+
"packageManager": "pnpm@10.3.0",
6060
"sideEffects": false,
6161
"scripts": {
6262
"dev": "vite",
@@ -76,8 +76,8 @@
7676
"@codemirror/commands": "^6.8.0",
7777
"@codemirror/language": "^6.10.8",
7878
"@codemirror/lint": "^6.8.4",
79-
"@codemirror/state": "^6.5.0",
80-
"@codemirror/view": "^6.36.1",
79+
"@codemirror/state": "^6.5.2",
80+
"@codemirror/view": "^6.36.2",
8181
"codemirror": "^6.0.1",
8282
"style-mod": "^4.1.2",
8383
"vue-demi": "latest"
@@ -86,45 +86,45 @@
8686
"vue": "^2.7.14 || ^3.4"
8787
},
8888
"devDependencies": {
89-
"@codemirror/autocomplete": "^6.18.4",
90-
"@codemirror/lang-javascript": "^6.2.2",
89+
"@codemirror/autocomplete": "^6.18.5",
90+
"@codemirror/lang-javascript": "^6.2.3",
9191
"@codemirror/lang-json": "^6.0.1",
92-
"@codemirror/lang-markdown": "^6.3.1",
92+
"@codemirror/lang-markdown": "^6.3.2",
9393
"@codemirror/lang-vue": "^0.1.3",
94-
"@codemirror/search": "^6.5.8",
95-
"@eslint/js": "^9.17.0",
94+
"@codemirror/search": "^6.5.9",
9695
"@tsconfig/node-lts": "^22.0.1",
97-
"@types/node": "^22.10.5",
98-
"@typescript-eslint/eslint-plugin": "^8.19.1",
96+
"@types/node": "^22.13.1",
9997
"@vitejs/plugin-vue": "^5.2.1",
10098
"@vue/compiler-sfc": "^3.5.13",
101-
"@vue/eslint-config-prettier": "^10.1.0",
99+
"@vue/eslint-config-prettier": "^10.2.0",
100+
"@vue/eslint-config-typescript": "^14.4.0",
101+
"@vue/test-utils": "^2.4.6",
102102
"@vue/tsconfig": "^0.7.0",
103-
"@vueuse/core": "^12.3.0",
103+
"@vueuse/core": "^12.5.0",
104104
"bootstrap": "^5.3.3",
105-
"eslint": "^9.17.0",
106-
"eslint-import-resolver-alias": "^1.1.2",
105+
"eslint": "^9.20.1",
106+
"eslint-import-resolver-custom-alias": "^1.3.2",
107107
"eslint-import-resolver-typescript": "^3.7.0",
108-
"eslint-linter-browserify": "^9.17.0",
108+
"eslint-linter-browserify": "^9.20.1",
109109
"eslint-plugin-import": "^2.31.0",
110-
"eslint-plugin-tsdoc": "^0.4.0",
110+
"eslint-plugin-playwright": "^2.2.0",
111111
"eslint-plugin-vue": "^9.32.0",
112112
"eslint-plugin-vuejs-accessibility": "^2.4.1",
113-
"eslint-plugin-yaml": "^1.0.3",
114113
"husky": "^9.1.7",
115-
"lint-staged": "^15.3.0",
114+
"jiti": "^2.4.2",
115+
"lint-staged": "^15.4.3",
116116
"npm-run-all": "^4.1.5",
117-
"prettier": "^3.4.2",
117+
"prettier": "^3.5.0",
118118
"rimraf": "^6.0.1",
119119
"rollup-plugin-visualizer": "^5.14.0",
120-
"sass": "^1.83.1",
120+
"sass": "^1.84.0",
121121
"supports-color": "^10.0.0",
122122
"typescript": "^5.7.3",
123-
"typescript-eslint": "^8.19.1",
124-
"vite": "^6.0.7",
123+
"typescript-eslint": "^8.24.0",
124+
"vite": "^6.1.0",
125125
"vite-plugin-banner": "^0.8.0",
126126
"vite-plugin-checker": "^0.8.0",
127-
"vite-plugin-dts": "^4.4.0",
127+
"vite-plugin-dts": "^4.5.0",
128128
"vue": "^3.5.13",
129129
"vue-eslint-parser": "^9.4.3",
130130
"vue-markdown-wasm": "^0.5.1",
@@ -143,4 +143,4 @@
143143
"json5": ">=2.2.3",
144144
"yaml": ">=2.6.0"
145145
}
146-
}
146+
}

0 commit comments

Comments
 (0)