Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 5f0c6e4

Browse files
committed
chore: Merge branch 'main' into minor
2 parents bb5c31e + 6d066dd commit 5f0c6e4

32 files changed

+4370
-3703
lines changed

.eslintignore

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

.eslintrc.cjs

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

.github/renovate.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{
3535
groupName: 'lint',
3636
matchPackageNames: ['simple-git-hooks', 'lint-staged'],
37-
matchPackagePrefixes: ['@typescript-eslint', 'eslint', 'prettier'],
37+
matchPackagePrefixes: ['typescript-eslint', 'eslint', 'prettier'],
3838
},
3939
],
4040
ignoreDeps: [

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [3.4.23](https://github.com/vuejs/core/compare/v3.4.22...v3.4.23) (2024-04-16)
2+
3+
4+
### Bug Fixes
5+
6+
* **runtime-core:** fix regression for $attrs tracking in slots ([6930e60](https://github.com/vuejs/core/commit/6930e60787e4905a50417190263ae7dd46cf5409)), closes [#10710](https://github.com/vuejs/core/issues/10710)
7+
* **runtime-core:** use same internal object mechanism for slots ([6df53d8](https://github.com/vuejs/core/commit/6df53d85a207986128159d88565e6e7045db2add)), closes [#10709](https://github.com/vuejs/core/issues/10709)
8+
9+
10+
111
## [3.4.22](https://github.com/vuejs/core/compare/v3.4.21...v3.4.22) (2024-04-15)
212

313

SECURITY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@ To report a vulnerability, please email security@vuejs.org.
55
While the discovery of new vulnerabilities is rare, we also recommend always using the latest versions of Vue and its official companion libraries to ensure your application remains as secure as possible.
66

77
Please note that we do not consider XSS via template expressions a valid attack vector, because it can only happen if the user intentionally uses untrusted content as template compilation source. This is similar to knowingly pasting untrusted scripts into a browser console. We explicitly warn users against using untrusted content as template compilation source in our documentation.
8+
9+
## Security Hall of Fame
10+
11+
We would like to thank the following security researchers for responsibly disclosing security issues to us.
12+
13+
- Jeet Pal - [@jeetpal2007](https://github.com/jeetpal2007) | [Email](jeetpal2007@gmail.com) | [LinkedIn](https://in.linkedin.com/in/jeet-pal-22601a290 )
14+
- Mix - [@mnixry](https://github.com/mnixry)

eslint.config.js

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
import importX from 'eslint-plugin-import-x'
2+
import tseslint from 'typescript-eslint'
3+
import vitest from 'eslint-plugin-vitest'
4+
import { builtinModules } from 'node:module'
5+
6+
const DOMGlobals = ['window', 'document']
7+
const NodeGlobals = ['module', 'require']
8+
9+
const banConstEnum = {
10+
selector: 'TSEnumDeclaration[const=true]',
11+
message:
12+
'Please use non-const enums. This project automatically inlines enums.',
13+
}
14+
15+
export default tseslint.config(
16+
{
17+
files: ['**/*.js', '**/*.ts', '**/*.tsx'],
18+
extends: [tseslint.configs.base],
19+
plugins: {
20+
'import-x': importX,
21+
},
22+
rules: {
23+
'no-debugger': 'error',
24+
'no-console': ['error', { allow: ['warn', 'error', 'info'] }],
25+
// most of the codebase are expected to be env agnostic
26+
'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
27+
28+
'no-restricted-syntax': [
29+
'error',
30+
banConstEnum,
31+
{
32+
selector: 'ObjectPattern > RestElement',
33+
message:
34+
'Our output target is ES2016, and object rest spread results in ' +
35+
'verbose helpers and should be avoided.',
36+
},
37+
{
38+
selector: 'ObjectExpression > SpreadElement',
39+
message:
40+
'esbuild transpiles object spread into very verbose inline helpers.\n' +
41+
'Please use the `extend` helper from @vue/shared instead.',
42+
},
43+
{
44+
selector: 'AwaitExpression',
45+
message:
46+
'Our output target is ES2016, so async/await syntax should be avoided.',
47+
},
48+
],
49+
'sort-imports': ['error', { ignoreDeclarationSort: true }],
50+
51+
'import-x/no-nodejs-modules': [
52+
'error',
53+
{ allow: builtinModules.map(mod => `node:${mod}`) },
54+
],
55+
// This rule enforces the preference for using '@ts-expect-error' comments in TypeScript
56+
// code to indicate intentional type errors, improving code clarity and maintainability.
57+
'@typescript-eslint/prefer-ts-expect-error': 'error',
58+
// Enforce the use of 'import type' for importing types
59+
'@typescript-eslint/consistent-type-imports': [
60+
'error',
61+
{
62+
fixStyle: 'inline-type-imports',
63+
disallowTypeAnnotations: false,
64+
},
65+
],
66+
// Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers
67+
'@typescript-eslint/no-import-type-side-effects': 'error',
68+
},
69+
},
70+
71+
// tests, no restrictions (runs in Node / Vitest with jsdom)
72+
{
73+
files: ['**/__tests__/**', 'packages/dts-test/**'],
74+
plugins: { vitest },
75+
languageOptions: {
76+
globals: {
77+
...vitest.environments.env.globals,
78+
},
79+
},
80+
rules: {
81+
'no-console': 'off',
82+
'no-restricted-globals': 'off',
83+
'no-restricted-syntax': 'off',
84+
'vitest/no-disabled-tests': 'error',
85+
'vitest/no-focused-tests': 'error',
86+
},
87+
},
88+
89+
// shared, may be used in any env
90+
{
91+
files: ['packages/shared/**', 'eslint.config.js'],
92+
rules: {
93+
'no-restricted-globals': 'off',
94+
},
95+
},
96+
97+
// Packages targeting DOM
98+
{
99+
files: ['packages/{vue,vue-compat,runtime-dom}/**'],
100+
rules: {
101+
'no-restricted-globals': ['error', ...NodeGlobals],
102+
},
103+
},
104+
105+
// Packages targeting Node
106+
{
107+
files: ['packages/{compiler-sfc,compiler-ssr,server-renderer}/**'],
108+
rules: {
109+
'no-restricted-globals': ['error', ...DOMGlobals],
110+
'no-restricted-syntax': ['error', banConstEnum],
111+
},
112+
},
113+
114+
// Private package, browser only + no syntax restrictions
115+
{
116+
files: ['packages/template-explorer/**', 'packages/sfc-playground/**'],
117+
rules: {
118+
'no-restricted-globals': ['error', ...NodeGlobals],
119+
'no-restricted-syntax': ['error', banConstEnum],
120+
'no-console': 'off',
121+
},
122+
},
123+
124+
// JavaScript files
125+
{
126+
files: ['*.js'],
127+
rules: {
128+
// We only do `no-unused-vars` checks for js files, TS files are checked by TypeScript itself.
129+
'no-unused-vars': ['error', { vars: 'all', args: 'none' }],
130+
},
131+
},
132+
133+
// Node scripts
134+
{
135+
files: [
136+
'eslint.config.js',
137+
'rollup.config.js',
138+
'scripts/**',
139+
'./*.{js,ts}',
140+
'packages/*/*.js',
141+
'packages/vue/*/*.js',
142+
],
143+
rules: {
144+
'no-restricted-globals': 'off',
145+
'no-restricted-syntax': ['error', banConstEnum],
146+
'no-console': 'off',
147+
},
148+
},
149+
150+
// Import nodejs modules in compiler-sfc
151+
{
152+
files: ['packages/compiler-sfc/src/**'],
153+
rules: {
154+
'import-x/no-nodejs-modules': ['error', { allow: builtinModules }],
155+
},
156+
},
157+
158+
{
159+
ignores: [
160+
'**/dist/',
161+
'**/temp/',
162+
'**/coverage/',
163+
'.idea/',
164+
'explorations/',
165+
'dts-build/packages',
166+
],
167+
},
168+
)

0 commit comments

Comments
 (0)