mirror of
https://github.com/denoland/deno.git
synced 2025-09-30 22:21:15 +00:00
upgrade: deno_lint, dprint, swc (#6928)
This commit upgrades: deno_lint 0.1.20 dprint-plugin-typescript 0.25.0 swc_ecmascript 0.1.0 SWC is no longer reexported from dprint nor deno_lint.
This commit is contained in:
parent
4afb4b6e46
commit
b718e6ff53
22 changed files with 290 additions and 326 deletions
|
@ -1,5 +1,4 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
use crate::swc_ecma_ast;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::parser::DocParser;
|
||||
|
@ -13,7 +12,7 @@ pub struct NamespaceDef {
|
|||
|
||||
pub fn get_doc_for_ts_namespace_decl(
|
||||
doc_parser: &DocParser,
|
||||
ts_namespace_decl: &swc_ecma_ast::TsNamespaceDecl,
|
||||
ts_namespace_decl: &swc_ecmascript::ast::TsNamespaceDecl,
|
||||
) -> DocNode {
|
||||
let js_doc = doc_parser.js_doc_for_span(ts_namespace_decl.span);
|
||||
let location = doc_parser
|
||||
|
@ -22,7 +21,7 @@ pub fn get_doc_for_ts_namespace_decl(
|
|||
.into();
|
||||
let namespace_name = ts_namespace_decl.id.sym.to_string();
|
||||
|
||||
use crate::swc_ecma_ast::TsNamespaceBody::*;
|
||||
use swc_ecmascript::ast::TsNamespaceBody::*;
|
||||
|
||||
let elements = match &*ts_namespace_decl.body {
|
||||
TsModuleBlock(ts_module_block) => {
|
||||
|
@ -52,16 +51,16 @@ pub fn get_doc_for_ts_namespace_decl(
|
|||
|
||||
pub fn get_doc_for_ts_module(
|
||||
doc_parser: &DocParser,
|
||||
ts_module_decl: &swc_ecma_ast::TsModuleDecl,
|
||||
ts_module_decl: &swc_ecmascript::ast::TsModuleDecl,
|
||||
) -> (String, NamespaceDef) {
|
||||
use crate::swc_ecma_ast::TsModuleName;
|
||||
use swc_ecmascript::ast::TsModuleName;
|
||||
let namespace_name = match &ts_module_decl.id {
|
||||
TsModuleName::Ident(ident) => ident.sym.to_string(),
|
||||
TsModuleName::Str(str_) => str_.value.to_string(),
|
||||
};
|
||||
|
||||
let elements = if let Some(body) = &ts_module_decl.body {
|
||||
use crate::swc_ecma_ast::TsNamespaceBody::*;
|
||||
use swc_ecmascript::ast::TsNamespaceBody::*;
|
||||
|
||||
match &body {
|
||||
TsModuleBlock(ts_module_block) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue