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

Commit 98b701c

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents b8c609f + 1ff4076 commit 98b701c

File tree

32 files changed

+4520
-3996
lines changed

32 files changed

+4520
-3996
lines changed

.eslintignore

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

.eslintrc.cjs

Lines changed: 0 additions & 144 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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ 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 - [GitHub](https://github.com/jeetpal2007) | [Email](jeetpal2007@gmail.com) | [LinkedIn](https://in.linkedin.com/in/jeet-pal-22601a290 )

eslint.config.js

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
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: [
117+
'packages/template-explorer/**',
118+
'packages/sfc-playground/**',
119+
'playground/**',
120+
],
121+
rules: {
122+
'no-restricted-globals': ['error', ...NodeGlobals],
123+
'no-restricted-syntax': ['error', banConstEnum],
124+
'no-console': 'off',
125+
},
126+
},
127+
128+
// JavaScript files
129+
{
130+
files: ['*.js'],
131+
rules: {
132+
// We only do `no-unused-vars` checks for js files, TS files are checked by TypeScript itself.
133+
'no-unused-vars': ['error', { vars: 'all', args: 'none' }],
134+
},
135+
},
136+
137+
// Node scripts
138+
{
139+
files: [
140+
'eslint.config.js',
141+
'rollup.config.js',
142+
'scripts/**',
143+
'./*.{js,ts}',
144+
'packages/*/*.js',
145+
'packages/vue/*/*.js',
146+
],
147+
rules: {
148+
'no-restricted-globals': 'off',
149+
'no-restricted-syntax': ['error', banConstEnum],
150+
'no-console': 'off',
151+
},
152+
},
153+
154+
// Import nodejs modules in compiler-sfc
155+
{
156+
files: ['packages/compiler-sfc/src/**'],
157+
rules: {
158+
'import-x/no-nodejs-modules': ['error', { allow: builtinModules }],
159+
},
160+
},
161+
162+
{
163+
ignores: [
164+
'**/dist/',
165+
'**/temp/',
166+
'**/coverage/',
167+
'.idea/',
168+
'explorations/',
169+
'dts-build/packages',
170+
],
171+
},
172+
)

0 commit comments

Comments
 (0)