Skip to content

Commit cb9a52f

Browse files
authored
Merge branch 'master' into reafactor/regexp-group
2 parents 2dedddb + 78dc77b commit cb9a52f

29 files changed

+221
-184
lines changed

.changeset/smooth-jokes-eat.md

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

.changeset/tangy-eagles-start.md

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

.changeset/true-oranges-heal.md

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

.github/workflows/CI.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
node-version: ${{ matrix.node }}
4848
- name: Install Packages
49-
run: npm install -f
49+
run: npm install
5050
- name: Install ESLint v${{ matrix.eslint }}
5151
run: npm install --save-dev eslint@${{ matrix.eslint }} -f
5252
- name: Test
@@ -61,8 +61,23 @@ jobs:
6161
- name: Install Node.js
6262
uses: actions/setup-node@v4
6363
- name: Install Packages
64-
run: npm install -f
64+
run: npm install
6565
- name: Uninstall @stylistic/eslint-plugin
6666
run: npm uninstall -D @stylistic/eslint-plugin
6767
- name: Test
6868
run: npm test
69+
70+
test-with-typescript-eslint-v7:
71+
name: Test with typescript-eslint v7
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@v4
76+
- name: Install Node.js
77+
uses: actions/setup-node@v4
78+
- name: Install Packages
79+
run: npm install
80+
- name: Install @typescript-eslint/parser@7
81+
run: npm install -D @typescript-eslint/parser@7 -f
82+
- name: Test
83+
run: npm test

.github/workflows/Release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Node.js
2323
uses: actions/setup-node@v4
2424
- name: Install Dependencies
25-
run: npm install -f
25+
run: npm install
2626

2727
- name: Create Release Pull Request or Publish to npm
2828
id: changesets

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
yarn.lock
99
yarn-error.log
1010
/docs/.vitepress/dist
11-
/docs/.vitepress/build-system/shim/eslint.mjs
12-
/docs/.vitepress/build-system/shim/assert.mjs
11+
/docs/.vitepress/build-system/shim/vue-eslint-parser.mjs
12+
/docs/.vitepress/build-system/shim/@typescript-eslint/parser.mjs
1313
/docs/.vitepress/.temp
1414
/docs/.vitepress/cache
1515
typings/eslint/lib/rules
16+
eslint-typegen.d.ts

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# eslint-plugin-vue
22

3+
## 10.3.0
4+
5+
### Minor Changes
6+
7+
- Added [`@typescript-eslint/parser`](https://typescript-eslint.io/packages/parser) as an optional peer dependency ([#2775](https://github.com/vuejs/eslint-plugin-vue/pull/2775))
8+
9+
- Add TypeScript IntelliSense support via [eslint-typegen](https://github.com/antfu/eslint-typegen) ([#2770](https://github.com/vuejs/eslint-plugin-vue/pull/2770))
10+
11+
- [`vue/no-deprecated-slot-attribute`](https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html) `ignore` option now supports regex patterns ([#2773](https://github.com/vuejs/eslint-plugin-vue/pull/2773))
12+
13+
### Patch Changes
14+
15+
- Fixed false negatives when using typescript-eslint v8 in [`vue/script-indent`](https://eslint.vuejs.org/rules/script-indent.html) rule ([#2775](https://github.com/vuejs/eslint-plugin-vue/pull/2775))
16+
17+
- Update resources ([#2752](https://github.com/vuejs/eslint-plugin-vue/pull/2752))
18+
19+
- [`vue/no-restricted-html-elements`](https://eslint.vuejs.org/rules/no-restricted-html-elements.html) now also checks SVG and MathML elements ([#2755](https://github.com/vuejs/eslint-plugin-vue/pull/2755))
20+
321
## 10.2.0
422

523
### Minor Changes

docs/.vitepress/build-system/build.mts

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,38 @@ import { fileURLToPath } from 'url'
99
const dirname = path.dirname(fileURLToPath(import.meta.url))
1010

1111
build(
12-
path.join(dirname, './src/eslint.mjs'),
13-
path.join(dirname, './shim/eslint.mjs'),
14-
['path', 'assert', 'util', 'esquery']
12+
path.join(
13+
dirname,
14+
'../../../node_modules/@typescript-eslint/parser/dist/index.js'
15+
),
16+
path.join(dirname, './shim/@typescript-eslint/parser.mjs'),
17+
[
18+
'util',
19+
'node:util',
20+
'path',
21+
'node:path',
22+
'fs',
23+
'node:fs',
24+
'semver',
25+
'fast-glob',
26+
'debug'
27+
]
1528
)
29+
1630
build(
17-
path.join(dirname, '../../../node_modules/assert'),
18-
path.join(dirname, './shim/assert.mjs'),
19-
['path']
31+
path.join(dirname, '../../../node_modules/vue-eslint-parser/index.js'),
32+
path.join(dirname, './shim/vue-eslint-parser.mjs'),
33+
[
34+
'path',
35+
'debug',
36+
'semver',
37+
'assert',
38+
'module',
39+
'events',
40+
'esquery',
41+
'fs',
42+
'eslint'
43+
]
2044
)
2145

2246
function build(input: string, out: string, injects: string[] = []) {
@@ -42,16 +66,22 @@ function bundle(entryPoint: string, externals: string[]) {
4266
}
4367

4468
function transform(code: string, injects: string[]) {
69+
const normalizeInjects = [
70+
...new Set(injects.map((inject) => inject.replace(/^node:/u, '')))
71+
]
4572
const newCode = code.replace(/"[a-z]+" = "[a-z]+";/u, '')
4673
return `
47-
${injects
74+
${normalizeInjects
4875
.map(
4976
(inject) =>
50-
`import $inject_${inject.replace(/-/gu, '_')}$ from '${inject}';`
77+
`import $inject_${inject.replace(/[\-:]/gu, '_')}$ from '${inject}';`
5178
)
5279
.join('\n')}
5380
const $_injects_$ = {${injects
54-
.map((inject) => `${inject.replace(/-/gu, '_')}:$inject_${inject}$`)
81+
.map(
82+
(inject) =>
83+
`"${inject}":$inject_${inject.replace(/^node:/u, '').replace(/[\-:]/gu, '_')}$`
84+
)
5585
.join(',\n')}};
5686
function require(module, ...args) {
5787
return $_injects_$[module] || {}

docs/.vitepress/build-system/shim/eslint/use-at-your-own-risk.mjs

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

docs/.vitepress/build-system/shim/esquery.mjs

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

docs/.vitepress/build-system/shim/path.mjs

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

docs/.vitepress/build-system/src/eslint.mjs

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

docs/.vitepress/config.mts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineConfig } from 'vitepress'
33
import path from 'pathe'
44
import { fileURLToPath } from 'url'
55
import { viteCommonjs, vitePluginRequireResolve } from './vite-plugin.mjs'
6+
import eslint4b, { requireESLintUseAtYourOwnRisk4b } from 'vite-plugin-eslint4b'
67

78
// Pre-build cjs packages that cannot be bundled well.
89
import './build-system/build.mjs'
@@ -142,24 +143,30 @@ export default async () => {
142143

143144
vite: {
144145
publicDir: path.resolve(dirname, './public'),
145-
plugins: [vitePluginRequireResolve(), viteCommonjs()],
146+
plugins: [
147+
vitePluginRequireResolve(),
148+
viteCommonjs(),
149+
eslint4b() as any,
150+
requireESLintUseAtYourOwnRisk4b()
151+
],
146152
resolve: {
147153
alias: {
148-
'eslint/use-at-your-own-risk': path.join(
154+
'vue-eslint-parser': path.join(
155+
dirname,
156+
'./build-system/shim/vue-eslint-parser.mjs'
157+
),
158+
'@typescript-eslint/parser': path.join(
149159
dirname,
150-
'./build-system/shim/eslint/use-at-your-own-risk.mjs'
160+
'./build-system/shim/@typescript-eslint/parser.mjs'
151161
),
152-
eslint: path.join(dirname, './build-system/shim/eslint.mjs'),
153-
assert: path.join(dirname, './build-system/shim/assert.mjs'),
154-
path: path.join(dirname, './build-system/shim/path.mjs'),
155162

156163
tslib: path.join(dirname, '../../node_modules/tslib/tslib.es6.js'),
157-
esquery: path.join(dirname, './build-system/shim/esquery.mjs'),
158-
globby: path.join(dirname, './build-system/shim/globby.mjs')
164+
globby: path.join(dirname, './build-system/shim/empty.mjs'),
165+
'fast-glob': path.join(dirname, './build-system/shim/empty.mjs'),
166+
module: path.join(dirname, './build-system/shim/empty.mjs')
159167
}
160168
},
161169
define: {
162-
'process.env.NODE_DEBUG': 'false',
163170
'require.cache': '{}'
164171
}
165172
},

0 commit comments

Comments
 (0)