Skip to content

Commit

Permalink
upgrade eslint to latest version (#3955)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxsan committed Sep 9, 2020
1 parent 94af55d commit 65adf22
Show file tree
Hide file tree
Showing 6 changed files with 1,472 additions and 892 deletions.
8 changes: 3 additions & 5 deletions .babelrc
@@ -1,12 +1,10 @@
{
"presets": [
"env",
"react"
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"syntax-dynamic-import",
"transform-object-rest-spread",
"transform-class-properties"
"@babel/plugin-proposal-class-properties"
],
"env": {
"development": {
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc
@@ -1,7 +1,7 @@
{
"root": true,
"extends": "eslint:recommended",
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"env": {
"browser": true,
"es6": true,
Expand Down
20 changes: 9 additions & 11 deletions package.json
Expand Up @@ -42,7 +42,7 @@
"build-test": "npm run build && http-server dist/",
"test": "npm run lint",
"lint": "run-s lint:*",
"lint:js": "eslint src --ext .js,.jsx,.md --cache true --cache-location .cache/.eslintcache",
"lint:js": "eslint src --ext .js,.jsx,.md --cache --cache-location .cache/.eslintcache",
"lint:markdown": "markdownlint --rules markdownlint-rule-emphasis-style --config ./.markdownlint.json *.md ./src/content/**/*.md --ignore './src/content/**/_*.md'",
"lint:social": "alex . -q",
"lint:prose": "cp .proselintrc ~/ && proselint src/content",
Expand Down Expand Up @@ -77,19 +77,17 @@
}
],
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/eslint-parser": "^7.11.5",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"@mdx-js/loader": "0.15.7",
"@mdx-js/mdx": "0.15.7",
"@octokit/rest": "^16.27.1",
"alex": "^5.1.0",
"autoprefixer": "^7.2.3",
"babel-core": "^6.26.0",
"babel-eslint": "^7.2.3",
"babel-loader": "^7.1.2",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"babel-loader": "^8.1.0",
"bundlesize": "^0.17.1",
"copy-webpack-plugin": "4.5.2",
"cross-env": "5.2.0",
Expand All @@ -98,10 +96,10 @@
"directory-tree": "2.2.0",
"directory-tree-webpack-plugin": "0.3",
"duplexer": "^0.1.1",
"eslint": "4.19.1",
"eslint": "^7.8.1",
"eslint-loader": "^2.0.0",
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-markdown": "1.0.0-rc.0",
"eslint-plugin-markdown": "^1.0.2",
"file-loader": "^1.1.11",
"fontgen-loader": "git://github.com/EugeneHlushko/fontgen-loader.git#0.1.3",
"front-matter": "^2.3.0",
Expand Down
4 changes: 2 additions & 2 deletions src/content/api/module-methods.md
Expand Up @@ -166,7 +166,7 @@ The goal of CommonJS is to specify an ecosystem for JavaScript outside the brows

### `require`

``` javascript
```typescript
require(dependency: String);
```

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

### `require.resolve`

``` javascript
```typescript
require.resolve(dependency: String);
```

Expand Down
9 changes: 4 additions & 5 deletions src/content/plugins/context-replacement-plugin.md
Expand Up @@ -4,6 +4,7 @@ contributors:
- simon04
- byzyk
- masives
- chenxsan
related:
- title: Issue 2783 - ContextReplacementPlugin Description
url: https://github.com/webpack/webpack/issues/2783#issuecomment-234137265
Expand All @@ -18,9 +19,7 @@ The `ContextReplacementPlugin` allows you to override the inferred information.

## Usage

<!-- eslint-skip -->

```javascript
```typescript
new webpack.ContextReplacementPlugin(
resourceRegExp: RegExp,
newContentResource?: string,
Expand All @@ -45,7 +44,7 @@ The `moment/locale` context is restricted to files matching `/de|fr|hu/`. Thus o

## Content Callback

```javascript
```typescript
new webpack.ContextReplacementPlugin(
resourceRegExp: RegExp,
newContentCallback: (data) => void
Expand All @@ -72,7 +71,7 @@ new webpack.ContextReplacementPlugin(/^\.\/locale$/, (context) => {

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

```javascript
```typescript
new webpack.ContextReplacementPlugin(
resourceRegExp: RegExp,
newContentResource: string,
Expand Down

1 comment on commit 65adf22

@vercel
Copy link

@vercel vercel bot commented on 65adf22 Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.