Commit 9eb8c1c3 by luojie

update: eslint

parent fbb9e7f2
......@@ -4,12 +4,21 @@ module.exports = {
root: true,
parser: "vue-eslint-parser",
parserOptions: {
parser: '@babel/eslint-parser'
parser: '@babel/eslint-parser',
ecmaVersion: 2021,
ecmaFeatures: {
jsx: true
}
},
env: {
browser: true,
"node": true
node: true
},
extends: [
'standard',
'plugin:vue/recommended'
],
plugins: ['vue'],
// add your custom rules here
rules: {
// 'prettier/prettier': [
......
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const chalk = require('chalk')
const webpack = require('webpack')
......
......@@ -2,8 +2,8 @@
const path = require('path');
module.exports = {
outputDir: '/dist3',
publicPath: '/marketing',
outputDir: 'dist3',
publicPath: 'marketing',
productionGzip: false,
devServerProxy: {
'/api-.*/': {
......
......@@ -7,7 +7,7 @@ exports.assetsPath = function(_path) {
return path.posix.join('static', _path);
};
const cssLoaders = function() {
const cssLoaders = function () {
const sourceMap = process.env.NODE_ENV === 'production' ? false : true
......
......@@ -23,8 +23,8 @@ module.exports = {
},
output: {
path: path.resolve(__dirname, '..', outputDir),
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[name].[chunkhash].js'),
filename: 'js/[name].[chunkhash].js',
chunkFilename: 'js/[name].[chunkhash].js',
publicPath: publicPath,
clean: true
},
......@@ -87,11 +87,11 @@ module.exports = {
},
plugins: [
new VueLoaderPlugin(),
// new ESLintPlugin({
// extensions: ['js', 'vue'],
// files: 'src',
// fix: true
// }),
new ESLintPlugin({
extensions: ['js', 'vue'],
files: 'src',
fix: true
}),
new HtmlWebpackPlugin({
template: 'index.html',
})
......
......@@ -22,15 +22,14 @@ const webpackConfig = merge(baseWebpackConfig, {
},
plugins: [
new MiniCssExtractPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
filename: 'css/[name].[contenthash].css'
}),
new webpack.ids.HashedModuleIdsPlugin(),
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, '../static'),
to: path.resolve(__dirname, '..', outputDir),
to: path.resolve(__dirname, '..', outputDir, 'static'),
info: { minimized: true },
globOptions: {
ignore: ['.*']
......
......@@ -5,7 +5,7 @@
"author": "",
"private": true,
"scripts": {
"dev": "webpack server --progress --config build/webpack.dev.conf.js",
"dev": "webpack server --env NODE_ENV=development --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js",
"format": "onchange 'test/**/*.js' 'src/**/*.js' 'src/**/*.vue' -- prettier --write {{changed}}"
......@@ -51,6 +51,11 @@
"css-loader": "6.5.1",
"css-minimizer-webpack-plugin": "3.1.3",
"eslint": "8.2.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-vue": "^8.0.3",
"eslint-webpack-plugin": "^3.1.1",
"html-webpack-plugin": "5.5.0",
"mini-css-extract-plugin": "2.4.4",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment