@dereekb/util 13.12.0 → 13.12.2
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/eslint/index.cjs.js +605 -94
- package/eslint/index.esm.js +605 -94
- package/eslint/package.json +1 -1
- package/eslint/src/lib/require-deprecated-alias-placement.rule.d.ts +17 -11
- package/fetch/package.json +2 -2
- package/package.json +1 -1
- package/src/lib/string/mimetype.d.ts +21 -21
- package/test/package.json +2 -2
package/eslint/package.json
CHANGED
|
@@ -47,23 +47,29 @@ interface RuleContext {
|
|
|
47
47
|
readonly sourceCode: AstNode;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* ESLint rule requiring that
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
50
|
+
* ESLint rule requiring that `@deprecated` *aliases* live at the bottom of the file under a
|
|
51
|
+
* `// COMPAT: Deprecated aliases` line comment, and that no non-deprecated exports follow the
|
|
52
|
+
* marker. The rule mirrors the workspace's "Deprecated Alias Placement" convention so that
|
|
53
|
+
* deprecated aliases stay segregated from current code and are easy to spot for removal.
|
|
54
|
+
*
|
|
55
|
+
* Only *relocatable* deprecated statements participate (see {@link computeMovableStatements}):
|
|
56
|
+
* type-only declarations (always runtime-safe to move) and runtime value aliases — a
|
|
57
|
+
* `VariableDeclaration` whose initializer references a non-deprecated binding — that are not
|
|
58
|
+
* referenced elsewhere in the file. Primary runtime definitions (literal-valued consts, functions,
|
|
59
|
+
* classes, enums) and any value still referenced by other code are left exactly where they are, so
|
|
60
|
+
* the autofix can never reorder a value below its uses (a use-before-declaration error).
|
|
54
61
|
*
|
|
55
62
|
* The rule reports at most one violation per concern (missing marker, alias above marker,
|
|
56
63
|
* non-deprecated below marker) to keep editor noise manageable; once the first violation in a
|
|
57
64
|
* category is fixed, re-linting will surface the next one.
|
|
58
65
|
*
|
|
59
66
|
* Autofix coverage:
|
|
60
|
-
* - `missingCompatMarker` — inserts `// COMPAT: Deprecated aliases` and consolidates all
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* - `deprecatedAliasNotAtBottom` — moves the misplaced deprecated block from above the marker to
|
|
67
|
+
* - `missingCompatMarker` — inserts `// COMPAT: Deprecated aliases` and consolidates all movable
|
|
68
|
+
* blocks at the bottom of the file. When the movable tail is already at the bottom of the file,
|
|
69
|
+
* only the marker line is inserted (no statements are moved). When movable aliases are
|
|
70
|
+
* interleaved with other statements, the autofix removes each movable block from its current
|
|
71
|
+
* location and re-emits them in source order at the bottom of the file under the marker.
|
|
72
|
+
* - `deprecatedAliasNotAtBottom` — moves the misplaced movable block from above the marker to
|
|
67
73
|
* just after the marker. One block per pass; ESLint's autofix loop converges across multiple
|
|
68
74
|
* violations.
|
|
69
75
|
* - `nonDeprecatedAfterMarker` — moves the misplaced non-deprecated block from below the marker
|
package/fetch/package.json
CHANGED
package/package.json
CHANGED
|
@@ -44,15 +44,15 @@ export type ImageFileExtension = 'jpeg' | 'jpg' | 'png' | 'webp' | 'gif' | 'svg'
|
|
|
44
44
|
/**
|
|
45
45
|
* MIME type for JPEG images.
|
|
46
46
|
*/
|
|
47
|
-
export declare const JPEG_MIME_TYPE
|
|
47
|
+
export declare const JPEG_MIME_TYPE = "image/jpeg";
|
|
48
48
|
/**
|
|
49
49
|
* Non-canonical MIME type sometimes emitted by older browsers/clients for JPEG images.
|
|
50
50
|
*/
|
|
51
|
-
export declare const JPG_MIME_TYPE
|
|
51
|
+
export declare const JPG_MIME_TYPE = "image/jpg";
|
|
52
52
|
/**
|
|
53
53
|
* Progressive JPEG MIME type emitted by some legacy clients (notably Internet Explorer).
|
|
54
54
|
*/
|
|
55
|
-
export declare const PJPEG_MIME_TYPE
|
|
55
|
+
export declare const PJPEG_MIME_TYPE = "image/pjpeg";
|
|
56
56
|
/**
|
|
57
57
|
* All MIME type variants that should be treated as JPEG images, including the canonical
|
|
58
58
|
* `image/jpeg` and the non-standard `image/jpg` and `image/pjpeg` variants emitted by
|
|
@@ -62,31 +62,31 @@ export declare const JPEG_MIME_TYPES: readonly MimeTypeWithoutParameters[];
|
|
|
62
62
|
/**
|
|
63
63
|
* MIME type for PNG images.
|
|
64
64
|
*/
|
|
65
|
-
export declare const PNG_MIME_TYPE
|
|
65
|
+
export declare const PNG_MIME_TYPE = "image/png";
|
|
66
66
|
/**
|
|
67
67
|
* MIME type for WebP images.
|
|
68
68
|
*/
|
|
69
|
-
export declare const WEBP_MIME_TYPE
|
|
69
|
+
export declare const WEBP_MIME_TYPE = "image/webp";
|
|
70
70
|
/**
|
|
71
71
|
* MIME type for GIF images.
|
|
72
72
|
*/
|
|
73
|
-
export declare const GIF_MIME_TYPE
|
|
73
|
+
export declare const GIF_MIME_TYPE = "image/gif";
|
|
74
74
|
/**
|
|
75
75
|
* MIME type for HEIF images.
|
|
76
76
|
*/
|
|
77
|
-
export declare const HEIF_MIME_TYPE
|
|
77
|
+
export declare const HEIF_MIME_TYPE = "image/heif";
|
|
78
78
|
/**
|
|
79
79
|
* MIME type for TIFF images.
|
|
80
80
|
*/
|
|
81
|
-
export declare const TIFF_MIME_TYPE
|
|
81
|
+
export declare const TIFF_MIME_TYPE = "image/tiff";
|
|
82
82
|
/**
|
|
83
83
|
* MIME type for SVG images.
|
|
84
84
|
*/
|
|
85
|
-
export declare const SVG_MIME_TYPE
|
|
85
|
+
export declare const SVG_MIME_TYPE = "image/svg+xml";
|
|
86
86
|
/**
|
|
87
87
|
* MIME type for RAW images.
|
|
88
88
|
*/
|
|
89
|
-
export declare const RAW_MIME_TYPE
|
|
89
|
+
export declare const RAW_MIME_TYPE = "image/raw";
|
|
90
90
|
/**
|
|
91
91
|
* Maps image file extensions to their corresponding MIME types.
|
|
92
92
|
*/
|
|
@@ -118,43 +118,43 @@ export type DocumentFileExtension = 'pdf' | 'docx' | 'xlsx' | 'txt' | 'csv' | 'h
|
|
|
118
118
|
/**
|
|
119
119
|
* MIME type for PDF documents.
|
|
120
120
|
*/
|
|
121
|
-
export declare const PDF_MIME_TYPE
|
|
121
|
+
export declare const PDF_MIME_TYPE = "application/pdf";
|
|
122
122
|
/**
|
|
123
123
|
* MIME type for DOCX (Word) documents.
|
|
124
124
|
*/
|
|
125
|
-
export declare const DOCX_MIME_TYPE
|
|
125
|
+
export declare const DOCX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
126
126
|
/**
|
|
127
127
|
* MIME type for XLSX (Excel) spreadsheets.
|
|
128
128
|
*/
|
|
129
|
-
export declare const XLSX_MIME_TYPE
|
|
129
|
+
export declare const XLSX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
130
130
|
/**
|
|
131
131
|
* MIME type for plain text files.
|
|
132
132
|
*/
|
|
133
|
-
export declare const TXT_MIME_TYPE
|
|
133
|
+
export declare const TXT_MIME_TYPE = "text/plain";
|
|
134
134
|
/**
|
|
135
135
|
* MIME type for CSV files.
|
|
136
136
|
*/
|
|
137
|
-
export declare const CSV_MIME_TYPE
|
|
137
|
+
export declare const CSV_MIME_TYPE = "text/csv";
|
|
138
138
|
/**
|
|
139
139
|
* MIME type for HTML files.
|
|
140
140
|
*/
|
|
141
|
-
export declare const HTML_MIME_TYPE
|
|
141
|
+
export declare const HTML_MIME_TYPE = "text/html";
|
|
142
142
|
/**
|
|
143
143
|
* MIME type for XML files.
|
|
144
144
|
*/
|
|
145
|
-
export declare const XML_MIME_TYPE
|
|
145
|
+
export declare const XML_MIME_TYPE = "application/xml";
|
|
146
146
|
/**
|
|
147
147
|
* MIME type for JSON files.
|
|
148
148
|
*/
|
|
149
|
-
export declare const JSON_MIME_TYPE
|
|
149
|
+
export declare const JSON_MIME_TYPE = "application/json";
|
|
150
150
|
/**
|
|
151
151
|
* MIME type for YAML files.
|
|
152
152
|
*/
|
|
153
|
-
export declare const YAML_MIME_TYPE
|
|
153
|
+
export declare const YAML_MIME_TYPE = "application/yaml";
|
|
154
154
|
/**
|
|
155
155
|
* MIME type for Markdown files.
|
|
156
156
|
*/
|
|
157
|
-
export declare const MARKDOWN_MIME_TYPE
|
|
157
|
+
export declare const MARKDOWN_MIME_TYPE = "text/markdown";
|
|
158
158
|
/**
|
|
159
159
|
* Maps document file extensions to their corresponding MIME types.
|
|
160
160
|
*/
|
|
@@ -186,7 +186,7 @@ export type ApplicationFileExtension = 'zip';
|
|
|
186
186
|
/**
|
|
187
187
|
* MIME type for ZIP archive files.
|
|
188
188
|
*/
|
|
189
|
-
export declare const ZIP_FILE_MIME_TYPE
|
|
189
|
+
export declare const ZIP_FILE_MIME_TYPE = "application/zip";
|
|
190
190
|
/**
|
|
191
191
|
* Maps application file extensions to their corresponding MIME types.
|
|
192
192
|
*/
|