@gesslar/uglier 2.3.1 → 2.4.1
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/LICENSE.txt +12 -0
- package/README.md +4 -4
- package/package.json +11 -12
- package/src/types/uglier.d.ts +4 -2
- package/src/uglier.js +66 -5
- package/UNLICENSE.txt +0 -24
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright (C) 2026 by Brian M. Workman bmw@gesslar.dev
|
|
2
|
+
|
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
+
purpose with or without fee is hereby granted.
|
|
5
|
+
|
|
6
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
8
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
9
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
10
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
11
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
12
|
+
PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
CHANGED
|
@@ -253,17 +253,17 @@ it, you good-deed profiteer.
|
|
|
253
253
|
|
|
254
254
|
## License
|
|
255
255
|
|
|
256
|
-
uglier is released
|
|
257
|
-
[Unlicense](UNLICENSE.txt).
|
|
256
|
+
`@gesslar/uglier` is released under the [0BSD](LICENSE.txt).
|
|
258
257
|
|
|
259
258
|
This package includes or depends on third-party components under their own
|
|
260
259
|
licenses:
|
|
261
260
|
|
|
262
261
|
| Dependency | License |
|
|
263
262
|
| --- | --- |
|
|
264
|
-
| [@gesslar/colours](https://github.com/gesslar/colours) |
|
|
265
|
-
| [@gesslar/toolkit](https://github.com/gesslar/toolkit) |
|
|
263
|
+
| [@gesslar/colours](https://github.com/gesslar/colours) | 0BSD |
|
|
264
|
+
| [@gesslar/toolkit](https://github.com/gesslar/toolkit) | 0BSD |
|
|
266
265
|
| [@skarab/detect-package-manager](https://github.com/skarab42/detect-package-manager) | MIT |
|
|
267
266
|
| [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic) | MIT |
|
|
267
|
+
| [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro) | MIT |
|
|
268
268
|
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | BSD-3-Clause |
|
|
269
269
|
| [globals](https://github.com/sindresorhus/globals) | MIT |
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "gesslar",
|
|
6
6
|
"url": "https://gesslar.dev"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.
|
|
8
|
+
"version": "2.4.1",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/gesslar/uglier.git"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"src",
|
|
25
25
|
"bin",
|
|
26
|
-
"
|
|
26
|
+
"LICENSE.txt"
|
|
27
27
|
],
|
|
28
28
|
"keywords": [
|
|
29
29
|
"eslint",
|
|
@@ -48,25 +48,24 @@
|
|
|
48
48
|
"patch": "npm version patch",
|
|
49
49
|
"minor": "npm version minor",
|
|
50
50
|
"major": "npm version major",
|
|
51
|
-
"docs
|
|
52
|
-
"docs:build": "cd docs && npm run build",
|
|
53
|
-
"docs:deploy": "gh workflow run deploy-docs.yml"
|
|
51
|
+
"docs": "gh workflow run ReleaseStarlight.yaml"
|
|
54
52
|
},
|
|
55
|
-
"license": "
|
|
53
|
+
"license": "0BSD",
|
|
56
54
|
"engines": {
|
|
57
|
-
"node": ">=24.
|
|
55
|
+
"node": ">=24.11.0"
|
|
58
56
|
},
|
|
59
57
|
"dependencies": {
|
|
60
|
-
"@gesslar/colours": ">=0.
|
|
61
|
-
"@gesslar/toolkit": ">=
|
|
58
|
+
"@gesslar/colours": ">=1.0.0",
|
|
59
|
+
"@gesslar/toolkit": ">=5.0.1",
|
|
62
60
|
"@skarab/detect-package-manager": ">=1.0.0",
|
|
63
61
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
64
|
-
"eslint-plugin-
|
|
62
|
+
"eslint-plugin-astro": "^1.7.0",
|
|
63
|
+
"eslint-plugin-jsdoc": ">=62.9.0",
|
|
65
64
|
"globals": ">=17.4.0"
|
|
66
65
|
},
|
|
67
66
|
"devDependencies": {
|
|
68
|
-
"@gesslar/uglier": ">=2.
|
|
69
|
-
"eslint": ">=10.
|
|
67
|
+
"@gesslar/uglier": ">=2.4.0",
|
|
68
|
+
"eslint": ">=10.2.0",
|
|
70
69
|
"typescript": "^6.0.2"
|
|
71
70
|
}
|
|
72
71
|
}
|
package/src/types/uglier.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const availableConfigs: Array<ConfigName>;
|
|
|
14
14
|
/**
|
|
15
15
|
* Available config block names
|
|
16
16
|
*/
|
|
17
|
-
export type ConfigName = "lints-js" | "lints-jsdoc" | "languageOptions" | "web" | "node" | "react" | "tauri" | "vscode-extension" | "cjs-override" | "mjs-override";
|
|
17
|
+
export type ConfigName = "lints-js" | "lints-jsdoc" | "languageOptions" | "web" | "node" | "react" | "docusaurus" | "starlight" | "tauri" | "vscode-extension" | "cjs-override" | "mjs-override";
|
|
18
18
|
/**
|
|
19
19
|
* ESLint rule severity or configuration
|
|
20
20
|
*/
|
|
@@ -128,6 +128,8 @@ export type PerConfigOptions = {
|
|
|
128
128
|
web?: EnvironmentOptions;
|
|
129
129
|
node?: EnvironmentOptions;
|
|
130
130
|
react?: EnvironmentOptions;
|
|
131
|
+
docusaurus?: EnvironmentOptions;
|
|
132
|
+
starlight?: EnvironmentOptions;
|
|
131
133
|
tauri?: EnvironmentOptions;
|
|
132
134
|
"vscode-extension"?: EnvironmentOptions;
|
|
133
135
|
"cjs-override"?: ModuleOverrideOptions;
|
|
@@ -161,7 +163,7 @@ export type FlatConfig = {
|
|
|
161
163
|
/**
|
|
162
164
|
* - Glob patterns for files this config applies to
|
|
163
165
|
*/
|
|
164
|
-
files?: Array<string>;
|
|
166
|
+
files?: Array<string | string[]>;
|
|
165
167
|
/**
|
|
166
168
|
* - Glob patterns for files to ignore
|
|
167
169
|
*/
|
package/src/uglier.js
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
/**
|
|
78
78
|
* Available config block names
|
|
79
79
|
*
|
|
80
|
-
* @typedef {"lints-js" | "lints-jsdoc" | "languageOptions" | "web" | "node" | "react" | "tauri" | "vscode-extension" | "cjs-override" | "mjs-override"} ConfigName
|
|
80
|
+
* @typedef {"lints-js" | "lints-jsdoc" | "languageOptions" | "web" | "node" | "react" | "docusaurus" | "starlight" | "tauri" | "vscode-extension" | "cjs-override" | "mjs-override"} ConfigName
|
|
81
81
|
*/
|
|
82
82
|
|
|
83
83
|
/**
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
/**
|
|
142
142
|
* Per-config options map
|
|
143
143
|
*
|
|
144
|
-
* @typedef {{"lints-js"?: LintsJsOptions, "lints-jsdoc"?: LintsJsdocOptions, languageOptions?: LanguageOptionsOptions, web?: EnvironmentOptions, node?: EnvironmentOptions, react?: EnvironmentOptions, tauri?: EnvironmentOptions, "vscode-extension"?: EnvironmentOptions, "cjs-override"?: ModuleOverrideOptions, "mjs-override"?: ModuleOverrideOptions}} PerConfigOptions
|
|
144
|
+
* @typedef {{"lints-js"?: LintsJsOptions, "lints-jsdoc"?: LintsJsdocOptions, languageOptions?: LanguageOptionsOptions, web?: EnvironmentOptions, node?: EnvironmentOptions, react?: EnvironmentOptions, docusaurus?: EnvironmentOptions, starlight?: EnvironmentOptions, tauri?: EnvironmentOptions, "vscode-extension"?: EnvironmentOptions, "cjs-override"?: ModuleOverrideOptions, "mjs-override"?: ModuleOverrideOptions}} PerConfigOptions
|
|
145
145
|
*/
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
*
|
|
159
159
|
* @typedef {object} FlatConfig
|
|
160
160
|
* @property {string} [name] - Config name for debugging
|
|
161
|
-
* @property {Array<string>} [files] - Glob patterns for files this config applies to
|
|
161
|
+
* @property {Array<string | string[]>} [files] - Glob patterns for files this config applies to
|
|
162
162
|
* @property {Array<string>} [ignores] - Glob patterns for files to ignore
|
|
163
163
|
* @property {{[pluginName: string]: object}} [plugins] - ESLint plugins
|
|
164
164
|
* @property {{[ruleName: string]: RuleEntry}} [rules] - ESLint rules
|
|
@@ -167,6 +167,7 @@
|
|
|
167
167
|
*/
|
|
168
168
|
|
|
169
169
|
import jsdoc from "eslint-plugin-jsdoc"
|
|
170
|
+
import astro from "eslint-plugin-astro"
|
|
170
171
|
import stylistic from "@stylistic/eslint-plugin"
|
|
171
172
|
import globals from "globals"
|
|
172
173
|
|
|
@@ -174,7 +175,7 @@ import globals from "globals"
|
|
|
174
175
|
* Registry of named configuration blocks.
|
|
175
176
|
* Each config is a factory function that returns an ESLint flat config object.
|
|
176
177
|
*
|
|
177
|
-
* @type {{[K in ConfigName]: (options?: object) => FlatConfig}}
|
|
178
|
+
* @type {{[K in ConfigName]: (options?: object) => FlatConfig | Array<FlatConfig>}}
|
|
178
179
|
*/
|
|
179
180
|
const CONFIGS = {
|
|
180
181
|
/**
|
|
@@ -512,6 +513,63 @@ const CONFIGS = {
|
|
|
512
513
|
}
|
|
513
514
|
},
|
|
514
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Docusaurus documentation site globals (browser + React + Docusaurus)
|
|
518
|
+
*
|
|
519
|
+
* @param {EnvironmentOptions} options - Configuration options
|
|
520
|
+
* @returns {FlatConfig} ESLint flat config object
|
|
521
|
+
*/
|
|
522
|
+
"docusaurus": (options = {}) => {
|
|
523
|
+
const {
|
|
524
|
+
files = ["src/**/*.{js,jsx,mjs,cjs}", "docs/**/*.{js,jsx,mjs,cjs}"],
|
|
525
|
+
ignores = [],
|
|
526
|
+
additionalGlobals = {},
|
|
527
|
+
} = options
|
|
528
|
+
|
|
529
|
+
return {
|
|
530
|
+
name: "gesslar/uglier/docusaurus",
|
|
531
|
+
files: Array.isArray(files) ? files : [files],
|
|
532
|
+
ignores: Array.isArray(ignores) ? ignores : [ignores],
|
|
533
|
+
languageOptions: {
|
|
534
|
+
globals: {
|
|
535
|
+
...globals.browser,
|
|
536
|
+
React: "readonly",
|
|
537
|
+
ReactDOM: "readonly",
|
|
538
|
+
...additionalGlobals,
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Starlight documentation site (browser + Astro + eslint-plugin-astro)
|
|
546
|
+
*
|
|
547
|
+
* @param {EnvironmentOptions} options - Configuration options
|
|
548
|
+
* @returns {Array<FlatConfig>} ESLint flat config array
|
|
549
|
+
*/
|
|
550
|
+
"starlight": (options = {}) => {
|
|
551
|
+
const {
|
|
552
|
+
files = ["src/**/*.{js,mjs,cjs}", "docs/**/*.{js,mjs,cjs}"],
|
|
553
|
+
ignores = [],
|
|
554
|
+
additionalGlobals = {},
|
|
555
|
+
} = options
|
|
556
|
+
|
|
557
|
+
return [
|
|
558
|
+
...astro.configs["flat/recommended"],
|
|
559
|
+
{
|
|
560
|
+
name: "gesslar/uglier/starlight",
|
|
561
|
+
files: Array.isArray(files) ? files : [files],
|
|
562
|
+
ignores: Array.isArray(ignores) ? ignores : [ignores],
|
|
563
|
+
languageOptions: {
|
|
564
|
+
globals: {
|
|
565
|
+
...globals.browser,
|
|
566
|
+
...additionalGlobals,
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
]
|
|
571
|
+
},
|
|
572
|
+
|
|
515
573
|
/**
|
|
516
574
|
* Tauri application configuration (browser + Tauri APIs, no Node.js)
|
|
517
575
|
*
|
|
@@ -570,7 +628,10 @@ export default function(options = {}) {
|
|
|
570
628
|
const configOptions = perConfigOptions[configName] || {}
|
|
571
629
|
const config = CONFIGS[configName](configOptions)
|
|
572
630
|
|
|
573
|
-
|
|
631
|
+
if(Array.isArray(config))
|
|
632
|
+
configs.push(...config)
|
|
633
|
+
else
|
|
634
|
+
configs.push(config)
|
|
574
635
|
}
|
|
575
636
|
|
|
576
637
|
return configs
|
package/UNLICENSE.txt
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
This is free and unencumbered software released into the public domain.
|
|
2
|
-
|
|
3
|
-
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
-
distribute this software, either in source code form or as a compiled
|
|
5
|
-
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
-
means.
|
|
7
|
-
|
|
8
|
-
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
-
of this software dedicate any and all copyright interest in the
|
|
10
|
-
software to the public domain. We make this dedication for the benefit
|
|
11
|
-
of the public at large and to the detriment of our heirs and
|
|
12
|
-
successors. We intend this dedication to be an overt act of
|
|
13
|
-
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
-
software under copyright law.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
-
|
|
24
|
-
For more information, please refer to <https://unlicense.org>
|