mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-30 04:39:00 +01:00
Include GramJs into pre-commit linter hook (#1211)
This commit is contained in:
parent
d41d87325d
commit
7fb57ac4d8
@ -1 +0,0 @@
|
||||
src/lib/gramjs
|
@ -11,7 +11,7 @@
|
||||
"deploy:production": "npm run build:production && git add -A && git commit -a -m '[Build]' --no-verify && git push",
|
||||
"inc_version": "echo $((`cat .patch-version` + 1)) > .patch-version && echo \"$(node -p -e \"require('./package.json').version.match(/^\\d+\\.\\d+/)[0]\").$(cat .patch-version)\"",
|
||||
"perf:serve": "APP_ENV=perf parcel src/index-perf.html",
|
||||
"lint": "eslint . --ext .ts,.tsx",
|
||||
"lint": "eslint . --ext .ts,.tsx --ignore-pattern src/lib/gramjs",
|
||||
"lint:fix": "npm run lint -- --fix",
|
||||
"gramjs:tl": "node ./src/lib/gramjs/tl/generateModules.js",
|
||||
"gramjs:lint:fix": "eslint ./src/lib/gramjs --ignore-path=src/lib/gramjs/.eslintignore --fix",
|
||||
@ -27,7 +27,7 @@
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx}": "eslint"
|
||||
"*.{ts,tsx,js}": "eslint"
|
||||
},
|
||||
"author": "Alexander Zinchuk (alexander@zinchuk.com)",
|
||||
"license": "GPL-3.0-or-later",
|
||||
|
@ -1,8 +1,8 @@
|
||||
const SELECTED_APPENDIX_BACKGROUND = 'rgba(255,255,255,1)';
|
||||
const SELECTED_APPENDIX_BACKGROUND = Promise.resolve('rgba(255,255,255,1)');
|
||||
|
||||
export default async (src: string, isOwn: boolean, inSelectMode?: boolean, isSelected?: boolean) => {
|
||||
export default function getCustomAppendixBg(src: string, isOwn: boolean, inSelectMode?: boolean, isSelected?: boolean) {
|
||||
return isSelected ? SELECTED_APPENDIX_BACKGROUND : getAppendixColorFromImage(src, isOwn);
|
||||
};
|
||||
}
|
||||
|
||||
async function getAppendixColorFromImage(src: string, isOwn: boolean) {
|
||||
const img = new Image();
|
||||
|
Loading…
Reference in New Issue
Block a user