Skip to content

Commit

Permalink
readd eslint-config-love now that it has been updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Athou committed Apr 2, 2024
1 parent 16199c5 commit a756783
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 deletions.
3 changes: 3 additions & 0 deletions commafeed-client/.eslintrc.cjs
Expand Up @@ -6,6 +6,7 @@ module.exports = {
extends: [
"eslint:recommended",
"standard",
"love",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:react/recommended",
Expand Down Expand Up @@ -36,10 +37,12 @@ module.exports = {
plugins: ["react"],
rules: {
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/prefer-nullish-coalescing": ["error", { ignoreConditionalTests: true }],
"@typescript-eslint/strict-boolean-expressions": "off",
"react/no-unescaped-entities": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/exhaustive-deps": "error",
Expand Down
31 changes: 20 additions & 11 deletions commafeed-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions commafeed-client/package.json
Expand Up @@ -65,6 +65,7 @@
"@vitejs/plugin-react": "^4.2.1",
"babel-plugin-macros": "^3.1.0",
"eslint": "^8.57.0",
"eslint-config-love": "^44.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-prettier": "^5.1.3",
Expand Down
4 changes: 2 additions & 2 deletions commafeed-client/src/app/client.ts
@@ -1,8 +1,8 @@
import axios, { AxiosError } from "axios"
import axios, { type AxiosError } from "axios"
import {
type AddCategoryRequest,
type AdminSaveUserRequest,
AuthenticationError,
type AuthenticationError,
type Category,
type CategoryModificationRequest,
type CollapseRequest,
Expand Down
2 changes: 1 addition & 1 deletion commafeed-client/src/components/content/ShareButtons.tsx
Expand Up @@ -73,7 +73,7 @@ function BrowserNativeShareButton({ url, description }: { url: string; descripti

export function ShareButtons(props: { url: string; description: string }) {
const sharingSettings = useAppSelector(state => state.user.settings?.sharingSettings)
const enabledSharingSites = (Object.keys(Constants.sharing) as (keyof SharingSettings)[]).filter(site => sharingSettings?.[site])
const enabledSharingSites = (Object.keys(Constants.sharing) as Array<keyof SharingSettings>).filter(site => sharingSettings?.[site])
const url = encodeURIComponent(props.url)
const desc = encodeURIComponent(props.description)
const clipboardAvailable = typeof navigator.clipboard !== "undefined"
Expand Down
Expand Up @@ -100,7 +100,7 @@ export function DisplaySettings() {
<Divider label={<Trans>Sharing sites</Trans>} labelPosition="center" />

<SimpleGrid cols={2}>
{(Object.keys(Constants.sharing) as (keyof SharingSettings)[]).map(site => (
{(Object.keys(Constants.sharing) as Array<keyof SharingSettings>).map(site => (
<Switch
key={site}
label={Constants.sharing[site].label}
Expand Down
2 changes: 1 addition & 1 deletion commafeed-client/src/hooks/useBrowserExtension.ts
Expand Up @@ -49,7 +49,7 @@ export const useBrowserExtension = () => {
)
}
}
const setBadgeUnreadCount = (count: number) => w.postMessage(`set-badge-unread-count:${count}`, "*")
const setBadgeUnreadCount = (count: number | string) => w.postMessage(`set-badge-unread-count:${count}`, "*")

return {
browserExtensionVersion,
Expand Down

0 comments on commit a756783

Please sign in to comment.