Skip to content

Commit 1d2e6c8

Browse files
committed
fix: fix bug
1 parent 8de9e15 commit 1d2e6c8

File tree

6 files changed

+1129
-1593
lines changed

6 files changed

+1129
-1593
lines changed

.eslintrc.js

+12-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
module.exports = {
2-
root: true,
3-
env: {
4-
browser: true,
5-
node: true
6-
},
7-
parserOptions: {
8-
parser: 'babel-eslint'
9-
},
102
extends: [
11-
'@nuxtjs',
12-
'plugin:nuxt/recommended'
3+
"prettier",
4+
"plugin:prettier/recommended",
135
],
14-
plugins: [
15-
],
16-
// add your custom rules here
17-
rules: {}
18-
}
6+
plugins: ["prettier"],
7+
rules: {
8+
"@typescript-eslint/no-unused-vars": "off",
9+
"no-unused-vars": "off",
10+
"no-console": "off",
11+
camelcase: "off",
12+
"vue/max-attributes-per-line": "off",
13+
"vue/require-prop-types": "off",
14+
},
15+
};

nuxt.config.js

+38-30
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
1-
import LodashModuleReplacementPlugin from 'lodash-webpack-plugin'
2-
require('dotenv').config()
3-
const isDev = process.env.NODE_ENV === 'development'
1+
require("dotenv").config();
2+
const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");
3+
const isDev = process.env.NODE_ENV === "development";
4+
5+
const modules = [];
6+
7+
if (!isDev) {
8+
modules.push("@nuxtjs/pwa");
9+
}
10+
411
export default {
512
ssr: true,
6-
target: isDev ? 'server' : 'static',
7-
modern: !isDev ? 'client' : false,
13+
target: isDev ? "server" : "static",
14+
// modern: !isDev ? "client" : false,
815
env: {
916
FEATURED_PRODUCT: process.env.FEATURED_PRODUCT
1017
},
1118
generate: {
1219
concurrency: 5,
1320
subFolders: false,
14-
crawler: true
21+
crawler: false,
1522
},
1623
head: {
17-
title: 'vuefront',
24+
title: "vuefront",
1825
meta: [
19-
{ charset: 'utf-8' },
20-
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
21-
{ hid: 'description', name: 'description', content: 'VueFront' }
26+
{ charset: "utf-8" },
27+
{ name: "viewport", content: "width=device-width, initial-scale=1" },
28+
{ hid: "description", name: "description", content: "VueFront" },
2229
],
2330
link: [
2431
{
25-
rel: 'icon',
26-
type: 'image/png',
27-
href: '/favicon.png'
32+
rel: "icon",
33+
type: "image/png",
34+
href: "/favicon.png",
2835
}
2936
],
30-
script: []
37+
script: [],
3138
},
32-
loading: { color: '#3B8070' },
39+
loading: { color: "#3B8070" },
3340
modules: [
34-
'@nuxtjs/pwa',
35-
'@nuxtjs/dotenv',
36-
'vuefront-nuxt'
41+
"@nuxtjs/dotenv",
42+
"vuefront-nuxt",
43+
...modules,
3744
],
3845
buildModules: [
3946
// https://go.nuxtjs.dev/eslint
@@ -48,23 +55,24 @@ export default {
4855
// },
4956
build: {
5057
babel: {
51-
plugins: ['lodash', 'preval']
58+
plugins: ["lodash", "preval"],
5259
},
53-
transpile: ['@vuefront/checkout-app'],
60+
transpile: ["@vuefront/checkout-app"],
5461
extractCSS: !isDev,
62+
corejs: 2,
5563
optimization: {
5664
splitChunks: {
57-
chunks: 'all',
58-
automaticNameDelimiter: '.',
59-
name: 'test',
65+
chunks: "all",
66+
automaticNameDelimiter: ".",
67+
name: "test",
6068
maxSize: 256000,
61-
minSize: 50000
62-
}
69+
minSize: 50000,
70+
},
6371
},
6472
plugins: [
6573
new LodashModuleReplacementPlugin({
66-
shorthands: true
67-
})
68-
]
69-
}
70-
}
74+
shorthands: true,
75+
}),
76+
],
77+
},
78+
};

package.json

+22-11
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
"@aceforth/nuxt-optimized-images": "^1.4.0",
2222
"@nuxtjs/dotenv": "^1.4.1",
2323
"@nuxtjs/pwa": "^3.3.5",
24-
"@vuefront/checkout-app": "0.1.9",
25-
"nuxt": "^2.15.4",
24+
"@vuefront/checkout-app": "^0.1.9",
25+
"nuxt": "2.15.4",
2626
"nuxt-compress": "^5.0.0",
27-
"vuefront-nuxt": "0.3.48"
27+
"vuefront-nuxt": "0.3.49"
2828
},
2929
"devDependencies": {
30-
"@babel/runtime-corejs2": "^7.13.10",
3130
"@commitlint/cli": "^12.0.1",
3231
"@commitlint/config-conventional": "^12.0.1",
3332
"@nuxtjs/eslint-config": "^6.0.0",
@@ -37,15 +36,27 @@
3736
"babel-plugin-lodash": "^3.3.4",
3837
"babel-plugin-preval": "^5.0.0",
3938
"core-js": "2",
40-
"eslint": "^7.22.0",
41-
"eslint-plugin-nuxt": "^2.0.0",
42-
"husky": "^5.1.3",
43-
"lint-staged": "^10.5.4",
39+
"eslint": "^7.23.0",
40+
"eslint-plugin-nuxt": ">=2.0.0",
41+
"eslint-config-prettier": "^8.1.0",
42+
"eslint-plugin-prettier": "^3.3.1",
4443
"lodash-webpack-plugin": "^0.11.6",
45-
"node-sass": "^5.0.0",
46-
"postcss": "^8.2.8",
44+
"prettier": "^2.2.1",
45+
"postcss": "^8.2.9",
4746
"sass-loader": "^10.1.1",
4847
"stylelint": "^13.12.0",
49-
"stylelint-config-standard": "^21.0.0"
48+
"stylelint-config-standard": "^21.0.0",
49+
"stylelint-config-prettier": "^8.0.2",
50+
"stylelint-scss": "^3.19.0",
51+
"cz-conventional-changelog": "3.3.0",
52+
"sass": "^1.32.8"
53+
},
54+
"config": {
55+
"commitizen": {
56+
"path": "./node_modules/cz-conventional-changelog"
57+
}
58+
},
59+
"optionalDependencies": {
60+
"fsevents": "^2.3.2"
5061
}
5162
}

stylelint.config.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
module.exports = {
2-
extends: [
3-
'stylelint-config-standard'
4-
],
2+
extends: ["stylelint-config-standard", "stylelint-config-prettier"],
3+
plugins: ["stylelint-scss"],
54
// add your custom config here
65
// https://stylelint.io/user-guide/configuration
7-
rules: {}
8-
}
6+
rules: {
7+
"at-rule-no-unknown": null,
8+
"scss/at-rule-no-unknown": true,
9+
},
10+
};

vuefront.config.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
21
export default {
3-
app: ['@vuefront/checkout-app'],
2+
app: ["@vuefront/checkout-app"],
43
image: {
54
logo: {
65
path: '~/assets/img/VUE_JS.svg'
@@ -110,5 +109,5 @@ export default {
110109
'/store/checkout': {
111110
contentTop: ['Checkout']
112111
}
113-
}
114-
}
112+
},
113+
};

0 commit comments

Comments
 (0)