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
21 changes: 20 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ESLintConfig, globals } from "@openally/config.eslint";
import jsdoc from "eslint-plugin-jsdoc";

export default [
...ESLintConfig,
Expand All @@ -19,6 +20,24 @@ export default [
}
},
{
ignores: ["**/node_modules/", "**/tmp/", "**/dist/", "**/coverage/", "**/fixtures/"]
files: ["public/**/*.js"],
plugins: {
jsdoc
},
rules: {
"jsdoc/no-undefined-types": ["warn", {
disableReporting: true,
markVariablesAsUsed: true
}]
}
},
{
ignores: [
"**/node_modules/",
"**/tmp/",
"**/dist/",
"**/coverage/",
"**/fixtures/"
]
}
];
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=20"
},
"scripts": {
"lint": "eslint bin src test workspaces",
"lint": "eslint bin src test workspaces public",
"lint-fix": "npm run lint -- --fix",
"prepublishOnly": "rimraf ./dist && npm run build && pkg-ok",
"build": "node ./esbuild.config.js",
Expand Down Expand Up @@ -70,6 +70,7 @@
"c8": "^10.1.2",
"cross-env": "^7.0.3",
"esbuild": "^0.24.0",
"eslint-plugin-jsdoc": "^50.6.2",
"esmock": "^2.6.7",
"glob": "^11.0.0",
"http-server": "^14.1.1",
Expand Down
2 changes: 1 addition & 1 deletion public/components/navigation/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class ViewNavigation {

const searchbar = document.getElementById("searchbar");
if (searchbar) {
searchbar.style.display = menuName === "network--view" ? "flex" : "none";
searchbar.style.display = menuName === "network--view" ? "flex" : "none";
}

this.activeMenu = selectedNav;
Expand Down
8 changes: 3 additions & 5 deletions public/components/package/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export class PackageHeader {
version: packageVersion,
description: packageDescription = "",
licenses,
repository,
flags
} = this.package.dependencyVersion;

Expand Down Expand Up @@ -68,7 +67,6 @@ export class PackageHeader {
}

// Links
const hasNoLicense = licenses.length === 0;
const repositoryUrl = this.package.dependency.versions[packageVersion].links.repository;
const repositoryUrlHostname = repositoryUrl ? new URL(repositoryUrl).hostname : null;

Expand Down Expand Up @@ -235,9 +233,9 @@ export class PackageHeader {
htmlElement.addEventListener("click", () => {
const { name } = flagsMap.get(icon);

wiki.header.setNewActiveView("flags");
wiki.navigation.flags.setNewActiveMenu(name);
wiki.open();
window.wiki.header.setNewActiveView("flags");
window.wiki.navigation.flags.setNewActiveMenu(name);
window.wiki.open();
});

fragment.appendChild(htmlElement);
Expand Down
1 change: 0 additions & 1 deletion public/components/package/pannels/overview/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export class Overview {
gitlab.pathname.includes(".git") ? -4 : gitlab.pathname.length
);


const {
star_count,
forks_count
Expand Down
2 changes: 1 addition & 1 deletion public/components/package/pannels/warnings/code-fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class CodeFetcher {
if (value && line.includes(value)) {
const indexStart = line.indexOf(value);

// eslint-disable-next-line max-len
// eslint-disable-next-line @stylistic/max-len
return `${line.slice(0, indexStart)}<span class="relevant-line">${line.slice(indexStart, indexStart + endColumn)}</span>${line.slice(indexStart + endColumn)}`;
}
else if (startFrom + index === startLine) {
Expand Down
1 change: 0 additions & 1 deletion public/core/network-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export class NetworkNavigation {
};
}


calculateAngle(position1, position2) {
const dx = position2.x - position1.x;
const dy = position2.y - position1.y;
Expand Down
Loading