@gesslar/uglier 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js CHANGED
@@ -4,15 +4,13 @@
4
4
 
5
5
  import {execSync} from "child_process"
6
6
  import {
7
- VDirectoryObject,
7
+ DirectoryObject,
8
8
  Sass
9
9
  } from "@gesslar/toolkit"
10
10
  import c from "@gesslar/colours"
11
11
  import {detectAgent} from "@skarab/detect-package-manager"
12
12
 
13
- // Use VDirectoryObject to ensure we never accidentally venture outside project
14
- // Cap at project root - this becomes our sandbox boundary
15
- const PROJECT_ROOT = VDirectoryObject.fromCwd()
13
+ const PROJECT_ROOT = DirectoryObject.fromCwd()
16
14
  const SRC_DIR = PROJECT_ROOT.getDirectory("src")
17
15
  const PACKAGE_NAME = "@gesslar/uglier"
18
16
 
@@ -118,7 +116,7 @@ export function exec(cmd) {
118
116
  export async function getAvailableConfigs() {
119
117
  try {
120
118
  // Try to read from installed package or local source
121
- const cwd = VDirectoryObject.fromCwd()
119
+ const cwd = DirectoryObject.fromCwd()
122
120
  const installedDir = cwd.getDirectory(`node_modules/${PACKAGE_NAME}/src`)
123
121
  const localSource = SRC_DIR.getFile("uglier.js")
124
122
  const installedSource = installedDir.getFile("uglier.js")
@@ -165,7 +163,7 @@ export async function getAvailableConfigs() {
165
163
  */
166
164
  export async function isInstalled(packageName) {
167
165
  try {
168
- const cwd = VDirectoryObject.fromCwd()
166
+ const cwd = DirectoryObject.fromCwd()
169
167
  const packageJsonFile = cwd.getFile("package.json")
170
168
 
171
169
  if(!(await packageJsonFile.exists)) {
@@ -238,7 +236,7 @@ export async function install() {
238
236
  * @returns {Promise<boolean>} True if successful
239
237
  */
240
238
  export async function generateConfig(targets = []) {
241
- const cwd = VDirectoryObject.fromCwd()
239
+ const cwd = DirectoryObject.fromCwd()
242
240
  const configFile = cwd.getFile("eslint.config.js")
243
241
 
244
242
  if(await configFile.exists) {
@@ -333,7 +331,7 @@ ${withLines}
333
331
  * @returns {Promise<boolean>} True if successful
334
332
  */
335
333
  export async function addToConfig(targets = []) {
336
- const cwd = VDirectoryObject.fromCwd()
334
+ const cwd = DirectoryObject.fromCwd()
337
335
  const configFile = cwd.getFile("eslint.config.js")
338
336
 
339
337
  if(!(await configFile.exists)) {
@@ -458,7 +456,7 @@ export async function addToConfig(targets = []) {
458
456
  * @returns {Promise<{success: boolean, removedTargets: string[], removedOverrides: string[]}>} Result info
459
457
  */
460
458
  export async function removeFromConfig(targets = []) {
461
- const cwd = VDirectoryObject.fromCwd()
459
+ const cwd = DirectoryObject.fromCwd()
462
460
  const configFile = cwd.getFile("eslint.config.js")
463
461
 
464
462
  if(!(await configFile.exists)) {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "gesslar",
6
6
  "url": "https://gesslar.dev"
7
7
  },
8
- "version": "1.0.0",
8
+ "version": "1.2.0",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/gesslar/uglier.git"
@@ -38,18 +38,18 @@
38
38
  "eslint": "^9.0.0"
39
39
  },
40
40
  "engines": {
41
- "node": ">=22"
41
+ "node": ">=22.13"
42
42
  },
43
43
  "dependencies": {
44
- "@gesslar/colours": "^0.7.1",
45
- "@gesslar/toolkit": "^3.17.0",
44
+ "@gesslar/colours": "^0.8.0",
45
+ "@gesslar/toolkit": "^3.23.0",
46
46
  "@skarab/detect-package-manager": "^1.0.0",
47
- "@stylistic/eslint-plugin": "^5.6.1",
48
- "eslint-plugin-jsdoc": "^61.5.0",
47
+ "@stylistic/eslint-plugin": "^5.7.0",
48
+ "eslint-plugin-jsdoc": "^62.2.0",
49
49
  "globals": "^17.0.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@gesslar/uglier": "^0.5.1",
52
+ "@gesslar/uglier": "^1.1.0",
53
53
  "eslint": "^9.39.2"
54
54
  },
55
55
  "scripts": {
package/src/uglier.js CHANGED
@@ -224,7 +224,15 @@ const CONFIGS = {
224
224
  "jsdoc/check-types": "error",
225
225
  "jsdoc/require-param-type": "error",
226
226
  "jsdoc/require-returns-type": "error",
227
+ "jsdoc/valid-types": "error",
228
+ "jsdoc/no-undefined-types": "error",
229
+ "jsdoc/require-property": "error",
227
230
  ...overrides,
231
+ },
232
+ settings: {
233
+ jsdoc: {
234
+ mode: "typescript"
235
+ }
228
236
  }
229
237
  }
230
238
  },