Commit a7307d38 by 张立顺

config:'取消eslint检验'

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