mirror of
https://github.com/karakeep-app/karakeep.git
synced 2026-01-09 07:44:58 +08:00
chore: More oxlint changes
This commit is contained in:
parent
d5e2973dce
commit
f7b3193815
@ -4,9 +4,6 @@
|
||||
"../../tooling/oxlint/oxlint-base.json",
|
||||
"../../tooling/oxlint/oxlint-react.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true,
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -4,9 +4,6 @@
|
||||
"../../tooling/oxlint/oxlint-base.json",
|
||||
"../../tooling/oxlint/oxlint-react.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true,
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -4,9 +4,6 @@
|
||||
"../../tooling/oxlint/oxlint-base.json",
|
||||
"../../tooling/oxlint/oxlint-react.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true,
|
||||
|
||||
@ -5,9 +5,6 @@
|
||||
"../../tooling/oxlint/oxlint-nextjs.json",
|
||||
"../../tooling/oxlint/oxlint-react.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true,
|
||||
|
||||
@ -50,7 +50,7 @@ export function MergeTagModal({
|
||||
},
|
||||
});
|
||||
|
||||
const { mutate: mergeTag, isPending: isPending } = useMergeTag({
|
||||
const { mutate: mergeTag, isPending } = useMergeTag({
|
||||
onSuccess: (resp) => {
|
||||
toast({
|
||||
description: "Tag has been updated!",
|
||||
|
||||
@ -150,14 +150,12 @@ export function ImportExportRow() {
|
||||
|
||||
await Promise.all([
|
||||
// Add to import list
|
||||
...[
|
||||
toImport.listIds.map((listId) =>
|
||||
addToList({
|
||||
bookmarkId: created.id,
|
||||
listId,
|
||||
}),
|
||||
),
|
||||
],
|
||||
...toImport.listIds.map((listId) =>
|
||||
addToList({
|
||||
bookmarkId: created.id,
|
||||
listId,
|
||||
}),
|
||||
),
|
||||
// Update tags
|
||||
bookmark.tags.length > 0
|
||||
? updateTags({
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -105,7 +105,7 @@ async function startBrowserInstance() {
|
||||
);
|
||||
const webUrl = new URL(serverConfig.crawler.browserWebUrl);
|
||||
// We need to resolve the ip address as a workaround for https://github.com/puppeteer/puppeteer/issues/2242
|
||||
const { address: address } = await dns.promises.lookup(webUrl.hostname);
|
||||
const { address } = await dns.promises.lookup(webUrl.hostname);
|
||||
webUrl.hostname = address;
|
||||
logger.info(
|
||||
`[Crawler] Successfully resolved IP address, new address: ${webUrl.toString()}`,
|
||||
|
||||
@ -130,11 +130,11 @@ async function replaceTagsPlaceholders(
|
||||
const tags = (await api.tags.list()).tags;
|
||||
const tagsString = `[${tags.map((tag) => tag.name).join(", ")}]`;
|
||||
const aiTagsString = `[${tags
|
||||
.filter((tag) => tag.numBookmarksByAttachedType.human ?? 0 == 0)
|
||||
.filter((tag) => tag.numBookmarksByAttachedType.human ?? true)
|
||||
.map((tag) => tag.name)
|
||||
.join(", ")}]`;
|
||||
const userTagsString = `[${tags
|
||||
.filter((tag) => tag.numBookmarksByAttachedType.human ?? 0 > 0)
|
||||
.filter((tag) => tag.numBookmarksByAttachedType.human ?? false)
|
||||
.map((tag) => tag.name)
|
||||
.join(", ")}]`;
|
||||
|
||||
|
||||
@ -5,9 +5,6 @@
|
||||
"../tooling/oxlint/oxlint-nextjs.json",
|
||||
"../tooling/oxlint/oxlint-react.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true,
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -4,9 +4,6 @@
|
||||
"../../tooling/oxlint/oxlint-base.json",
|
||||
"../../tooling/oxlint/oxlint-react.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true,
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -3,10 +3,7 @@
|
||||
"extends": [
|
||||
"../../tooling/oxlint/oxlint-base.json"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "warn"
|
||||
},
|
||||
"env": {
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"commonjs": true
|
||||
},
|
||||
|
||||
@ -2,7 +2,9 @@
|
||||
"$schema": "../../node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": [
|
||||
"typescript",
|
||||
"import"
|
||||
"import",
|
||||
"unicorn",
|
||||
"oxc"
|
||||
],
|
||||
"rules": {
|
||||
"for-direction": "error",
|
||||
@ -108,20 +110,7 @@
|
||||
{
|
||||
"files": ["**/*"],
|
||||
"rules": {
|
||||
"no-class-assign": "off",
|
||||
"no-const-assign": "off",
|
||||
"no-dupe-class-members": "off",
|
||||
"no-dupe-keys": "off",
|
||||
"no-func-assign": "off",
|
||||
"no-import-assign": "off",
|
||||
"no-new-native-nonconstructor": "off",
|
||||
"no-obj-calls": "off",
|
||||
"no-redeclare": "off",
|
||||
"no-setter-return": "off",
|
||||
"no-this-before-super": "off",
|
||||
"no-unsafe-negation": "off",
|
||||
"no-var": "error",
|
||||
"no-with": "off",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error"
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
"jsx-a11y"
|
||||
],
|
||||
"rules": {
|
||||
"react/prop-types": "off",
|
||||
"react/jsx-key": "warn",
|
||||
"react/jsx-no-comment-textnodes": "warn",
|
||||
"react/jsx-no-duplicate-props": "warn",
|
||||
@ -20,7 +19,6 @@
|
||||
"react/no-string-refs": "warn",
|
||||
"react/no-unescaped-entities": "warn",
|
||||
"react/no-unknown-property": "warn",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
"jsx-a11y/alt-text": "error",
|
||||
@ -54,7 +52,7 @@
|
||||
}
|
||||
],
|
||||
"jsx-a11y/no-redundant-roles": "error",
|
||||
"jsx-a11y/role-has-required-aria-props": "warn",
|
||||
"jsx-a11y/role-has-required-aria-props": "off",
|
||||
"jsx-a11y/role-supports-aria-props": "error",
|
||||
"jsx-a11y/scope": "error",
|
||||
"jsx-a11y/tabindex-no-positive": "error"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user