style: introduce @typescript-eslint/recommended

This commit is contained in:
harttle
2019-07-06 14:33:34 +08:00
parent e6f5f1cd85
commit 88c89fe3b3
48 changed files with 260 additions and 235 deletions
+6 -6
View File
@@ -2,24 +2,24 @@ import { ForloopDrop } from './forloop-drop'
export class TablerowloopDrop extends ForloopDrop {
private cols: number
constructor (length: number, cols: number) {
public constructor (length: number, cols: number) {
super(length)
this.length = length
this.cols = cols
}
row () {
public row () {
return Math.floor(this.i / this.cols) + 1
}
col0 () {
public col0 () {
return (this.i % this.cols)
}
col () {
public col () {
return this.col0() + 1
}
col_first () { // eslint-disable-line
public col_first () { // eslint-disable-line
return this.col0() === 0
}
col_last () { // eslint-disable-line
public col_last () { // eslint-disable-line
return this.col() === this.cols
}
}