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
# Editor configuration, see https://editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
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
{ | |
"printWidth": 80, | |
"tabWidth": 2, | |
"useTabs": false, | |
"semi": true, | |
"singleQuote": true, | |
"quoteProps": "as-needed", | |
"trailingComma": "es5", | |
"bracketSpacing": true, | |
"arrowParens": "avoid", |
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
{ | |
"attr-no-duplication": true, | |
"attr-value-double-quotes": true, | |
"id-class-ad-disabled": true, | |
"inline-script-disabled": true, | |
"inline-style-disabled": true, | |
"src-not-empty": true, | |
"style-disabled": true, | |
"tag-pair": true, | |
"tagname-lowercase": true |
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
{ | |
"extends": [ | |
"stylelint-config-prettier" | |
], | |
"plugins": [ | |
"stylelint-order", | |
"stylelint-scss" | |
], | |
"rules": { | |
"alpha-value-notation": "number", |
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
/** | |
* @description Calculates scrollbar width | |
* @export | |
* @returns {number} Value in px | |
*/ | |
export function calcScrollbarWidth(): number { | |
const outer = document.createElement('div'); | |
outer.style.visibility = 'hidden'; | |
outer.style.width = '100px'; | |
outer.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps |
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
body { | |
// Better cross browser font smoothing | |
text-rendering: optimizeLegibility; | |
font-variant-ligatures: none; | |
text-decoration-skip: objects; | |
text-size-adjust: 100%; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
-webkit-tap-highlight-color: transparent; | |
} |
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
/* Works on Firefox */ | |
* { | |
scrollbar-width: thin; /* "auto" or "thin" */ | |
scrollbar-color: blue orange; /* scroll thumb and track */ | |
} | |
/* Works on Chrome/Edge/Safari */ | |
::-webkit-scrollbar { | |
width: 12px; /* width of the entire vertical scrollbar */ | |
height: 12px; /* height of the entire horizontal scrollbar */ |
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
Show hidden characters
{ | |
"extends": ["tslint-config-prettier"], | |
"rulesDirectory": ["codelyzer"], | |
"rules": { | |
"angular-whitespace": [ | |
true, | |
"check-interpolation", | |
"check-pipe", | |
"check-semicolon" | |
], |
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
// Файл "tsconfig.json": | |
// - устанавливает корневой каталог проекта TypeScript; | |
// - выполняет настройку параметров компиляции; | |
// - устанавливает файлы проекта. | |
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта. | |
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта. | |
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга. | |
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути. | |
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию. | |
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json". |
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
type Entity<T> = T & { id: number | string }; | |
export const trackById = <T>(index: number, item: Entity<T>) => | |
item?.id ?? index; |
OlderNewer