Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .eslintrc.json

This file was deleted.

6 changes: 0 additions & 6 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ path = ["package-lock.json", "package.json", "tsconfig.json"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2019 Nextcloud GmbH and Nextcloud contributors"
SPDX-License-Identifier = "GPL-3.0-or-later"

[[annotations]]
path = [".eslintrc.json"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2023 Nextcloud GmbH and Nextcloud contributors"
SPDX-License-Identifier = "GPL-3.0-or-later"
9 changes: 9 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: CC0-1.0
*/

import { recommendedLibrary } from '@nextcloud/eslint-config'
import { defineConfig } from 'eslint/config'

export default defineConfig([...recommendedLibrary])
2 changes: 1 addition & 1 deletion lib/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
*/

declare interface Window {
_nc_initial_state?: Map<string, unknown>
_nc_initial_state?: Map<string, unknown>
}
4 changes: 2 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function loadState<T>(app: string, key: string, fallback?: T): T {
const parsedValue = JSON.parse(atob(elem.value))
window._nc_initial_state.set(selector, parsedValue)
return parsedValue
} catch (e) {
throw new Error(`Could not parse initial state ${key} of ${app}`)
} catch (error) {
throw new Error(`Could not parse initial state ${key} of ${app}`, { cause: error })
}
}
Loading