chore: More oxlint changes

This commit is contained in:
Mohamed Bassem 2025-06-22 12:38:24 +00:00
parent d5e2973dce
commit f7b3193815
23 changed files with 24 additions and 87 deletions

View File

@ -4,9 +4,6 @@
"../../tooling/oxlint/oxlint-base.json",
"../../tooling/oxlint/oxlint-react.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"builtin": true,
"commonjs": true,

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -4,9 +4,6 @@
"../../tooling/oxlint/oxlint-base.json",
"../../tooling/oxlint/oxlint-react.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"builtin": true,
"commonjs": true,

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -4,9 +4,6 @@
"../../tooling/oxlint/oxlint-base.json",
"../../tooling/oxlint/oxlint-react.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"builtin": true,
"commonjs": true,

View File

@ -5,9 +5,6 @@
"../../tooling/oxlint/oxlint-nextjs.json",
"../../tooling/oxlint/oxlint-react.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"builtin": true,
"commonjs": true,

View File

@ -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!",

View File

@ -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({

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -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()}`,

View File

@ -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(", ")}]`;

View File

@ -5,9 +5,6 @@
"../tooling/oxlint/oxlint-nextjs.json",
"../tooling/oxlint/oxlint-react.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"builtin": true,
"commonjs": true,

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -4,9 +4,6 @@
"../../tooling/oxlint/oxlint-base.json",
"../../tooling/oxlint/oxlint-react.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"builtin": true,
"commonjs": true,

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -3,10 +3,7 @@
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"categories": {
"correctness": "warn"
},
"env": {
"env": {
"builtin": true,
"commonjs": true
},

View File

@ -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"
}

View File

@ -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"