[web] Remove linting rule

This commit is contained in:
Alain Nussbaumer 2025-06-06 21:57:02 +02:00
parent ef683f5b02
commit 051498861e
3 changed files with 3 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -14,7 +14,6 @@ export default [
camelcase: 'off',
'id-length': 'off',
'max-lines-per-function': 'off',
'no-bitwise': 'off',
'no-magic-numbers': 'off',
'one-var': 'off',
'sort-keys': 'off'

View File

@ -1,9 +1,9 @@
const toColor = (string) => {
let hash = 0
for (const char of string) {
hash = char.charCodeAt(0) + ((hash << 5) - hash)
hash = char.charCodeAt(0) + hash * 0x1f
}
return (hash & 0x00ffffff).toString(16)
return (hash % 0xffffff).toString(16).padStart(6, '0')
}
const luminance = (color) =>