chore(cli): update eslint config and prettier codes

This commit is contained in:
陈嘉涵
2020-01-19 11:42:22 +08:00
parent 633e9cf59d
commit 1691451813
52 changed files with 383 additions and 363 deletions
@@ -11,7 +11,7 @@ import {
ES_DIR,
SRC_DIR,
LIB_DIR,
STYPE_DEPS_JSON_FILE
STYPE_DEPS_JSON_FILE,
} from '../common/constant';
function getDeps(component: string): string[] {
@@ -41,12 +41,12 @@ function getRelativePath(component: string, style: string, ext: string) {
const OUTPUT_CONFIG = [
{
dir: ES_DIR,
template: (dep: string) => `import '${dep}';`
template: (dep: string) => `import '${dep}';`,
},
{
dir: LIB_DIR,
template: (dep: string) => `require('${dep}');`
}
template: (dep: string) => `require('${dep}');`,
},
];
function genEntry(params: {
@@ -92,7 +92,7 @@ export function genComponentStyle(
baseFile,
component,
filename: 'index.js',
ext: '.css'
ext: '.css',
});
if (CSS_LANG !== 'css') {
@@ -100,7 +100,7 @@ export function genComponentStyle(
baseFile,
component,
filename: CSS_LANG + '.js',
ext: '.' + CSS_LANG
ext: '.' + CSS_LANG,
});
}
});