Skip to content

Commit 65adf22

Browse files
authored
upgrade eslint to latest version (webpack#3955)
1 parent 94af55d commit 65adf22

File tree

6 files changed

+1472
-892
lines changed

6 files changed

+1472
-892
lines changed

.babelrc

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
22
"presets": [
3-
"env",
4-
"react"
3+
"@babel/preset-env",
4+
"@babel/preset-react"
55
],
66
"plugins": [
7-
"syntax-dynamic-import",
8-
"transform-object-rest-spread",
9-
"transform-class-properties"
7+
"@babel/plugin-proposal-class-properties"
108
],
119
"env": {
1210
"development": {

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"root": true,
33
"extends": "eslint:recommended",
4-
"parser": "babel-eslint",
4+
"parser": "@babel/eslint-parser",
55
"env": {
66
"browser": true,
77
"es6": true,

package.json

+9-11
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"build-test": "npm run build && http-server dist/",
4343
"test": "npm run lint",
4444
"lint": "run-s lint:*",
45-
"lint:js": "eslint src --ext .js,.jsx,.md --cache true --cache-location .cache/.eslintcache",
45+
"lint:js": "eslint src --ext .js,.jsx,.md --cache --cache-location .cache/.eslintcache",
4646
"lint:markdown": "markdownlint --rules markdownlint-rule-emphasis-style --config ./.markdownlint.json *.md ./src/content/**/*.md --ignore './src/content/**/_*.md'",
4747
"lint:social": "alex . -q",
4848
"lint:prose": "cp .proselintrc ~/ && proselint src/content",
@@ -77,19 +77,17 @@
7777
}
7878
],
7979
"devDependencies": {
80+
"@babel/core": "^7.11.6",
81+
"@babel/eslint-parser": "^7.11.5",
82+
"@babel/plugin-proposal-class-properties": "^7.10.4",
83+
"@babel/preset-env": "^7.11.5",
84+
"@babel/preset-react": "^7.10.4",
8085
"@mdx-js/loader": "0.15.7",
8186
"@mdx-js/mdx": "0.15.7",
8287
"@octokit/rest": "^16.27.1",
8388
"alex": "^5.1.0",
8489
"autoprefixer": "^7.2.3",
85-
"babel-core": "^6.26.0",
86-
"babel-eslint": "^7.2.3",
87-
"babel-loader": "^7.1.2",
88-
"babel-plugin-syntax-dynamic-import": "^6.18.0",
89-
"babel-plugin-transform-class-properties": "^6.24.1",
90-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
91-
"babel-preset-env": "^1.6.0",
92-
"babel-preset-react": "^6.24.1",
90+
"babel-loader": "^8.1.0",
9391
"bundlesize": "^0.17.1",
9492
"copy-webpack-plugin": "4.5.2",
9593
"cross-env": "5.2.0",
@@ -98,10 +96,10 @@
9896
"directory-tree": "2.2.0",
9997
"directory-tree-webpack-plugin": "0.3",
10098
"duplexer": "^0.1.1",
101-
"eslint": "4.19.1",
99+
"eslint": "^7.8.1",
102100
"eslint-loader": "^2.0.0",
103101
"eslint-plugin-cypress": "^2.10.3",
104-
"eslint-plugin-markdown": "1.0.0-rc.0",
102+
"eslint-plugin-markdown": "^1.0.2",
105103
"file-loader": "^1.1.11",
106104
"fontgen-loader": "git://github.com/EugeneHlushko/fontgen-loader.git#0.1.3",
107105
"front-matter": "^2.3.0",

src/content/api/module-methods.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ The goal of CommonJS is to specify an ecosystem for JavaScript outside the brows
166166

167167
### `require`
168168

169-
``` javascript
169+
```typescript
170170
require(dependency: String);
171171
```
172172

@@ -182,7 +182,7 @@ W> Using it asynchronously may not have the expected effect.
182182

183183
### `require.resolve`
184184

185-
``` javascript
185+
```typescript
186186
require.resolve(dependency: String);
187187
```
188188

src/content/plugins/context-replacement-plugin.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ contributors:
44
- simon04
55
- byzyk
66
- masives
7+
- chenxsan
78
related:
89
- title: Issue 2783 - ContextReplacementPlugin Description
910
url: https://github.com/webpack/webpack/issues/2783#issuecomment-234137265
@@ -18,9 +19,7 @@ The `ContextReplacementPlugin` allows you to override the inferred information.
1819

1920
## Usage
2021

21-
<!-- eslint-skip -->
22-
23-
```javascript
22+
```typescript
2423
new webpack.ContextReplacementPlugin(
2524
resourceRegExp: RegExp,
2625
newContentResource?: string,
@@ -45,7 +44,7 @@ The `moment/locale` context is restricted to files matching `/de|fr|hu/`. Thus o
4544

4645
## Content Callback
4746

48-
```javascript
47+
```typescript
4948
new webpack.ContextReplacementPlugin(
5049
resourceRegExp: RegExp,
5150
newContentCallback: (data) => void
@@ -72,7 +71,7 @@ new webpack.ContextReplacementPlugin(/^\.\/locale$/, (context) => {
7271

7372
The `newContentResource` and `newContentCreateContextMap` parameters are also available:
7473

75-
```javascript
74+
```typescript
7675
new webpack.ContextReplacementPlugin(
7776
resourceRegExp: RegExp,
7877
newContentResource: string,

0 commit comments

Comments
 (0)