From 61841b7b9198db79fa05a69f473afd4b9061d7b5 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Fri, 24 Mar 2017 14:04:47 +0100 Subject: [PATCH] GH-1: Enabled linter for the example server app. Removed EOF rule. Signed-off-by: Akos Kitta --- tslint.json => config/tslint/tslint.json | 1 - config/webpack/webpack.config.js | 2 +- examples/package.json | 5 ++++- package.json | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) rename tslint.json => config/tslint/tslint.json (97%) diff --git a/tslint.json b/config/tslint/tslint.json similarity index 97% rename from tslint.json rename to config/tslint/tslint.json index fc8d09649567e..171785497ee50 100644 --- a/tslint.json +++ b/config/tslint/tslint.json @@ -3,7 +3,6 @@ "class-name": true, "comment-format": [true, "check-space"], "curly": true, - "eofline": true, "forin": true, "indent": [true, "spaces"], "max-line-length": [true, 140], diff --git a/config/webpack/webpack.config.js b/config/webpack/webpack.config.js index cbf45c8ae304f..ab32b4400df49 100644 --- a/config/webpack/webpack.config.js +++ b/config/webpack/webpack.config.js @@ -16,7 +16,7 @@ const monacoJsonLanguagePath = './node_modules/monaco-json/release/min'; const monacoHtmlLanguagePath = './node_modules/monaco-html/release/min'; -module.exports = function (dirname, config) { +module.exports = function (dirname, config = {}) { const commonConfiguration = { output: { diff --git a/examples/package.json b/examples/package.json index 48895fc066a57..e0e169b2fde5e 100644 --- a/examples/package.json +++ b/examples/package.json @@ -16,8 +16,9 @@ "scripts": { "install:theia": "cd ../ && npm link && cd examples && npm link theia", "clean": "./node_modules/.bin/rimraf lib", + "lint": "./node_modules/.bin/tslint -c ../config/tslint/tslint.json --project ./tsconfig.json", "build": "npm run build:app && npm run build:web", - "build:app": "./node_modules/.bin/tsc", + "build:app": "./node_modules/.bin/tsc && npm run lint", "build:web": "./node_modules/.bin/webpack && cp src/web/index.html lib/web", "build:electron": "npm run build:app && ./node_modules/.bin/webpack --target electron && cp src/electron/index.html lib/electron", "start:app": "./node_modules/.bin/node ./lib/app.js", @@ -31,6 +32,8 @@ "devDependencies": { "concurrently": "^3.4.0", "rimraf": "^2.6.1", + "tslint": "^4.5.1", + "tslint-loader": "^3.4.3", "typescript": "^2.2.1", "webpack": "^2.2.1", "webpack-dev-server": "^2.4.1" diff --git a/package.json b/package.json index 885f7bf51fe87..607987d4e9aba 100644 --- a/package.json +++ b/package.json @@ -66,9 +66,9 @@ "webpack-merge": "^3.0.0" }, "scripts": { - "lint": "./node_modules/.bin/tslint -c ./tslint.json --project ./tsconfig.json", + "lint": "./node_modules/.bin/tslint -c ./config/tslint/tslint.json --project ./tsconfig.json", "build": "./node_modules/.bin/tsc && npm run lint", - "watch": "./node_modules/.bin/tsc --watch && npm run lint", + "watch": "./node_modules/.bin/tsc --watch", "clean": "./node_modules/.bin/rimraf lib", "clean:node_modules": "./node_modules/.bin/rimraf node_modules", "test": "./node_modules/.bin/mocha",