Skip to content

Commit

Permalink
Merge branch 'main' into pr/Dunqing/14441
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Mar 12, 2024
2 parents df08ae8 + 74dc73a commit 6163a85
Show file tree
Hide file tree
Showing 693 changed files with 21,274 additions and 13,590 deletions.
15 changes: 10 additions & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const { builtinModules } = require('node:module')
const { defineConfig } = require('eslint-define-config')
const pkg = require('./package.json')

/// <reference types="@eslint-types/typescript-eslint" />

module.exports = defineConfig({
root: true,
extends: [
Expand All @@ -13,7 +15,7 @@ module.exports = defineConfig({
'plugin:regexp/recommended',
],
ignorePatterns: ['packages/create-vite/template-**'],
plugins: ['import', 'regexp'],
plugins: ['i', 'regexp'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
Expand Down Expand Up @@ -90,12 +92,12 @@ module.exports = defineConfig({
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/prefer-function-type': 'off',

'import/no-nodejs-modules': [
'i/no-nodejs-modules': [
'error',
{ allow: builtinModules.map((mod) => `node:${mod}`) },
],
'import/no-duplicates': 'error',
'import/order': 'error',
'i/no-duplicates': 'error',
'i/order': 'error',
'sort-imports': [
'error',
{
Expand All @@ -108,6 +110,8 @@ module.exports = defineConfig({
],

'regexp/no-contradiction-with-assertion': 'error',
// in some cases using explicit letter-casing is more performant than the `i` flag
'regexp/use-ignore-case': 'off',
},
overrides: [
{
Expand Down Expand Up @@ -141,6 +145,7 @@ module.exports = defineConfig({
},
{
files: ['packages/vite/src/node/**'],
excludedFiles: '**/__tests__/**',
rules: {
'no-console': ['error'],
},
Expand Down Expand Up @@ -208,7 +213,7 @@ module.exports = defineConfig({
'playground/tailwind/**', // blocked by https://github.com/postcss/postcss-load-config/issues/239
],
rules: {
'import/no-commonjs': 'error',
'i/no-commonjs': 'error',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body:
id: reproduction
attributes:
label: Reproduction
description: Please provide a link via [vite.new](https://vite.new/) or a link to a repo that can reproduce the problem you ran into. `npm create vite@latest` and `npm create vite-extra@latest` (for SSR or library repros) can be used as a starter template. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required ([Why?](https://antfu.me/posts/why-reproductions-are-required)). If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed.
description: Please provide a link via [vite.new](https://vite.new/) or a link to a repo that can reproduce the problem you ran into. `npm create vite@latest` and `npm create vite-extra@latest` (for SSR or library repros) can be used as a starter template. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required ([Why?](https://antfu.me/posts/why-reproductions-are-required)). If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "needs reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed.
placeholder: Reproduction URL
validations:
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

### Before submitting the PR, please make sure you do the following

- [ ] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [ ] Read the [Pull Request Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md#pull-request-guidelines) and follow the [PR Title Convention](https://github.com/vitejs/vite/blob/main/.github/commit-convention.md).
- [ ] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md), especially the [Pull Request Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md#pull-request-guidelines).
- [ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
- [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`).
- [ ] Update the corresponding documentation if needed.
- [ ] Ideally, include relevant tests that fail without this PR but pass with it.
Binary file removed .github/issue-workflow-dark.png
Binary file not shown.

0 comments on commit 6163a85

Please sign in to comment.