Skip to content

Commit 17803a8

Browse files
authored
fix: resolve lint actions error (#1838)
1 parent 7e5d4e3 commit 17803a8

34 files changed

+1005
-1033
lines changed

.markdownlint.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
{
22
"default": true,
33
"MD002": false,
4-
"MD004": { "style": "dash" },
4+
"MD004": { "style": "consistent" },
55
"MD007": { "indent": 2 },
66
"MD013": { "line_length": 600, "code_blocks": false },
77
"MD024": {
88
"siblings_only": true
99
},
10+
"MD025": false,
1011
"MD026": false,
11-
"MD029": { "style": "ordered" },
12+
"MD029": false,
1213
"MD033": false,
1314
"MD034": false,
1415
"MD036": false,
1516
"MD041": false,
17+
"MD051": false,
1618
"MD053": false,
1719
"no-hard-tabs": false,
1820
"whitespace": false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"test": "npm run lint",
4444
"lint": "run-s lint:*",
4545
"lint:js": "npm run lint-js .",
46-
"lint-js": "eslint --cache --cache-location .cache/.eslintcache",
46+
"lint-js": "eslint --cache --cache-location .cache/.eslintcache src --ignore-pattern src/content",
4747
"lint:markdown": "npm run lint-markdown '**/*.{md,mdx}'",
4848
"lint-markdown": "markdownlint --config ./.markdownlint.json",
4949
"lint:prose": "vale --config='.vale.ini' src/content",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Webpack 5 现已正式发布。请阅读我们的 <a href="/blog/2020-10-10-webpack-5-release/">发布公告</a>。如还未准备升级,请阅读 <a href="https://v4.webpack.docschina.org/">webpack 4 文档</a>。
1+
Webpack 5 现已正式发布。请阅读我们的 <a href="/blog/2020-10-10-webpack-5-release/">发布公告</a>。如还未准备升级,请阅读 <a href="https://v4.webpack.docschina.org/">webpack 4 文档</a>。

src/components/Splash/Splash.jsx

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,15 @@
1-
// Import External Dependencies
2-
import { lazy, Suspense, useState, useEffect } from 'react';
3-
41
// Import Components
52
import Container from '../Container/Container';
63
import SplashViz from '../SplashViz/SplashViz';
74
import Markdown from '../Markdown/Markdown';
8-
import { PlaceholderComponent } from '../Placeholder/Placeholder';
9-
10-
// Import helpers
11-
import isClient from '../../utilities/is-client';
125

136
// Import Demo Content
147
import SplashContent from '../../content/index.mdx';
158

169
// Load Styling
1710
import './Splash.scss';
1811

19-
// const Support = lazy(() => import('../Support/Support'));
20-
21-
const SponsorsPlaceholder = () => (
22-
<>
23-
<h2>Latest Sponsors</h2>
24-
<PlaceholderComponent />
25-
26-
<h2>Platinum Sponsors</h2>
27-
<PlaceholderComponent />
28-
29-
<h2>Gold Sponsors</h2>
30-
<PlaceholderComponent />
31-
32-
<h2>Silver Sponsors</h2>
33-
<PlaceholderComponent />
34-
35-
<h2>Bronze Sponsors</h2>
36-
<PlaceholderComponent />
37-
38-
<h2>Backers</h2>
39-
<PlaceholderComponent />
40-
</>
41-
);
42-
4312
const Splash = () => {
44-
const [showSponsors, setShowSponsors] = useState(false);
45-
const [supportType, setSupportType] = useState(() =>
46-
Math.random() < 0.33 ? 'monthly' : 'total'
47-
);
48-
useEffect(() => {
49-
if (isClient) setShowSponsors(true);
50-
}, []);
5113
return (
5214
<div className="splash">
5315
<SplashViz />

src/components/Stats/StatsScript.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from 'react';
2-
31
const statsScript = `
42
var _hmt = _hmt || [];
53
(function() {

src/content/blog/2020-10-10-webpack-5-release.mdx

Lines changed: 76 additions & 76 deletions
Large diffs are not rendered by default.

src/content/concepts/modules.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Webpack 从这些系统中汲取了经验和教训,并将 _模块_ 的概念
2828

2929
## 何为 webpack 模块 $#what-is-a-webpack-module$
3030

31-
[Node.js 模块](https://nodejs.org/api/modules.html)相比,webpack *模块* 能以各种方式表达它们的依赖关系。下面是一些示例:
31+
[Node.js 模块](https://nodejs.org/api/modules.html)相比,webpack 模块能以各种方式表达它们的依赖关系。下面是一些示例:
3232

3333
- [ES2015 `import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) 语句
3434
- [CommonJS](http://www.commonjs.org/specs/modules/1.0/) `require()` 语句
@@ -46,7 +46,7 @@ Webpack 天生支持如下模块类型:
4646
- [Assets](/guides/asset-modules)
4747
- WebAssembly 模块
4848

49-
通过 **loader** 可以使 webpack 支持多种语言和预处理器语法编写的模块。**loader** 向 webpack 描述了如何处理非原生*模块*,并将相关**依赖**引入到你的 **bundles**中。
49+
通过 **loader** 可以使 webpack 支持多种语言和预处理器语法编写的模块。**loader** 向 webpack 描述了如何处理非原生 **模块**,并将相关**依赖**引入到你的 **bundles**中。
5050
webpack 社区已经为各种流行的语言和预处理器创建了 _loader_,其中包括:
5151

5252
- [CoffeeScript](http://coffeescript.org)

src/content/configuration/configuration-languages.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ export default config;
6060

6161
你可以通过三个途径来完成 module 的设置:
6262

63-
* 直接修改 `tsconfig.json` 文件
63+
- 直接修改 `tsconfig.json` 文件
6464
- 修改 `tsconfig.json` 并且添加 `ts-node` 的设置。
65-
* 使用 `tsconfig-paths`
66-
65+
- 使用 `tsconfig-paths`
6766

6867
**第一种方法**就是打开你的 `tsconfig.json` 文件,找到 `compilerOptions` 的配置,然后设置 `target``module` 的选项分别为 `"ES5"``"CommonJs"` (在 `target` 设置为 `es5` 时你也可以不显示编写 `module` 配置)。
6968

@@ -74,7 +73,7 @@ export default config;
7473
```json
7574
{
7675
"compilerOptions": {
77-
"module": "ESNext",
76+
"module": "ESNext"
7877
},
7978
"ts-node": {
8079
"compilerOptions": {

src/content/configuration/other-options.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ module.exports = {
444444
如果使用正则表达式,请确保将路径包裹在捕获组中。
445445

446446
### managedPaths $#managedpaths$
447+
447448
如果使用正则表达式,请确保将路径包裹在捕获组中。
448449

449450
### managedPaths

src/content/glossary.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ translators:
5757
## O $#o$
5858

5959
- [**Output**](/concepts/output): 配置项指定将编译的文件输出到磁盘的位置。
60-
> *注意,即使可以存在多个入口起点,但只指定一个输出配置。*
60+
> 注意,即使可以存在多个入口起点,但只指定一个输出配置。
6161
6262
## P $#p$
6363

0 commit comments

Comments
 (0)