Run prettier to organize imports
This commit is contained in:
Родитель
c807d980ba
Коммит
047920f606
|
@ -1,4 +1,4 @@
|
|||
import { NamespaceType, Type, Program } from "@azure-tools/adl";
|
||||
import { NamespaceType, Program, Type } from "@azure-tools/adl";
|
||||
|
||||
const basePaths = new Map<Type, string>();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ExtensionContext, workspace } from "vscode";
|
||||
import { LanguageClient, LanguageClientOptions, Executable } from "vscode-languageclient/node.js";
|
||||
import { Executable, LanguageClient, LanguageClientOptions } from "vscode-languageclient/node.js";
|
||||
|
||||
let client: LanguageClient | undefined;
|
||||
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
import { createDiagnostic, DiagnosticError, formatDiagnostic } from "./diagnostics.js";
|
||||
import { visitChildren } from "./parser.js";
|
||||
import { createProgram, Program } from "./program.js";
|
||||
import { Program } from "./program.js";
|
||||
import {
|
||||
NamespaceStatementNode,
|
||||
ModelStatementNode,
|
||||
Node,
|
||||
SyntaxKind,
|
||||
TemplateParameterDeclarationNode,
|
||||
SourceLocation,
|
||||
Sym,
|
||||
ADLScriptNode,
|
||||
Declaration,
|
||||
ModelStatementNode,
|
||||
NamespaceStatementNode,
|
||||
Node,
|
||||
OperationStatementNode,
|
||||
ScopeNode,
|
||||
IdentifierNode,
|
||||
ADLScriptNode,
|
||||
Sym,
|
||||
SyntaxKind,
|
||||
TemplateParameterDeclarationNode,
|
||||
UsingStatementNode,
|
||||
} from "./types.js";
|
||||
import { reportDuplicateSymbols } from "./util.js";
|
||||
|
|
|
@ -2,15 +2,14 @@ import { SymbolTable } from "./binder.js";
|
|||
import { throwDiagnostic } from "./diagnostics.js";
|
||||
import { Program } from "./program.js";
|
||||
import {
|
||||
ADLScriptNode,
|
||||
ArrayExpressionNode,
|
||||
BooleanLiteralNode,
|
||||
BooleanLiteralType,
|
||||
DecoratorSymbol,
|
||||
IdentifierNode,
|
||||
OperationStatementNode,
|
||||
NamespaceStatementNode,
|
||||
NamespaceType,
|
||||
OperationType,
|
||||
IntersectionExpressionNode,
|
||||
IntrinsicType,
|
||||
LiteralNode,
|
||||
LiteralType,
|
||||
ModelExpressionNode,
|
||||
|
@ -18,27 +17,26 @@ import {
|
|||
ModelStatementNode,
|
||||
ModelType,
|
||||
ModelTypeProperty,
|
||||
NamespaceStatementNode,
|
||||
NamespaceType,
|
||||
Node,
|
||||
NumericLiteralNode,
|
||||
NumericLiteralType,
|
||||
OperationStatementNode,
|
||||
OperationType,
|
||||
ReferenceExpression,
|
||||
StringLiteralNode,
|
||||
StringLiteralType,
|
||||
SymbolLinks,
|
||||
SyntaxKind,
|
||||
TypeReferenceNode,
|
||||
TemplateParameterDeclarationNode,
|
||||
TupleExpressionNode,
|
||||
TupleType,
|
||||
Type,
|
||||
TypeReferenceNode,
|
||||
TypeSymbol,
|
||||
UnionExpressionNode,
|
||||
UnionType,
|
||||
ReferenceExpression,
|
||||
DecoratorSymbol,
|
||||
TypeSymbol,
|
||||
SymbolLinks,
|
||||
MemberExpressionNode,
|
||||
Sym,
|
||||
ADLScriptNode,
|
||||
IntrinsicType,
|
||||
} from "./types.js";
|
||||
import { reportDuplicateSymbols } from "./util.js";
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import url, { fileURLToPath, pathToFileURL } from "url";
|
||||
import yargs from "yargs";
|
||||
import mkdirp from "mkdirp";
|
||||
import path, { join, resolve } from "path";
|
||||
import { compile } from "../compiler/program.js";
|
||||
import { spawnSync } from "child_process";
|
||||
import { mkdtemp, readdir, rmdir } from "fs/promises";
|
||||
import mkdirp from "mkdirp";
|
||||
import os from "os";
|
||||
import path, { join, resolve } from "path";
|
||||
import url from "url";
|
||||
import yargs from "yargs";
|
||||
import { CompilerOptions } from "../compiler/options.js";
|
||||
import { compile } from "../compiler/program.js";
|
||||
import { DiagnosticError, dumpError, logDiagnostics } from "./diagnostics.js";
|
||||
import { adlVersion, NodeHost } from "./util.js";
|
||||
import { mkdtemp, readdir, rmdir } from "fs/promises";
|
||||
import os from "os";
|
||||
|
||||
const args = yargs(process.argv.slice(2))
|
||||
.scriptName("adl")
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import assert, { AssertionError } from "assert";
|
||||
import { AssertionError } from "assert";
|
||||
import { CharacterCodes } from "./character-codes.js";
|
||||
import {
|
||||
Diagnostic,
|
||||
Message,
|
||||
Node,
|
||||
SourceFile,
|
||||
SourceLocation,
|
||||
Sym,
|
||||
SyntaxKind,
|
||||
Type,
|
||||
Sym,
|
||||
SourceFile,
|
||||
Diagnostic,
|
||||
} from "./types.js";
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export * from "./types.js";
|
||||
export * from "./program.js";
|
||||
export * from "./diagnostics.js";
|
||||
export * from "../lib/decorators.js";
|
||||
export * from "./diagnostics.js";
|
||||
export * from "./program.js";
|
||||
export * from "./types.js";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SymbolTable } from "./binder.js";
|
||||
import { createDiagnostic, compilerAssert, DiagnosticTarget } from "./diagnostics.js";
|
||||
import { compilerAssert, createDiagnostic, DiagnosticTarget } from "./diagnostics.js";
|
||||
import {
|
||||
createScanner,
|
||||
isKeyword,
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
import { dirname, extname, isAbsolute, resolve } from "path";
|
||||
import { join } from "path";
|
||||
import { dirname, extname, isAbsolute, join, resolve } from "path";
|
||||
import resolveModule from "resolve";
|
||||
import { createBinder, SymbolTable } from "./binder.js";
|
||||
import { createChecker, MultiKeyMap } from "./checker.js";
|
||||
import { createSourceFile, DiagnosticError, throwDiagnostic } from "./diagnostics.js";
|
||||
import { CompilerOptions } from "./options.js";
|
||||
import { parse } from "./parser.js";
|
||||
import {
|
||||
ADLScriptNode,
|
||||
CompilerHost,
|
||||
DecoratorExpressionNode,
|
||||
DecoratorSymbol,
|
||||
IdentifierNode,
|
||||
LiteralType,
|
||||
ModelStatementNode,
|
||||
ModelType,
|
||||
NamespaceStatementNode,
|
||||
SyntaxKind,
|
||||
Type,
|
||||
DecoratorSymbol,
|
||||
CompilerHost,
|
||||
NamespaceStatementNode,
|
||||
} from "./types.js";
|
||||
import { createSourceFile, DiagnosticError, throwDiagnostic } from "./diagnostics.js";
|
||||
import resolveModule from "resolve";
|
||||
|
||||
export interface Program {
|
||||
compilerOptions: CompilerOptions;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import fs from "fs";
|
||||
import { readdir, readFile, realpath, stat, writeFile } from "fs/promises";
|
||||
import { join, resolve } from "path";
|
||||
import { fileURLToPath, pathToFileURL, URL } from "url";
|
||||
import { SymbolTable } from "./binder.js";
|
||||
import { createDiagnostic, DiagnosticError, WriteLine } from "./diagnostics.js";
|
||||
import { createDiagnostic, DiagnosticError } from "./diagnostics.js";
|
||||
import { CompilerHost, Diagnostic, Sym } from "./types";
|
||||
import { stat, readFile, readdir, realpath, writeFile } from "fs/promises";
|
||||
import { join, resolve } from "path";
|
||||
|
||||
export const adlVersion = getVersion();
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
import { adlVersion } from "../compiler/util.js";
|
||||
import { createSourceFile } from "../compiler/diagnostics.js";
|
||||
import { parse } from "../compiler/parser.js";
|
||||
import { TextDocument } from "vscode-languageserver-textdocument";
|
||||
import {
|
||||
Connection,
|
||||
|
@ -15,6 +12,9 @@ import {
|
|||
TextDocuments,
|
||||
TextDocumentSyncKind,
|
||||
} from "vscode-languageserver/node.js";
|
||||
import { createSourceFile } from "../compiler/diagnostics.js";
|
||||
import { parse } from "../compiler/parser.js";
|
||||
import { adlVersion } from "../compiler/util.js";
|
||||
|
||||
let connection: Connection;
|
||||
let documents: TextDocuments<TextDocument>;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { strictEqual, ok, rejects } from "assert";
|
||||
import { ModelType, NamespaceType, Type } from "../../compiler/types.js";
|
||||
import { rejects } from "assert";
|
||||
import { createTestHost, TestHost } from "../test-host.js";
|
||||
|
||||
describe("duplicate declarations", () => {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import { strictEqual, ok } from "assert";
|
||||
import { ModelType, NamespaceType, Type } from "../../compiler/types.js";
|
||||
import { createTestHost, TestHost } from "../test-host.js";
|
||||
|
||||
describe("loader", () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { strictEqual, ok } from "assert";
|
||||
import { ok, strictEqual } from "assert";
|
||||
import { ModelType, NamespaceType, Type } from "../../compiler/types.js";
|
||||
import { createTestHost, TestHost } from "../test-host.js";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { strictEqual, ok } from "assert";
|
||||
import { ok, strictEqual } from "assert";
|
||||
import { ModelType, Type } from "../../compiler/types.js";
|
||||
import { createTestHost, TestHost } from "../test-host.js";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ok, rejects, strictEqual } from "assert";
|
||||
import { rejects, strictEqual } from "assert";
|
||||
import { ModelType } from "../../compiler/types";
|
||||
import { createTestHost, TestHost } from "../test-host.js";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { strictEqual, ok } from "assert";
|
||||
import { ModelType, Type } from "../../compiler/types.js";
|
||||
import { strictEqual } from "assert";
|
||||
import { ModelType } from "../../compiler/types.js";
|
||||
import { getMaxValue, getMinValue } from "../../lib/decorators.js";
|
||||
import { createTestHost, TestHost } from "../test-host.js";
|
||||
import { getMinValue, getMaxValue } from "../../lib/decorators.js";
|
||||
|
||||
describe("range limiting decorators", () => {
|
||||
let testHost: TestHost;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import resolve from "resolve";
|
||||
import { fileURLToPath, URL } from "url";
|
||||
import { createProgram } from "../../compiler/program.js";
|
||||
import { NodeHost } from "../../compiler/util.js";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { readdir, readFile } from "fs/promises";
|
||||
import { basename, isAbsolute, join, normalize, relative, resolve, sep } from "path";
|
||||
import { fileURLToPath, pathToFileURL, URL } from "url";
|
||||
import { fileURLToPath, pathToFileURL } from "url";
|
||||
import { createProgram } from "../compiler/program.js";
|
||||
import { CompilerHost, Type } from "../compiler/types";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as assert from "assert";
|
||||
import { logDiagnostics, logVerboseTestOutput } from "../compiler/diagnostics.js";
|
||||
import { parse } from "../compiler/parser.js";
|
||||
import { ADLScriptNode, Node, SyntaxKind } from "../compiler/types.js";
|
||||
import { ADLScriptNode, SyntaxKind } from "../compiler/types.js";
|
||||
|
||||
describe("syntax", () => {
|
||||
describe("import statements", () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { loadWASM, OnigRegExp } from "onigasm";
|
||||
import { readFile } from "fs/promises";
|
||||
import { loadWASM, OnigRegExp } from "onigasm";
|
||||
import { dirname, resolve } from "path";
|
||||
import plist from "plist";
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче