You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-73Lines changed: 9 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,18 @@
14
14
15
15
## Features
16
16
17
-
* Speeds up [TypeScript](https://github.com/Microsoft/TypeScript) type checking and [ESLint](https://eslint.org/) linting (by moving each to a separate process) 🏎
17
+
* Speeds up [TypeScript](https://github.com/Microsoft/TypeScript) type checking (by moving it to a separate process) 🏎
18
18
* Supports modern TypeScript features like [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) and [incremental mode](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#faster-subsequent-builds-with-the---incremental-flag) ✨
19
19
* Supports [Vue Single File Component](https://vuejs.org/v2/guide/single-file-components.html) ✅
20
20
* Displays nice error messages with the [code frame](https://babeljs.io/docs/en/next/babel-code-frame.html) formatter 🌈
21
21
22
22
## Installation
23
23
24
-
This plugin requires minimum **Node.js 10**, **Webpack 4**, **TypeScript 2.7** and optionally **ESLint 6**
24
+
This plugin requires minimum **Node.js 12**, **Webpack 5**, **TypeScript 3.6**
25
+
26
+
* If you depend on **TypeScript 2.1 - 2.6.2**, please use [version 4](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v4.1.4) of the plugin.
27
+
* If you depend on **Webpack 4**, **TypeScript 2.7 - 3.5.3** or **ESLint** feature, please use [version 6](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v6.2.6) of the plugin.
25
28
26
-
* If you depend on **Webpack 2**, **Webpack 3**, or **TSLint 4**, please use [version 3](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v3.1.1) of the plugin.
27
-
* If you depend on **TypeScript >= 2.1** and **< 2.7** or you can't update to **Node 10**, please use [version 4](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v4.1.4) of the plugin.
files:'./src/**/*.{ts,tsx,js,jsx}'// required - same as command `eslint ./src/**/*.{ts,tsx,js,jsx} --ext .ts,.tsx,.js,.jsx`
101
-
}
102
-
})
103
-
]
104
-
};
105
-
```
106
-
107
-
You should also have an ESLint configuration file in your root project directory.
108
-
Here is a sample `.eslintrc.js` configuration for a TypeScript project:
109
-
110
-
```js
111
-
module.exports= {
112
-
parser:'@typescript-eslint/parser',
113
-
parserOptions: {
114
-
ecmaVersion:2018,
115
-
sourceType:'module',
116
-
},
117
-
extends: [
118
-
'plugin:@typescript-eslint/recommended'
119
-
],
120
-
rules: {
121
-
// place to specify ESLint rules - can be used to overwrite rules specified from the extended configs
122
-
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
123
-
}
124
-
};
125
-
```
126
-
127
-
There's a [good explanation on setting up TypeScript ESLint support by Robert Cooper](https://dev.to/robertcoopercode/using-eslint-and-prettier-in-a-typescript-project-53jb).
128
-
129
78
## Options
130
79
131
80
This plugin uses [`cosmiconfig`](https://github.com/davidtheclark/cosmiconfig). This means that besides the plugin constructor,
@@ -140,7 +89,6 @@ Options passed to the plugin constructor will overwrite options from the cosmico
|`async`|`boolean`|`compiler.options.mode === 'development'`| If `true`, reports issues **after** webpack's compilation is done. Thanks to that it doesn't block the compilation. Used only in the `watch` mode. |
142
91
|`typescript`|`object` or `boolean`|`true`| If a `boolean`, it enables/disables TypeScript checker. If an `object`, see [TypeScript options](#typescript-options). |
143
-
|`eslint`|`object`|`undefined`| If `undefined`, it disables ESLint linter. If an `object`, see [ESLint options](#eslint-options). |
144
92
|`issue`|`object`|`{}`| See [Issues options](#issues-options). |
145
93
|`formatter`|`string` or `object` or `function`|`codeframe`| Available formatters are `basic`, `codeframe` and a custom `function`. To [configure](https://babeljs.io/docs/en/babel-code-frame#options)`codeframe` formatter, pass object: `{ type: 'codeframe', options: { <coderame options> } }`. |
146
94
|`logger`|`object`|`{ infrastructure: 'silent', issues: 'console', devServer: true }`| Available loggers are `silent`, `console`, and `webpack-infrastructure`. Infrastructure logger prints additional information, issue logger prints `issues` in the `async` mode. If `devServer` is set to `false`, errors will not be reported to Webpack Dev Server. |
@@ -173,25 +121,13 @@ Options for the TypeScript checker extensions (`typescript.extensions` option ob
173
121
|`vue.enabled`|`boolean`|`false`| Same as the `vue` option |
174
122
|`vue.compiler`|`string`|`'vue-template-compiler'`| The package name of the compiler that will be used to parse `.vue` files. You can use `'nativescript-vue-template-compiler'` if you use [nativescript-vue](https://github.com/nativescript-vue/nativescript-vue)|
175
123
176
-
### ESLint options
177
-
178
-
Options for the ESLint linter (`eslint` option object).
|`enabled`|`boolean`|`false`| If `true`, it enables ESLint linter. If you set the `files` option, it will be `true` by default. |
183
-
|`files`|`string` or `string[]`| This value is required | One or more [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)) to the files that should be linted. Works the same as the `eslint` command. |
184
-
|`memoryLimit`|`number`|`2048`| Memory limit for the linter process in MB. If the process exits with the allocation failed error, try to increase this number. |
185
-
|`options`|`object`|`{}`|[Options](https://eslint.org/docs/developer-guide/nodejs-api#cliengine) that can be used to initialize ESLint. |
186
-
187
124
### Issues options
188
125
189
126
Options for the issues filtering (`issue` option object).
190
127
I could write some plain text explanation of these options but I think code will explain it better:
0 commit comments