Commit 272c0951 by Torkel Ödegaard

tslint: added a new tslint rule

parent 0dc89493
......@@ -101,7 +101,7 @@
"build": "grunt build",
"test": "grunt test",
"test:coverage": "grunt test --coverage=true",
"lint": "tslint -c tslint.json --project tsconfig.json --type-check",
"lint": "tslint -c tslint.json --project tsconfig.json",
"jest": "jest --notify --watch",
"api-tests": "jest --notify --watch --config=tests/api/jest.js",
"precommit": "lint-staged && grunt precommit"
......
......@@ -109,7 +109,7 @@ export function determineQueryHints(series: any[], datasource?: any): any[] {
}
// Check for monotony
const datapoints: [number, number][] = s.datapoints;
const datapoints: number[][] = s.datapoints;
if (datapoints.length > 1) {
let increasing = false;
const monotonic = datapoints.filter(dp => dp[0] !== null).every((dp, index) => {
......
......@@ -27,11 +27,11 @@ class GraphElement {
ctrl: GraphCtrl;
tooltip: any;
dashboard: any;
annotations: Array<object>;
annotations: object[];
panel: any;
plot: any;
sortedSeries: Array<any>;
data: Array<any>;
sortedSeries: any[];
data: any[];
panelWidth: number;
eventManager: EventManager;
thresholdManager: ThresholdManager;
......
{
"rules": {
"array-type": [true, "array-simple"],
"interface-name": [true, "never-prefix"],
"no-string-throw": true,
"no-unused-expression": true,
......@@ -19,13 +20,7 @@
"member-access": false,
"no-arg": true,
"no-bitwise": false,
"no-console": [true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-console": [true, "debug", "info", "time", "timeEnd", "trace"],
"no-construct": true,
"no-debugger": true,
"no-empty": false,
......@@ -37,26 +32,20 @@
"no-trailing-whitespace": true,
"no-var-keyword": false,
"object-literal-sort-keys": false,
"one-line": [true,
"check-open-brace",
"check-catch",
"check-else"
],
"one-line": [true, "check-open-brace", "check-catch", "check-else"],
"prefer-const": true,
"radix": false,
"typedef-whitespace": [true, {
"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-type",
"check-preblock"
]
"whitespace": [true, "check-branch", "check-decl", "check-type", "check-preblock"]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment