Skip to content

Commit

Permalink
chore: enforce some jsdoc rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmanchhabra committed Aug 24, 2024
1 parent 14d5d7d commit 37e9df3
Show file tree
Hide file tree
Showing 11 changed files with 178 additions and 53 deletions.
7 changes: 4 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import js from "@eslint/js";
import jsdoc from 'eslint-plugin-jsdoc';
import globals from "globals";
import pluginJs from "@eslint/js";


export default [
{
Expand All @@ -9,7 +9,8 @@ export default [
globals: globals.node
}
},
pluginJs.configs.recommended,
js.configs.recommended,
jsdoc.configs['flat/recommended'],
{
rules: {
"semi": ["error", "always"],
Expand Down
159 changes: 157 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@vitest/coverage-v8": "^2.0.5",
"base-volta-off-of-nwjs": "^1.0.5",
"eslint": "^9.9.1",
"eslint-plugin-jsdoc": "^50.2.2",
"globals": "^15.9.0",
"nw": "^0.91.0",
"selenium-webdriver": "^4.23.0",
Expand Down
19 changes: 8 additions & 11 deletions src/bld/osx.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import process from 'node:process';

import plist from 'plist';

/**
*
* @param {object} options - Options.
* @param {object} options.app - Application configuration.
* @param {string} options.outDir - Output directory.
* @param {string} options.releaseInfo - Release information.
* @returns {Promise<void>} - Promise.
*/
export default async function setOsxConfig({ app, outDir, releaseInfo }) {
if (process.platform === 'win32') {
console.warn(
Expand All @@ -22,14 +30,12 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {
}
/**
* Path to MacOS application.
*
* @type {string}
*/
const nwjsApp = path.resolve(outDir, 'nwjs.app');

/**
* Path to renamed MacOS application.
*
* @type {string}
*/
const outApp = path.resolve(outDir, `${app.name}.app`);
Expand Down Expand Up @@ -218,7 +224,6 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {

/**
* Path to `nwjs.app/Contents/Info.plist`
*
* @type {string}
*/
const ContentsInfoPlistPath = path.resolve(
Expand All @@ -229,7 +234,6 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {

/**
* Path to `nwjs.app/Contents/Resources/en.lproj/InfoPlist.settings`
*
* @type {string}
*/
const ContentsResourcesEnLprojInfoPlistStringsPath = path.resolve(
Expand All @@ -242,7 +246,6 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {

/**
* JSON from `nwjs.app/Contents/Info.plist`
*
* @type {object}
*/
const ContentsInfoPlistJson = plist.parse(
Expand All @@ -254,7 +257,6 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {

/**
* JSON from `${app.name} Helper.app (Alerts)/Contents/Info.plist`
*
* @type {object}
*/
const HelperAlertsAppJson = plist.parse(
Expand All @@ -270,7 +272,6 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {

/**
* JSON from `${app.name} Helper (GPU).app/Contents/Info.plist`
*
* @type {object}
*/
const HelperGpuAppJson = plist.parse(
Expand All @@ -286,7 +287,6 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {

/**
* JSON from `${app.name} Helper (Plugin).app/Contents/Info.plist`
*
* @type {object}
*/
const HelperPluginAppJson = plist.parse(
Expand All @@ -302,7 +302,6 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {

/**
* JSON from `${app.name} Helper (Renderer).app/Contents/Info.plist`
*
* @type {object}
*/
const HelperRendererAppJson = plist.parse(
Expand All @@ -318,7 +317,6 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {

/**
* JSON from `${app.name} Helper.app/Contents/Info.plist`
*
* @type {object}
*/
const HelperAppJson = plist.parse(
Expand Down Expand Up @@ -381,7 +379,6 @@ export default async function setOsxConfig({ app, outDir, releaseInfo }) {

/**
* Data from `nwjs.app/Contents/Resources/en.lproj/InfoPlist.settings`
*
* @type {string[]}
*/
const ContentsResourcesEnLprojInfoPlistStringsArray = (await fs.promises.readFile(
Expand Down
Loading

0 comments on commit 37e9df3

Please sign in to comment.