From 5d309ff52cd399a6b71968a6b9a70c8ac0b98981 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sat, 5 Mar 2022 19:02:27 +0200 Subject: Added node_modules for the updating to work properly. --- node_modules/@types/prettier/LICENSE | 21 + node_modules/@types/prettier/README.md | 16 + node_modules/@types/prettier/doc.d.ts | 221 ++++++ node_modules/@types/prettier/index.d.ts | 770 +++++++++++++++++++++ node_modules/@types/prettier/package.json | 60 ++ node_modules/@types/prettier/parser-angular.d.ts | 11 + node_modules/@types/prettier/parser-babel.d.ts | 16 + node_modules/@types/prettier/parser-espree.d.ts | 8 + node_modules/@types/prettier/parser-flow.d.ts | 8 + node_modules/@types/prettier/parser-glimmer.d.ts | 8 + node_modules/@types/prettier/parser-graphql.d.ts | 8 + node_modules/@types/prettier/parser-html.d.ts | 11 + node_modules/@types/prettier/parser-markdown.d.ts | 10 + node_modules/@types/prettier/parser-meriyah.d.ts | 8 + node_modules/@types/prettier/parser-postcss.d.ts | 10 + .../@types/prettier/parser-typescript.d.ts | 8 + node_modules/@types/prettier/parser-yaml.d.ts | 8 + node_modules/@types/prettier/standalone.d.ts | 27 + 18 files changed, 1229 insertions(+) create mode 100755 node_modules/@types/prettier/LICENSE create mode 100755 node_modules/@types/prettier/README.md create mode 100755 node_modules/@types/prettier/doc.d.ts create mode 100755 node_modules/@types/prettier/index.d.ts create mode 100755 node_modules/@types/prettier/package.json create mode 100755 node_modules/@types/prettier/parser-angular.d.ts create mode 100755 node_modules/@types/prettier/parser-babel.d.ts create mode 100755 node_modules/@types/prettier/parser-espree.d.ts create mode 100755 node_modules/@types/prettier/parser-flow.d.ts create mode 100755 node_modules/@types/prettier/parser-glimmer.d.ts create mode 100755 node_modules/@types/prettier/parser-graphql.d.ts create mode 100755 node_modules/@types/prettier/parser-html.d.ts create mode 100755 node_modules/@types/prettier/parser-markdown.d.ts create mode 100755 node_modules/@types/prettier/parser-meriyah.d.ts create mode 100755 node_modules/@types/prettier/parser-postcss.d.ts create mode 100755 node_modules/@types/prettier/parser-typescript.d.ts create mode 100755 node_modules/@types/prettier/parser-yaml.d.ts create mode 100755 node_modules/@types/prettier/standalone.d.ts (limited to 'node_modules/@types/prettier') diff --git a/node_modules/@types/prettier/LICENSE b/node_modules/@types/prettier/LICENSE new file mode 100755 index 0000000..9e841e7 --- /dev/null +++ b/node_modules/@types/prettier/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/prettier/README.md b/node_modules/@types/prettier/README.md new file mode 100755 index 0000000..31338f8 --- /dev/null +++ b/node_modules/@types/prettier/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/prettier` + +# Summary +This package contains type definitions for prettier (https://prettier.io). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prettier. + +### Additional Details + * Last updated: Wed, 09 Feb 2022 07:31:26 GMT + * Dependencies: none + * Global values: `prettier` + +# Credits +These definitions were written by [Ika](https://github.com/ikatyang), [Ifiok Jr.](https://github.com/ifiokjr), [Florian Imdahl](https://github.com/ffflorian), [Sosuke Suzuki](https://github.com/sosukesuzuki), [Christopher Quadflieg](https://github.com/Shinigami92), [Georgii Dolzhykov](https://github.com/thorn0), [JounQin](https://github.com/JounQin), and [Chuah Chee Shian](https://github.com/shian15810). diff --git a/node_modules/@types/prettier/doc.d.ts b/node_modules/@types/prettier/doc.d.ts new file mode 100755 index 0000000..9e8d2a4 --- /dev/null +++ b/node_modules/@types/prettier/doc.d.ts @@ -0,0 +1,221 @@ +import { Doc } from './'; + +// https://github.com/prettier/prettier/blob/main/src/document/index.js + +export namespace builders { + type DocCommand = + | Align + | BreakParent + | Concat + | Cursor + | Fill + | Group + | IfBreak + | Indent + | IndentIfBreak + | Label + | Line + | LineSuffix + | LineSuffixBoundary + | Trim; + type Doc = string | Doc[] | DocCommand; + + interface Align { + type: 'align'; + contents: Doc; + n: number | string | { type: 'root' }; + } + + interface BreakParent { + type: 'break-parent'; + } + + interface Concat { + type: 'concat'; + parts: Doc[]; + } + + interface Cursor { + type: 'cursor'; + placeholder: symbol; + } + + interface Fill { + type: 'fill'; + parts: Doc[]; + } + + interface Group { + type: 'group'; + contents: Doc; + break: boolean; + expandedStates: Doc[]; + } + + interface HardlineWithoutBreakParent extends Line { + hard: true; + } + + interface IfBreak { + type: 'if-break'; + breakContents: Doc; + flatContents: Doc; + } + + interface Indent { + type: 'indent'; + contents: Doc; + } + + interface IndentIfBreak { + type: 'indent-if-break'; + } + + interface Label { + type: 'label'; + } + + interface Line { + type: 'line'; + soft?: boolean | undefined; + hard?: boolean | undefined; + literal?: boolean | undefined; + } + + interface LineSuffix { + type: 'line-suffix'; + contents: Doc; + } + + interface LineSuffixBoundary { + type: 'line-suffix-boundary'; + } + + interface LiterallineWithoutBreakParent extends Line { + hard: true; + literal: true; + } + + interface Softline extends Line { + soft: true; + } + + interface Trim { + type: 'trim'; + } + + interface GroupOptions { + shouldBreak?: boolean | undefined; + id?: symbol | undefined; + } + + function addAlignmentToDoc(doc: Doc, size: number, tabWidth: number): Doc; + /** @see [align](https://github.com/prettier/prettier/blob/main/commands.md#align) */ + function align(widthOrString: Align['n'], doc: Doc): Align; + /** @see [breakParent](https://github.com/prettier/prettier/blob/main/commands.md#breakparent) */ + const breakParent: BreakParent; + /** + * @see [concat](https://github.com/prettier/prettier/blob/main/commands.md#deprecated-concat) + * @deprecated use `Doc[]` instead + */ + function concat(docs: Doc[]): Concat; + /** @see [conditionalGroup](https://github.com/prettier/prettier/blob/main/commands.md#conditionalgroup) */ + function conditionalGroup(alternatives: Doc[], options?: GroupOptions): Group; + /** @see [dedent](https://github.com/prettier/prettier/blob/main/commands.md#dedent) */ + function dedent(doc: Doc): Align; + /** @see [dedentToRoot](https://github.com/prettier/prettier/blob/main/commands.md#dedenttoroot) */ + function dedentToRoot(doc: Doc): Align; + /** @see [fill](https://github.com/prettier/prettier/blob/main/commands.md#fill) */ + function fill(docs: Doc[]): Fill; + /** @see [group](https://github.com/prettier/prettier/blob/main/commands.md#group) */ + function group(doc: Doc, opts?: GroupOptions): Group; + /** @see [hardline](https://github.com/prettier/prettier/blob/main/commands.md#hardline) */ + const hardline: Concat; + /** @see [hardlineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */ + const hardlineWithoutBreakParent: HardlineWithoutBreakParent; + /** @see [ifBreak](https://github.com/prettier/prettier/blob/main/commands.md#ifbreak) */ + function ifBreak(ifBreak: Doc, noBreak?: Doc, options?: { groupId?: symbol | undefined }): IfBreak; + /** @see [indent](https://github.com/prettier/prettier/blob/main/commands.md#indent) */ + function indent(doc: Doc): Indent; + /** @see [indentIfBreak](https://github.com/prettier/prettier/blob/main/commands.md#indentifbreak) */ + function indentIfBreak(doc: Doc, opts: { groupId: symbol; negate?: boolean | undefined }): IndentIfBreak; + /** @see [join](https://github.com/prettier/prettier/blob/main/commands.md#join) */ + function join(sep: Doc, docs: Doc[]): Concat; + /** @see [label](https://github.com/prettier/prettier/blob/main/commands.md#label) */ + function label(label: string, doc: Doc): Label; + /** @see [line](https://github.com/prettier/prettier/blob/main/commands.md#line) */ + const line: Line; + /** @see [lineSuffix](https://github.com/prettier/prettier/blob/main/commands.md#linesuffix) */ + function lineSuffix(suffix: Doc): LineSuffix; + /** @see [lineSuffixBoundary](https://github.com/prettier/prettier/blob/main/commands.md#linesuffixboundary) */ + const lineSuffixBoundary: LineSuffixBoundary; + /** @see [literalline](https://github.com/prettier/prettier/blob/main/commands.md#literalline) */ + const literalline: Concat; + /** @see [literallineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */ + const literallineWithoutBreakParent: LiterallineWithoutBreakParent; + /** @see [markAsRoot](https://github.com/prettier/prettier/blob/main/commands.md#markasroot) */ + function markAsRoot(doc: Doc): Align; + /** @see [softline](https://github.com/prettier/prettier/blob/main/commands.md#softline) */ + const softline: Softline; + /** @see [trim](https://github.com/prettier/prettier/blob/main/commands.md#trim) */ + const trim: Trim; + /** @see [cursor](https://github.com/prettier/prettier/blob/main/commands.md#cursor) */ + const cursor: Cursor; +} + +export namespace debug { + function printDocToDebug(doc: Doc): string; +} + +export namespace printer { + function printDocToString( + doc: Doc, + options: Options, + ): { + formatted: string; + cursorNodeStart?: number | undefined; + cursorNodeText?: string | undefined; + }; + interface Options { + /** + * Specify the line length that the printer will wrap on. + * @default 80 + */ + printWidth: number; + /** + * Specify the number of spaces per indentation-level. + * @default 2 + */ + tabWidth: number; + /** + * Indent lines with tabs instead of spaces + * @default false + */ + useTabs: boolean; + parentParser?: string | undefined; + __embeddedInHtml?: boolean | undefined; + } +} + +export namespace utils { + function cleanDoc(doc: Doc): Doc; + function findInDoc(doc: Doc, callback: (doc: Doc) => T, defaultValue: T): T; + function getDocParts(doc: Doc): Doc; + function isConcat(doc: Doc): boolean; + function isEmpty(doc: Doc): boolean; + function isLineNext(doc: Doc): boolean; + function mapDoc(doc: Doc, callback: (doc: Doc) => T): T; + function normalizeDoc(doc: Doc): Doc; + function normalizeParts(parts: Doc[]): Doc[]; + function propagateBreaks(doc: Doc): void; + function removeLines(doc: Doc): Doc; + function replaceNewlinesWithLiterallines(doc: Doc): Doc; + function stripTrailingHardline(doc: Doc): Doc; + function traverseDoc( + doc: Doc, + onEnter?: (doc: Doc) => void | boolean, + onExit?: (doc: Doc) => void, + shouldTraverseConditionalGroups?: boolean, + ): void; + function willBreak(doc: Doc): boolean; +} diff --git a/node_modules/@types/prettier/index.d.ts b/node_modules/@types/prettier/index.d.ts new file mode 100755 index 0000000..6a75a84 --- /dev/null +++ b/node_modules/@types/prettier/index.d.ts @@ -0,0 +1,770 @@ +// Type definitions for prettier 2.4 +// Project: https://prettier.io +// https://github.com/prettier/prettier +// Definitions by: Ika +// Ifiok Jr. +// Florian Imdahl +// Sosuke Suzuki +// Christopher Quadflieg +// Georgii Dolzhykov +// JounQin +// Chuah Chee Shian +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.7 + +// This utility is here to handle the case where you have an explicit union +// between string literals and the generic string type. It would normally +// resolve out to just the string type, but this generic LiteralUnion maintains +// the intellisense of the original union. +// +// It comes from this issue: microsoft/TypeScript#29729: +// https://github.com/microsoft/TypeScript/issues/29729#issuecomment-700527227 +export type LiteralUnion = T | (Pick & { _?: never | undefined }); + +export type AST = any; +export type Doc = doc.builders.Doc; + +// https://github.com/prettier/prettier/blob/main/src/common/ast-path.js + +export class AstPath { + constructor(value: T); + stack: T[]; + getName(): PropertyKey | null; + getValue(): T; + getNode(count?: number): T | null; + getParentNode(count?: number): T | null; + call(callback: (path: this) => U, ...names: PropertyKey[]): U; + callParent(callback: (path: this) => U, count?: number): U; + each(callback: (path: this, index: number, value: any) => void, ...names: PropertyKey[]): void; + map(callback: (path: this, index: number, value: any) => U, ...names: PropertyKey[]): U[]; + match(...predicates: Array<(node: any, name: string | null, number: number | null) => boolean>): boolean; +} + +/** @deprecated `FastPath` was renamed to `AstPath` */ +export type FastPath = AstPath; + +export type BuiltInParser = (text: string, options?: any) => AST; +export type BuiltInParserName = + | 'angular' + | 'babel-flow' + | 'babel-ts' + | 'babel' + | 'css' + | 'espree' + | 'flow' + | 'glimmer' + | 'graphql' + | 'html' + | 'json-stringify' + | 'json' + | 'json5' + | 'less' + | 'lwc' + | 'markdown' + | 'mdx' + | 'meriyah' + | 'scss' + | 'typescript' + | 'vue' + | 'yaml'; +export type BuiltInParsers = Record; + +export type CustomParser = (text: string, parsers: BuiltInParsers, options: Options) => AST; + +/** + * For use in `.prettierrc.js`, `.prettierrc.cjs`, `prettier.config.js` or `prettier.config.cjs`. + */ +export interface Config extends Options { + overrides?: Array<{ + files: string | string[]; + excludeFiles?: string | string[]; + options?: Options; + }>; +} + +export interface Options extends Partial {} + +export interface RequiredOptions extends doc.printer.Options { + /** + * Print semicolons at the ends of statements. + * @default true + */ + semi: boolean; + /** + * Use single quotes instead of double quotes. + * @default false + */ + singleQuote: boolean; + /** + * Use single quotes in JSX. + * @default false + */ + jsxSingleQuote: boolean; + /** + * Print trailing commas wherever possible. + * @default 'es5' + */ + trailingComma: 'none' | 'es5' | 'all'; + /** + * Print spaces between brackets in object literals. + * @default true + */ + bracketSpacing: boolean; + /** + * Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being + * alone on the next line (does not apply to self closing elements). + * @default false + */ + bracketSameLine: boolean; + /** + * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line. + * @default false + * @deprecated use bracketSameLine instead + */ + jsxBracketSameLine: boolean; + /** + * Format only a segment of a file. + * @default 0 + */ + rangeStart: number; + /** + * Format only a segment of a file. + * @default Infinity + */ + rangeEnd: number; + /** + * Specify which parser to use. + */ + parser: LiteralUnion | CustomParser; + /** + * Specify the input filepath. This will be used to do parser inference. + */ + filepath: string; + /** + * Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. + * This is very useful when gradually transitioning large, unformatted codebases to prettier. + * @default false + */ + requirePragma: boolean; + /** + * Prettier can insert a special @format marker at the top of files specifying that + * the file has been formatted with prettier. This works well when used in tandem with + * the --require-pragma option. If there is already a docblock at the top of + * the file then this option will add a newline to it with the @format marker. + * @default false + */ + insertPragma: boolean; + /** + * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer. + * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out. + * @default 'preserve' + */ + proseWrap: 'always' | 'never' | 'preserve'; + /** + * Include parentheses around a sole arrow function parameter. + * @default 'always' + */ + arrowParens: 'avoid' | 'always'; + /** + * Provide ability to support new languages to prettier. + */ + plugins: Array; + /** + * Specify plugin directory paths to search for plugins if not installed in the same `node_modules` where prettier is located. + */ + pluginSearchDirs: string[]; + /** + * How to handle whitespaces in HTML. + * @default 'css' + */ + htmlWhitespaceSensitivity: 'css' | 'strict' | 'ignore'; + /** + * Which end of line characters to apply. + * @default 'lf' + */ + endOfLine: 'auto' | 'lf' | 'crlf' | 'cr'; + /** + * Change when properties in objects are quoted. + * @default 'as-needed' + */ + quoteProps: 'as-needed' | 'consistent' | 'preserve'; + /** + * Whether or not to indent the code inside