chore(cli): update eslint config and prettier codes
This commit is contained in:
@@ -4,26 +4,26 @@ import {
|
||||
ROOT,
|
||||
JEST_SETUP_FILE,
|
||||
JEST_FILE_MOCK_FILE,
|
||||
JEST_STYLE_MOCK_FILE
|
||||
JEST_STYLE_MOCK_FILE,
|
||||
} from '../common/constant';
|
||||
|
||||
const DEFAULT_CONFIG = {
|
||||
moduleNameMapper: {
|
||||
'\\.(css|less|scss)$': JEST_STYLE_MOCK_FILE,
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': JEST_FILE_MOCK_FILE
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': JEST_FILE_MOCK_FILE,
|
||||
},
|
||||
setupFilesAfterEnv: [JEST_SETUP_FILE],
|
||||
moduleFileExtensions: ['js', 'jsx', 'vue', 'ts', 'tsx'],
|
||||
transform: {
|
||||
'\\.(vue)$': 'vue-jest',
|
||||
'\\.(js|jsx|ts|tsx)$': 'babel-jest'
|
||||
'\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
transformIgnorePatterns: ['/node_modules/(?!(@vant/cli))/'],
|
||||
snapshotSerializers: ['jest-serializer-vue'],
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx,vue}', '!**/demo/**'],
|
||||
coverageReporters: ['html', 'lcov', 'text-summary'],
|
||||
coverageDirectory: './test/coverage'
|
||||
coverageDirectory: './test/coverage',
|
||||
};
|
||||
|
||||
function readRootConfig() {
|
||||
@@ -38,5 +38,5 @@ function readRootConfig() {
|
||||
|
||||
module.exports = {
|
||||
...DEFAULT_CONFIG,
|
||||
...readRootConfig()
|
||||
...readRootConfig(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user