mirror of
https://github.com/owntone/owntone-server.git
synced 2025-10-30 00:05:05 -04:00
[web] Remove linting rule
This commit is contained in:
parent
ef683f5b02
commit
051498861e
File diff suppressed because one or more lines are too long
@ -14,7 +14,6 @@ export default [
|
|||||||
camelcase: 'off',
|
camelcase: 'off',
|
||||||
'id-length': 'off',
|
'id-length': 'off',
|
||||||
'max-lines-per-function': 'off',
|
'max-lines-per-function': 'off',
|
||||||
'no-bitwise': 'off',
|
|
||||||
'no-magic-numbers': 'off',
|
'no-magic-numbers': 'off',
|
||||||
'one-var': 'off',
|
'one-var': 'off',
|
||||||
'sort-keys': 'off'
|
'sort-keys': 'off'
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
const toColor = (string) => {
|
const toColor = (string) => {
|
||||||
let hash = 0
|
let hash = 0
|
||||||
for (const char of string) {
|
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) =>
|
const luminance = (color) =>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user