You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by hu...@apache.org on 2021/06/23 16:03:23 UTC
[dubbo-js] 02/03: fixed: check-license and add license
This is an automated email from the ASF dual-hosted git repository.
hufeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-js.git
commit aeb54d7e3c215b34da477ce9ce668b6b450eda5d
Author: hufeng <fe...@gmail.com>
AuthorDate: Wed Jun 23 23:50:54 2021 +0800
fixed: check-license and add license
---
scripts/check-license.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/check-license.ts b/scripts/check-license.ts
index 31221c4..93c7084 100644
--- a/scripts/check-license.ts
+++ b/scripts/check-license.ts
@@ -22,6 +22,8 @@ import chalk from 'chalk'
import prettier from 'prettier'
import pkg from '../package.json'
+const prettierConfig = fs.readJSONSync('../.prettierrc')
+
const LICENSE = `/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -169,7 +171,7 @@ function* asyncWriteFiles(files: Array<{ file: string; content: string }>) {
.writeFile(
file,
prettier.format(`${cfg.license}\n\n${content}`, {
- ...pkg.prettier,
+ ...prettierConfig,
parser: 'typescript'
} as any)
)