Browse Source

Replaced tslint-loader with tslint-webpack-plugin

sanex3339 7 năm trước cách đây
mục cha
commit
f668175525

+ 1 - 1
package.json

@@ -66,7 +66,7 @@
     "ts-node": "3.3.0",
     "tslint": "5.6.0",
     "tslint-eslint-rules": "4.1.1",
-    "tslint-loader": "3.5.3",
+    "tslint-webpack-plugin": "1.0.0",
     "typescript": "2.5.0",
     "webpack": "3.5.5",
     "webpack-node-externals": "1.6.0"

+ 0 - 1
src/interfaces/custom-nodes/ICustomNodeGroup.d.ts

@@ -24,6 +24,5 @@ export interface ICustomNodeGroup extends IInitializable {
      */
     getCustomNodes (): Map <CustomNode, ICustomNode>;
 
-
     initialize (): void;
 }

+ 1 - 1
src/interfaces/utils/IEscapeSequenceEncoder.d.ts

@@ -4,4 +4,4 @@ export interface IEscapeSequenceEncoder {
      * @param usingUnicodeEscapeSequence
      */
     encode (string: string, usingUnicodeEscapeSequence: boolean): string;
-}
+}

+ 1 - 1
src/interfaces/utils/IRandomGenerator.d.ts

@@ -36,7 +36,7 @@ export interface IRandomGenerator {
      * @param length
      * @returns {string}
      */
-    getRandomVariableName (length: number): string
+    getRandomVariableName (length: number): string;
 
     /**
      * @returns {number}

+ 0 - 1
src/types/container/custom-nodes/TControlFlowCustomNodeFactory.d.ts

@@ -3,4 +3,3 @@ import { ICustomNode } from '../../../interfaces/custom-nodes/ICustomNode';
 import { ControlFlowCustomNode } from '../../../enums/container/custom-nodes/ControlFlowCustomNode';
 
 export type TControlFlowCustomNodeFactory = (controlFlowCustomNodeName: ControlFlowCustomNode) => ICustomNode;
-

+ 5 - 7
webpack.config.js

@@ -4,6 +4,7 @@ const fs = require("fs");
 const nodeExternals = require('webpack-node-externals');
 const webpack = require('webpack');
 const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
+const TSLintPlugin = require('tslint-webpack-plugin');
 
 const copyright = 'Copyright (C) 2017 Timofey Kachalov <[email protected]>';
 
@@ -45,12 +46,6 @@ module.exports = {
     module: {
         exprContextCritical: false,
         rules: [
-            {
-                enforce: 'pre',
-                test: /\.ts(x?)$/,
-                loader: 'tslint-loader',
-                exclude: /(node_modules)/
-            },
             {
                 test: /\.ts(x?)$/,
                 loader: 'awesome-typescript-loader',
@@ -72,7 +67,10 @@ module.exports = {
                 entryOnly: false
             }
         ),
-        new CheckerPlugin()
+        new CheckerPlugin(),
+        new TSLintPlugin({
+            files: ['./src/**/*.ts']
+        })
     ],
     output: {
         path: __dirname + '/dist',

+ 6 - 10
yarn.lock

@@ -953,7 +953,7 @@ [email protected], chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
     strip-ansi "^3.0.0"
     supports-color "^2.0.0"
 
[email protected], chalk@^2.0.0:
[email protected], chalk@^2.0.0, chalk@^2.1.0:
   version "2.1.0"
   resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e"
   dependencies:
@@ -3378,7 +3378,7 @@ right-align@^0.1.1:
   dependencies:
     align-text "^0.1.1"
 
-rimraf@2, rimraf@^2.4.4, rimraf@^2.5.1, rimraf@^2.6.1:
+rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1:
   version "2.6.1"
   resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d"
   dependencies:
@@ -3831,15 +3831,11 @@ [email protected]:
     tslib "^1.0.0"
     tsutils "^1.4.0"
 
-tslint-[email protected]:
-  version "3.5.3"
-  resolved "https://registry.yarnpkg.com/tslint-loader/-/tslint-loader-3.5.3.tgz#343f74122d94f356b689457d3f59f64a69ab606f"
+tslint-webpack-plugin@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/tslint-webpack-plugin/-/tslint-webpack-plugin-1.0.0.tgz#c3fdf3b29e77ae4f54e6981b3a85a65909f39ec9"
   dependencies:
-    loader-utils "^1.0.2"
-    mkdirp "^0.5.1"
-    object-assign "^4.1.1"
-    rimraf "^2.4.4"
-    semver "^5.3.0"
+    chalk "^2.1.0"
 
 [email protected]:
   version "5.6.0"