This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"plugins": ["boundaries"], | |
"extends": [ | |
"eslint:recommended", | |
"plugin:import/errors", | |
"plugin:import/warnings", | |
"plugin:import/typescript", | |
"plugin:boundaries/recommended", | |
"plugin:@typescript-eslint/recommended", | |
"plugin:@typescript-eslint/recommended-requiring-type-checking" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MAX_PAGES_BLOCK = 3; | |
const SIDE_PAGE_COUNT = (MAX_PAGES_BLOCK - 1) / 2; | |
getPages() { | |
if (this.totalPages <= MAX_PAGES_BLOCK + 1) { | |
return this.range(1, this.totalPages); | |
} | |
const leftSidePages = this.getLeftSidePages(); | |
const rightSidePages = this.getRightSidePages(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const singleton = (function() { | |
let instance; | |
function init() { | |
let count = 0; | |
return { | |
getValue, | |
increase | |
}; |