-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: respect eslint extensions in incremental check
- Loading branch information
1 parent
8a10ca9
commit 2ba396d
Showing
15 changed files
with
135 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,6 @@ node_modules | |
|
||
# Editor directories and files | ||
.idea | ||
|
||
# Mac OS | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module' | ||
}, | ||
extends: ['plugin:@typescript-eslint/recommended'] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## eslint configuration example | ||
|
||
It's a basic configuration of the plugin and [eslint](https://github.com/eslint/eslint). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "fork-ts-checker-webpack-plugin-ts-loader-example", | ||
"version": "0.0.0", | ||
"main": "dist/index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"dev": "webpack-dev-server", | ||
"build": "webpack -p" | ||
}, | ||
"devDependencies": { | ||
"@types/eslint": "^6.8.0", | ||
"@typescript-eslint/eslint-plugin": "^2.27.0", | ||
"@typescript-eslint/parser": "^2.27.0", | ||
"eslint": "^6.8.0", | ||
"fork-ts-checker-webpack-plugin": "^5.0.0-alpha.9", | ||
"ts-loader": "^7.0.0", | ||
"typescript": "^3.8.0", | ||
"webpack": "^4.0.0", | ||
"webpack-cli": "^3.0.0", | ||
"webpack-dev-server": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log('Hello world'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES5", | ||
"module": "CommonJS", | ||
"lib": ["ES5", "ScriptHost"], | ||
"moduleResolution": "Node", | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"skipDefaultLibCheck": true, | ||
"strict": true, | ||
"baseUrl": "./src", | ||
"outDir": "./dist", | ||
"forceConsistentCasingInFileNames": true, | ||
"importsNotUsedAsValues": "preserve" // this is important for proper files watching | ||
}, | ||
"include": ["./src"], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
|
||
module.exports = { | ||
context: __dirname, | ||
entry: './src/index.ts', | ||
resolve: { | ||
extensions: ['.ts', '.tsx', '.js'], | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader', | ||
exclude: /node_modules/, | ||
options: { | ||
transpileOnly: true, | ||
}, | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new ForkTsCheckerWebpackPlugin({ | ||
eslint: { | ||
enabled: true, | ||
files: './src/**/*', | ||
}, | ||
}), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
## VS Code configuration example | ||
## Visual Studio Code configuration example | ||
|
||
This example defines `.vscode/tasks.json` file which instructs **VS Code** how to extract errors from the webpack's output | ||
This example defines `.vscode/tasks.json` file which instructs **Visual Studio Code** how to extract errors from the webpack's output | ||
to display them in the **Problems** tab. It uses [TypeScript + Webpack Problem Matchers](https://marketplace.visualstudio.com/items?itemName=eamodio.tsl-problem-matcher) | ||
provided by @eamodio :heart: | ||
|
||
> Tip: You can use the npm type tasks even with yarn if you set "npm.packageManager": "yarn" in your VS Code settings | ||
> Tip: You can use the npm type tasks even with yarn if you set "npm.packageManager": "yarn" in your Visual Studio Code settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters