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",