Commit a7307d38 by 张立顺

config:'取消eslint检验'

1 parent 9692c986
...@@ -22,59 +22,91 @@ module.exports = { ...@@ -22,59 +22,91 @@ module.exports = {
echarts: false echarts: false
}, },
rules: { rules: {
'arrow-spacing': [2, { 'arrow-spacing': [
'before': true, 2,
'after': true {
}], before: true,
after: true
}
],
'block-spacing': [2, 'always'], 'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', { 'brace-style': [
'allowSingleLine': true 2,
}], '1tbs',
{
allowSingleLine: true
}
],
'comma-dangle': [2, 'never'], 'comma-dangle': [2, 'never'],
'comma-spacing': [2, { 'comma-spacing': [
'before': false, 2,
'after': true {
}], before: false,
after: true
}
],
'comma-style': [2, 'last'], 'comma-style': [2, 'last'],
'curly': [2, 'multi-line'], curly: [2, 'multi-line'],
'dot-location': [2, 'property'], 'dot-location': [2, 'property'],
'indent': [2, 2, { indent: [
'SwitchCase': 1 2,
}], 2,
'key-spacing': [2, { {
'beforeColon': false, SwitchCase: 1
'afterColon': true }
}], ],
'keyword-spacing': [2, { 'key-spacing': [
'before': true, 2,
'after': true {
}], beforeColon: false,
'new-cap': [2, { afterColon: true
'newIsCap': true, }
'capIsNew': false ],
}], 'keyword-spacing': [
2,
{
before: true,
after: true
}
],
'new-cap': [
2,
{
newIsCap: true,
capIsNew: false
}
],
'no-extra-parens': [2, 'functions'], 'no-extra-parens': [2, 'functions'],
'no-floating-decimal': 2, 'no-floating-decimal': 2,
'no-multi-spaces': 2, 'no-multi-spaces': 2,
'no-multiple-empty-lines': [2, { 'no-multiple-empty-lines': [
'max': 1 2,
}], {
max: 1
}
],
'no-trailing-spaces': 2, 'no-trailing-spaces': 2,
'quotes': [2, 'single', { quotes: [
'avoidEscape': true, 2,
'allowTemplateLiterals': true 'single',
}], {
'semi': [2, 'never'], avoidEscape: true,
allowTemplateLiterals: true
}
],
semi: [2, 'never'],
'space-before-blocks': [2, 'always'], 'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'], 'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'], 'space-in-parens': [2, 'never'],
'space-infix-ops': 2, 'space-infix-ops': 2,
'space-unary-ops': [2, { 'space-unary-ops': [
'words': true, 2,
'nonwords': false {
}], words: true,
nonwords: false
}
],
'spaced-comment': [2, 'always'], 'spaced-comment': [2, 'always'],
'prefer-const': 2 'prefer-const': 2
} }
}
};
...@@ -3,7 +3,7 @@ const ThemeColorReplacer = require('webpack-theme-color-replacer') ...@@ -3,7 +3,7 @@ const ThemeColorReplacer = require('webpack-theme-color-replacer')
const forElementUI = require('webpack-theme-color-replacer/forElementUI') const forElementUI = require('webpack-theme-color-replacer/forElementUI')
// 拼接路径 // 拼接路径
const resolve = (dir) => require('path').join(__dirname, dir) const resolve = dir => require('path').join(__dirname, dir)
// 增加环境变量 // 增加环境变量
process.env.VUE_APP_VERSION = require('./package.json').version process.env.VUE_APP_VERSION = require('./package.json').version
...@@ -37,34 +37,34 @@ const cdn = { ...@@ -37,34 +37,34 @@ const cdn = {
} }
module.exports = { module.exports = {
publicPath, // 根据你的实际情况更改这里 publicPath, // 根据你的实际情况更改这里
lintOnSave: true, lintOnSave: false,
devServer: { devServer: {
//publicPath, // 和 publicPath 保持一致 // publicPath, // 和 publicPath 保持一致
proxy: { proxy: {
'/rop-dj-smartcarlife': { '/rop-dj-smartcarlife': {
target: 'http://dj.test.glsx.com.cn', target: 'http://dj.test.glsx.com.cn',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
pathRewrite: { pathRewrite: {
'^/rop-dj-smartcarlife': '/rop-dj-smartcarlife/router', '^/rop-dj-smartcarlife': '/rop-dj-smartcarlife/router'
}, },
onProxyReq:function(proxyReq, req, res){ onProxyReq: function(proxyReq, req, res) {
console.log(`原路径:${req.originalUrl}`) console.log(`原路径:${req.originalUrl}`)
console.log(`代理路径:${req.url}`) console.log(`代理路径:${req.url}`)
} }
}, }
}, }
}, },
css: { css: {
loaderOptions: { loaderOptions: {
// 设置 scss 公用变量文件 // 设置 scss 公用变量文件
sass: { sass: {
data: "@import '~@/assets/style/public.scss';", data: "@import '~@/assets/style/public.scss';"
}, }
}, }
}, },
configureWebpack: (config) => { configureWebpack: config => {
config.externals = { config.externals = {
vue: 'Vue', vue: 'Vue',
// 'element-ui': 'ELEMENT', // 'element-ui': 'ELEMENT',
...@@ -78,7 +78,7 @@ module.exports = { ...@@ -78,7 +78,7 @@ module.exports = {
// 'vue-i18n':'vue-i18n', // 'vue-i18n':'vue-i18n',
'ua-parser-js': 'UAParser', 'ua-parser-js': 'UAParser',
// 'better-scroll': 'BScroll', // 'better-scroll': 'BScroll',
qs: 'Qs', qs: 'Qs'
// 'core-js': 'core-js' // 'core-js': 'core-js'
} }
// 非开发环境 // 非开发环境
...@@ -87,7 +87,7 @@ module.exports = { ...@@ -87,7 +87,7 @@ module.exports = {
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true
config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = [ config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = [
'console.log', 'console.log'
] ]
} }
// const Plugins = [ // const Plugins = [
...@@ -101,7 +101,7 @@ module.exports = { ...@@ -101,7 +101,7 @@ module.exports = {
}, },
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js // 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
chainWebpack: (config) => { chainWebpack: config => {
/** /**
* 删除懒加载模块的 prefetch preload,降低带宽压力 * 删除懒加载模块的 prefetch preload,降低带宽压力
* https://cli.vuejs.org/zh/guide/html-and-static-assets.html#prefetch * https://cli.vuejs.org/zh/guide/html-and-static-assets.html#prefetch
...@@ -122,27 +122,27 @@ module.exports = { ...@@ -122,27 +122,27 @@ module.exports = {
) )
}, },
matchColors: [ matchColors: [
...forElementUI.getElementUISeries(process.env.VUE_APP_ELEMENT_COLOR), // Element-ui主色系列 ...forElementUI.getElementUISeries(process.env.VUE_APP_ELEMENT_COLOR) // Element-ui主色系列
], ],
externalCssFiles: [ externalCssFiles: [
'./node_modules/element-ui/lib/theme-chalk/index.css', './node_modules/element-ui/lib/theme-chalk/index.css'
], // optional, String or string array. Set external css files (such as cdn css) to extract colors. ], // optional, String or string array. Set external css files (such as cdn css) to extract colors.
changeSelector: forElementUI.changeSelector, changeSelector: forElementUI.changeSelector
}, }
]) ])
config config
// 开发环境 // 开发环境
.when( .when(
process.env.NODE_ENV === 'development', process.env.NODE_ENV === 'development',
// sourcemap不包含列信息 // sourcemap不包含列信息
(config) => config.devtool('cheap-source-map') config => config.devtool('cheap-source-map')
) )
// TRAVIS 构建 vue-loader 添加 filename // TRAVIS 构建 vue-loader 添加 filename
.when( .when(
process.env.VUE_APP_BUILD_MODE === 'TRAVIS' || process.env.VUE_APP_BUILD_MODE === 'TRAVIS' ||
process.env.NODE_ENV === 'development', process.env.NODE_ENV === 'development',
VueFilenameInjector(config, { VueFilenameInjector(config, {
propName: process.env.VUE_APP_SOURCE_VIEWER_PROP_NAME, propName: process.env.VUE_APP_SOURCE_VIEWER_PROP_NAME
}) })
) )
// svg // svg
...@@ -154,7 +154,7 @@ module.exports = { ...@@ -154,7 +154,7 @@ module.exports = {
.use('svg-sprite-loader') .use('svg-sprite-loader')
.loader('svg-sprite-loader') .loader('svg-sprite-loader')
.options({ .options({
symbolId: 'd2-[name]', symbolId: 'd2-[name]'
}) })
.end() .end()
// image exclude // image exclude
...@@ -167,7 +167,7 @@ module.exports = { ...@@ -167,7 +167,7 @@ module.exports = {
config.resolve.alias config.resolve.alias
.set('@', resolve('src')) .set('@', resolve('src'))
.set('@api', resolve('src/api')) .set('@api', resolve('src/api'))
config.plugin('html').tap((args) => { config.plugin('html').tap(args => {
// args[0].minify.removeComments = false; // args[0].minify.removeComments = false;
args[0].cdn = cdn args[0].cdn = cdn
return args return args
...@@ -191,7 +191,7 @@ module.exports = { ...@@ -191,7 +191,7 @@ module.exports = {
locale: 'zh-chs', locale: 'zh-chs',
fallbackLocale: 'en', fallbackLocale: 'en',
localeDir: 'locales', localeDir: 'locales',
enableInSFC: true, enableInSFC: true
}, }
}, }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!