Merge pull request #411 from sourcelair/issue-#408-tslint

Add tslint
This commit is contained in:
Paris Kasidiaris
2016-12-15 12:13:23 +00:00
committed by GitHub
5 changed files with 66 additions and 6 deletions
+6 -1
View File
@@ -2,7 +2,11 @@ language: node_js
node_js:
- 6
env:
- CXX=g++-4.8
global:
- CXX=g++-4.8
matrix:
- NPM_COMMAND=lint
- NPM_COMMAND=test
addons:
apt:
sources:
@@ -11,3 +15,4 @@ addons:
- g++-4.8
notifications:
email: false
script: npm run $NPM_COMMAND
+2
View File
@@ -29,10 +29,12 @@
"pty.js": "0.3.1",
"sleep": "^3.0.1",
"sorcery": "^0.10.0",
"tslint": "^4.0.2",
"typescript": "^2.0.3"
},
"scripts": {
"start": "nodemon --watch src --watch addons --watch demo --exec bash -c './bin/build && node demo/app'",
"lint": "tslint src/**/*.ts",
"test": "mocha --recursive ./lib",
"build:docs": "jsdoc -c jsdoc.json",
"build": "./bin/build",
+1 -1
View File
@@ -5,7 +5,7 @@ import * as Clipboard from './Clipboard';
describe('evaluateCopiedTextProcessing', function () {
it('should strip trailing whitespaces and replace nbsps with spaces', function () {
var nonBreakingSpace = String.fromCharCode(160),
let nonBreakingSpace = String.fromCharCode(160),
copiedText = 'echo' + nonBreakingSpace + 'hello' + nonBreakingSpace,
processedText = Clipboard.prepareTextForClipboard(copiedText);
+4 -4
View File
@@ -108,11 +108,11 @@ export function rightClickHandler(ev: MouseEvent, term: ITerminal) {
if (s.rangeCount) {
let r = s.getRangeAt(0),
cr = r.getClientRects(),
i, rect;
cr = r.getClientRects();
for (let i = 0; i < cr.length; i++) {
let rect = cr[i];
for (i=0; i<cr.length; i++) {
rect = cr[i];
clickIsOnSelection = (
(x > rect.left) && (x < rect.right) &&
(y > rect.top) && (y < rect.bottom)
+53
View File
@@ -0,0 +1,53 @@
{
"rules": {
"class-name": true,
"comment-format": [
true,
"check-space"
],
"indent": [
true,
"spaces"
],
"eofline": true,
"no-eval": true,
"no-internal-module": true,
"no-trailing-whitespace": true,
"no-unsafe-finally": true,
"no-var-keyword": true,
"quotemark": [
true,
"single"
],
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"variable-name": [
true,
"ban-keywords"
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
]
}
}