Skip to content

Commit d1ae89a

Browse files
authored
Merge pull request #5 from webpack/master
20220317
2 parents 06866ca + 2fa5192 commit d1ae89a

File tree

406 files changed

+29979
-23022
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

406 files changed

+29979
-23022
lines changed

.alexignore

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

.alexrc

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

.babelrc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
22
"presets": [
33
"@babel/preset-env",
4-
"@babel/preset-react"
5-
],
6-
"plugins": [
7-
"@babel/plugin-proposal-class-properties"
4+
[
5+
"@babel/preset-react",
6+
{
7+
"runtime": "automatic"
8+
}
9+
]
810
],
11+
"plugins": ["@babel/plugin-proposal-class-properties"],
912
"env": {
1013
"development": {
11-
"plugins": [
12-
"react-refresh/babel"
13-
]
14+
"plugins": ["react-refresh/babel"]
1415
}
1516
}
1617
}

.browserslistrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
defaults
2+
not ie 11

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ trim_trailing_whitespace = true
77
insert_final_newline = true
88

99
# Format Source Code
10-
[*.{md,js,jsx,json,scss,hbs}]
10+
[*.{md,mdx,js,jsx,json,scss,hbs}]
1111
charset = utf-8
1212
indent_style = space
1313
indent_size = 2

.eslintignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
dist/
2-
src/content/loaders/_*.md
3-
src/content/plugins/_*.md
2+
examples/
3+
src/content/loaders/_*.mdx
4+
src/content/plugins/_*.mdx
5+
.github/**/*.md
6+
README.md

.eslintrc

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

.eslintrc.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['eslint:recommended', 'plugin:react/recommended', 'prettier'],
4+
parser: '@babel/eslint-parser',
5+
env: {
6+
browser: true,
7+
es6: true,
8+
node: true,
9+
jest: true,
10+
'cypress/globals': true,
11+
},
12+
plugins: ['cypress', 'react-hooks'],
13+
rules: {
14+
'no-console': 'off',
15+
semi: ['error', 'always'],
16+
quotes: ['error', 'single'],
17+
'no-duplicate-imports': 'error',
18+
'react/jsx-uses-react': 'off', // no longer needed with new jsx transform
19+
'react/react-in-jsx-scope': 'off', // ditto
20+
'react-hooks/rules-of-hooks': 'error',
21+
'react-hooks/exhaustive-deps': 'warn',
22+
},
23+
settings: {
24+
react: {
25+
version: 'detect',
26+
},
27+
},
28+
overrides: [
29+
{ files: ['src/**/*.jsx'] }, // eslint would lint .js only by default
30+
{
31+
files: ['**/*.mdx'],
32+
extends: ['plugin:mdx/recommended'],
33+
globals: {
34+
Badge: true,
35+
StackBlitzPreview: true,
36+
},
37+
rules: {
38+
semi: ['off'],
39+
},
40+
settings: {
41+
'mdx/code-blocks': true,
42+
},
43+
},
44+
{
45+
files: ['**/*.mdx/*.{js,javascript}'], // we don't lint ts at the moment
46+
rules: {
47+
indent: ['error', 2],
48+
quotes: ['error', 'single', { allowTemplateLiterals: true }],
49+
'no-undef': 'off',
50+
'no-unused-vars': 'off',
51+
'no-constant-condition': 'off',
52+
'no-useless-escape': 'off',
53+
'no-dupe-keys': 'off',
54+
'no-duplicate-imports': 'off',
55+
},
56+
},
57+
],
58+
};

.github/CODE_OF_CONDUCT.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Code of Conduct
2-
---------------
1+
## Code of Conduct
32

43
At webpack and all webpack/webpack-contrib repositories we follow the
54
[JSFoundation Code of Conduct][1]. Please adhere to the guidelines there and

.github/CONTRIBUTING.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,34 @@
1-
Contributing
2-
------------
1+
## Contributing
32

43
From opening an issue for a documentation suggestion to creating a pull request: every
54
contribution is appreciated and welcome. If you're planning to implement a new section or
65
page please create an issue first.
76

8-
97
## Setup
108

119
Start by ensuring that you have Node.js installed and forking the repository:
1210

1311
- Install [Node.js][1] if you have not already.
12+
- Install [Yarn][13] if you have not already. Yarn is an alternative to npm, and it is required for building the site as we use `yarn` specific features like `resolutions` which are not available in other package managers like `pnpm`.
1413
- Fork the **webpack.js.org** repo from [the main repository][2].
1514
- `git clone <your-clone-url> && cd webpack.js.org`
1615

1716
Once you are in the project directory, run the following commands:
1817

19-
- `npm install` to pull all dependencies. Make sure to check notes below if you prefer Yarn.
20-
- `npm run build` to create a production version of the site.
21-
- `npm start` to develop on a local webpack-dev-server: [localhost:3000][3].
18+
- `yarn` to pull all dependencies.
19+
- `yarn build` to create a production version of the site.
20+
- `yarn start` to develop on a local webpack-dev-server: [localhost:3000][3].
2221

23-
> NOTE: run `npm fetch` before running `npm start` command for the first time
22+
> NOTE: run `yarn fetch` before running `yarn start` command for the first time
2423
25-
- `npm run fetch` to retrieve external documentation/data.
24+
- `yarn fetch` to retrieve external documentation/data.
2625

27-
The final command, `npm run fetch`, is optional as both `npm run build` and `npm start`
26+
The final command, `yarn fetch`, is optional as both `yarn build` and `yarn start`
2827
will do this automatically. This step pulls in documentation for loaders/plugins hosted
2928
in separate repositories such as the ones found in the [webpack-contrib][4] organization.
3029
See the `package.json` for the full list of `scripts`.
3130

32-
> Note that __Node 6.9.x__ or above is required for the build process to run properly.
33-
34-
> Note that a __Python version between v2.5.0 and 3.0.0__ is required for the [proselint][12] dependency.
35-
36-
> Although __Yarn__ is not required to work with webpack docs, the core team is using it more extensively. If you prefer to use Yarn make sure that you [get it installed][13] and run `yarn` to pull all dependencies, `yarn build` to build the project, or `yarn start` to start the development server.
37-
38-
> On Debian and Ubuntu operating systems you may have to use `node >= 7.0.0` to avoid build errors with `node-sass`. Please note that we don't officially support building on these systems.
39-
31+
> Note that **Node 12.x** or above is required for the build process to run properly.
4032
4133
## Contributor License Agreement
4234

@@ -47,35 +39,31 @@ not the same as your email used on GitHub, the CLA bot can't accept your contrib
4739

4840
Run `git config user.email` to see your Git email, and verify it with your [GitHub email][5].
4941

50-
5142
## Editor Config
5243

5344
The [.editorconfig][6] in the root should ensure consistent formatting. Please make sure
5445
you've [installed the plugin][7] if your text editor needs one.
5546

56-
5747
## Branching Your Changes
5848

5949
Making a branch in your fork for your contribution is helpful in the following ways:
6050

6151
- It allows you to have multiple contributions in as PRs at once.
6252
- It allows us to identify what your contribution is about from the branch name.
6353

64-
6554
## Committing Your Changes
6655

6756
Please follow the [conventional commits][10] specification. For example, for documentation
6857
changes, a short commit message may resemble the following:
6958

70-
``` md
59+
```md
7160
docs(config): clarify `output.filename` usage
7261
```
7362

7463
Note that you can add a body/footer if more details are necessary. Soon we will
7564
start utilizing [`standard-version`][11] for releases/changelog generation. This
7665
will also potentially tie in to having archived docs for each major version.
7766

78-
7967
## Submitting Changes
8068

8169
After getting some feedback, push to your fork branch and submit a pull request. We may
@@ -86,13 +74,12 @@ Issue the PR to the [master][8] branch.
8674

8775
> See [GitHub documentation][9] for more help.
8876
89-
9077
## Recognition
9178

9279
You can choose to add your GitHub username for recognition at the top of any markdown
9380
document you edit:
9481

95-
__example.md__
82+
**example.md**
9683

9784
```markdown
9885
---
@@ -111,13 +98,11 @@ Some documentation...
11198
This will add your name and GitHub profile photo to the document in production. It's a
11299
great way to own the awesome work that you do and we encourage you to do this in your PRs.
113100

114-
115101
## Thank You
116102

117-
webpack is a feature rich, low level tool and documentation is a huge time sink. We appreciate
103+
Webpack is a feature rich, low level tool and documentation is a huge time sink. We appreciate
118104
any time spent fixing typos or clarifying sections in the documentation.
119105

120-
121106
[1]: https://nodejs.org/
122107
[2]: https://github.com/webpack/webpack.js.org
123108
[3]: http://localhost:3000/
@@ -129,5 +114,4 @@ any time spent fixing typos or clarifying sections in the documentation.
129114
[9]: https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/
130115
[10]: http://conventionalcommits.org/
131116
[11]: https://github.com/conventional-changelog/standard-version
132-
[12]: https://github.com/amperser/proselint
133117
[13]: https://yarnpkg.com/lang/en/docs/install

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
- [ ] For the document of Chinese translation(中文版文档), go to https://github.com/docschina/webpack.js.org.
55
- [ ] For loader/plugin docs, consider opening an issue in the corresponding repository.
66
- [ ] No existing issue? Go ahead and open a new one.
7-
- __Remove these instructions from your PR as they are for your eyes only.__
7+
- **Remove these instructions from your PR as they are for your eyes only.**

.github/ISSUE_TEMPLATE/Documentation_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ name: Documentation request
33
about: Create a documentation request for a new feature or functionality change.
44
---
55

6-
__Feature to document__
6+
**Feature to document**
77

88
<!-- Name of the feature(s) and a link to related pull request of the feature implementation. -->
99

10-
__Author(s)__
10+
**Author(s)**
1111

1212
<!-- Mention feature author(s) in order to know who is assignable for review outside of the documentation team. -->
1313

14-
__Additional information__
14+
**Additional information**
1515

1616
<!-- Please provide any additional information that is required in order to document the feature in the best possible way or say N/A if linked PR has more than enough details. -->
1717

18-
[ ] I am willing to work on this issue and submit a pull request.
18+
[ ] I am willing to work on this issue and submit a pull request.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ _describe your changes..._
44
- [ ] Make sure your PR complies with the [writer's guide][2].
55
- [ ] Review the diff carefully as sometimes this can reveal issues.
66
- [ ] Do not abandon your Pull Request: [Stale Pull Requests][3].
7-
- __Remove these instructions from your PR as they are for your eyes only.__
7+
- **Remove these instructions from your PR as they are for your eyes only.**
88

9-
10-
[1]: https://cla.js.foundation/webpack/webpack.js.org
9+
[1]: https://github.com/openjs-foundation/EasyCLA#openjs-foundation-cla
1110
[2]: https://webpack.js.org/contribute/writers-guide/
1211
[3]: https://webpack.js.org/contribute/#pull-requests

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
open-pull-requests-limit: 10
6+
schedule:
7+
interval: "daily"
8+
labels:
9+
- "dependencies"

0 commit comments

Comments
 (0)