mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 20:34:44 +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",
|
"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)\"",
|
"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",
|
"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",
|
"lint:fix": "npm run lint -- --fix",
|
||||||
"gramjs:tl": "node ./src/lib/gramjs/tl/generateModules.js",
|
"gramjs:tl": "node ./src/lib/gramjs/tl/generateModules.js",
|
||||||
"gramjs:lint:fix": "eslint ./src/lib/gramjs --ignore-path=src/lib/gramjs/.eslintignore --fix",
|
"gramjs:lint:fix": "eslint ./src/lib/gramjs --ignore-path=src/lib/gramjs/.eslintignore --fix",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{ts,tsx}": "eslint"
|
"*.{ts,tsx,js}": "eslint"
|
||||||
},
|
},
|
||||||
"author": "Alexander Zinchuk (alexander@zinchuk.com)",
|
"author": "Alexander Zinchuk (alexander@zinchuk.com)",
|
||||||
"license": "GPL-3.0-or-later",
|
"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);
|
return isSelected ? SELECTED_APPENDIX_BACKGROUND : getAppendixColorFromImage(src, isOwn);
|
||||||
};
|
}
|
||||||
|
|
||||||
async function getAppendixColorFromImage(src: string, isOwn: boolean) {
|
async function getAppendixColorFromImage(src: string, isOwn: boolean) {
|
||||||
const img = new Image();
|
const img = new Image();
|
||||||
|
Loading…
Reference in New Issue
Block a user