-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I do not like the formatting very much but at least it is consistent and supports TypeScript. https://typescript-eslint.io/troubleshooting/formatting/ Also replace `lint:js` npm script in the `client/` directory with `check:js:lint` and add `check:js` which runs that in addition to newly introduced `check:js:prettify`. This matches how the stylesheet scripts are structured. Adding `eslint-config-prettier` disables stylistic rules that would fight with Prettier. Additionally, I had to remove some clashing from our ESLint config. We are using `eslint-config-prettier` instead of `eslint-plugin-prettier`, the latter would run prettier as part of ESLint but we are already running it separately.
- Loading branch information
Showing
44 changed files
with
2,802 additions
and
2,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
export const FilterType = { | ||
NEWEST: 'newest', | ||
UNREAD: 'unread', | ||
STARRED: 'starred' | ||
STARRED: 'starred', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,24 @@ | ||
import { useListenableValue } from './hooks'; | ||
import { useMemo } from 'react'; | ||
|
||
|
||
export function useLoggedIn() { | ||
return useListenableValue(selfoss.loggedin); | ||
} | ||
|
||
export function useAllowedToRead() { | ||
const loggedIn = useLoggedIn(); | ||
|
||
return useMemo( | ||
() => selfoss.isAllowedToRead(), | ||
[loggedIn], | ||
); | ||
return useMemo(() => selfoss.isAllowedToRead(), [loggedIn]); | ||
} | ||
|
||
export function useAllowedToUpdate() { | ||
const loggedIn = useLoggedIn(); | ||
|
||
return useMemo( | ||
() => selfoss.isAllowedToUpdate(), | ||
[loggedIn], | ||
); | ||
return useMemo(() => selfoss.isAllowedToUpdate(), [loggedIn]); | ||
} | ||
|
||
export function useAllowedToWrite() { | ||
const loggedIn = useLoggedIn(); | ||
|
||
return useMemo( | ||
() => selfoss.isAllowedToWrite(), | ||
[loggedIn], | ||
); | ||
return useMemo(() => selfoss.isAllowedToWrite(), [loggedIn]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.