Skip to content

Commit

Permalink
🚨 Fix tslint errors and format code where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmoMyzrailGorynych committed Jan 24, 2019
1 parent 906d994 commit b10d5a9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/js/WebGL2.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*tslint:disable:interface-name*/
interface HTMLCanvasElement {
getContext(contextId: "webgl2" | "experimental-webgl2", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
}
getContext(contextId: 'webgl2' | 'experimental-webgl2', contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
}
4 changes: 2 additions & 2 deletions src/js/oneShotWebGL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ class Renderer {
gl.shaderSource(this.vecShader, vectorShader);
gl.compileShader(this.fragShader);
gl.compileShader(this.vecShader);
if (!gl.getShaderParameter(this.fragShader, gl.COMPILE_STATUS) ) {
if (!gl.getShaderParameter(this.fragShader, gl.COMPILE_STATUS)) {
console.error(gl.getShaderInfoLog(this.fragShader));
return null;
}
if (!gl.getShaderParameter(this.vecShader, gl.COMPILE_STATUS) ) {
if (!gl.getShaderParameter(this.vecShader, gl.COMPILE_STATUS)) {
console.error(gl.getShaderInfoLog(this.vecShader));
return null;
}
Expand Down
13 changes: 12 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "tslint:recommended",
"extends": "tslint:latest",
"linterOptions": {
"exclude": ["./src/js/3rdparty/**/*"]
},
Expand All @@ -24,16 +24,27 @@
}],
"no-angle-bracket-type-assertion": false,
"no-console": {
"severity": "warning",
"options": ["debug", "info", "log", "time", "timeEnd", "trace"]
},
"no-implicit-dependencies": { /* As the app is split into two packages, this will give false positives… kinda */
"severity": "warning"
},
"no-invalid-template-strings": { /* Is used for a reason at oneShotWebGL */
"severity": "warning"
},
"no-misused-new": false, /* Because of buggy tslint */
"no-object-literal-type-assertion": false,
"no-shadowed-variable": {
"severity": "warning"
},
"no-string-literal": false, /* Because of buggy tslint */
"no-var-keyword": false,
"no-var-requires": false,
"object-literal-sort-keys": false,
"one-variable-per-declaration": false,
"ordered-imports": false,
"prefer-for-of": false, /* Because of buggy tslint */
"quotemark": [true, "single"],
"trailing-comma": [
false, {
Expand Down

0 comments on commit b10d5a9

Please sign in to comment.