akfun 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "akfun",
|
|
3
|
+
"version": "1.2.12",
|
|
4
|
+
"description": "前端脚手架:支持Vue技术站和react技术栈",
|
|
5
|
+
"keywords": ["前端工程", "前端脚手架", "webpack"],
|
|
6
|
+
"author": "ldan@wibetter",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"bin": {
|
|
9
|
+
"akfun": "./bin/akfun.js"
|
|
10
|
+
},
|
|
11
|
+
"main": "module/main.js",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"akfun": "akfun",
|
|
14
|
+
"lint": "eslint --ext .js,.vue src",
|
|
15
|
+
"lintFix": "eslint --ext .js,.vue src --fix",
|
|
16
|
+
"format": "prettier --write \"src/**/**/*.{js,vue,tsx,ts,scss,json}\""
|
|
17
|
+
},
|
|
18
|
+
"files": ["bin/*", "module/*", "src/*"],
|
|
19
|
+
"husky": {
|
|
20
|
+
"hooks": {
|
|
21
|
+
"pre-commit": "lint-staged",
|
|
22
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"lint-staged": {
|
|
26
|
+
"src/**/**/*.{js,vue,tsx,ts,scss,json}": ["eslint --ext --fix"],
|
|
27
|
+
"src/**/**/*.{js,vue,tsx,ts,scss,json}": ["prettier --write"]
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+http://git@github.com:wibetter/akfun.git"
|
|
32
|
+
},
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/wibetter/akfun/issues"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"eslint": "^6.2.0 || ^7.0.0"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"del": "^3.0.0",
|
|
41
|
+
"figlet": "^1.2.0",
|
|
42
|
+
"glob": "^7.1.2",
|
|
43
|
+
"yargs": "^12.0.2",
|
|
44
|
+
"chalk": "^4.0.0",
|
|
45
|
+
"opn": "^6.0.0",
|
|
46
|
+
"ora": "^4.0.4",
|
|
47
|
+
"qs": "^6.9.4",
|
|
48
|
+
"rimraf": "^3.0.2",
|
|
49
|
+
"express": "^4.17.1",
|
|
50
|
+
"node-sass": "^4.14.1",
|
|
51
|
+
"portfinder": "^1.0.26",
|
|
52
|
+
"semver": "^7.3.2",
|
|
53
|
+
"shelljs": "^0.8.4",
|
|
54
|
+
"git-clone": "^0.1.0",
|
|
55
|
+
"webpack": "^4.43.0",
|
|
56
|
+
"webpack-bundle-analyzer": "^3.8.0",
|
|
57
|
+
"webpack-cli": "^3.3.11",
|
|
58
|
+
"webpack-dev-middleware": "^3.7.2",
|
|
59
|
+
"webpack-hot-middleware": "^2.25.0",
|
|
60
|
+
"webpack-merge": "^4.2.2",
|
|
61
|
+
"url-loader": "^4.1.0",
|
|
62
|
+
"vue-loader": "^15.9.2",
|
|
63
|
+
"vue-style-loader": "^4.1.2",
|
|
64
|
+
"vue-template-compiler": "^2.6.11",
|
|
65
|
+
"cache-loader": "^4.1.0",
|
|
66
|
+
"compression-webpack-plugin": "^4.0.0",
|
|
67
|
+
"connect-history-api-fallback": "^1.6.0",
|
|
68
|
+
"copy-webpack-plugin": "^6.0.2",
|
|
69
|
+
"css-loader": "^3.5.3",
|
|
70
|
+
"es6-promise-polyfill": "^1.2.0",
|
|
71
|
+
"html-loader": "^1.1.0",
|
|
72
|
+
"html-webpack-plugin": "^4.3.0",
|
|
73
|
+
"http-proxy-middleware": "^1.0.4",
|
|
74
|
+
"autoprefixer": "^9.8.0",
|
|
75
|
+
"mini-css-extract-plugin": "^0.9.0",
|
|
76
|
+
"file-loader": "^6.0.0",
|
|
77
|
+
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
|
78
|
+
"params-replace-loader": "^1.1.6",
|
|
79
|
+
"progress-bar-webpack-plugin": "^2.1.0",
|
|
80
|
+
"sass-loader": "^8.0.2",
|
|
81
|
+
"sass-resources-loader": "^2.0.3",
|
|
82
|
+
"string-replace-loader": "^2.3.0",
|
|
83
|
+
"style-loader": "^1.2.1",
|
|
84
|
+
"eventsource-polyfill": "^0.9.6",
|
|
85
|
+
"friendly-errors-webpack-plugin": "^1.7.0",
|
|
86
|
+
"babel-loader": "^8.1.0",
|
|
87
|
+
"@babel/cli": "^7.10.1",
|
|
88
|
+
"@babel/core": "^7.10.2",
|
|
89
|
+
"@babel/polyfill": "^7.10.1",
|
|
90
|
+
"@babel/plugin-proposal-class-properties": "^7.10.1",
|
|
91
|
+
"@babel/plugin-proposal-decorators": "^7.10.1",
|
|
92
|
+
"@babel/plugin-proposal-export-namespace-from": "^7.10.1",
|
|
93
|
+
"@babel/plugin-proposal-function-sent": "^7.10.1",
|
|
94
|
+
"@babel/plugin-proposal-json-strings": "^7.10.1",
|
|
95
|
+
"@babel/plugin-proposal-numeric-separator": "^7.10.1",
|
|
96
|
+
"@babel/plugin-proposal-throw-expressions": "^7.10.1",
|
|
97
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
98
|
+
"@babel/plugin-syntax-import-meta": "^7.10.1",
|
|
99
|
+
"@babel/plugin-transform-runtime": "^7.10.1",
|
|
100
|
+
"@babel/preset-env": "^7.10.2",
|
|
101
|
+
"@babel/preset-react": "^7.10.1",
|
|
102
|
+
"@babel/register": "^7.10.1",
|
|
103
|
+
"babel-eslint": "^10.1.0",
|
|
104
|
+
"babel-plugin-import": "^1.13.0",
|
|
105
|
+
"eslint-loader": "^4.0.2",
|
|
106
|
+
"eslint": "^7.2.0",
|
|
107
|
+
"eslint-config-airbnb-base": "^14.1.0",
|
|
108
|
+
"eslint-friendly-formatter": "^4.0.1",
|
|
109
|
+
"eslint-import-resolver-webpack": "^0.12.1",
|
|
110
|
+
"eslint-plugin-html": "^6.0.2",
|
|
111
|
+
"eslint-plugin-import": "^2.21.1",
|
|
112
|
+
"eslint-plugin-prettier": "^3.1.3",
|
|
113
|
+
"eslint-plugin-react": "^7.20.0",
|
|
114
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
115
|
+
"vue-eslint-parser": "^7.1.0",
|
|
116
|
+
"stylelint": "^13.6.0",
|
|
117
|
+
"stylelint-config-standard": "^20.0.0",
|
|
118
|
+
"stylelint-webpack-plugin": "^2.0.0",
|
|
119
|
+
"@mapbox/stylelint-processor-arbitrary-tags": "^0.3.0"
|
|
120
|
+
},
|
|
121
|
+
"devDependencies": {
|
|
122
|
+
"husky": "^4.2.5",
|
|
123
|
+
"lint-staged": "^10.2.9",
|
|
124
|
+
"prettier": "^2.0.5",
|
|
125
|
+
"@commitlint/cli": "^8.3.5",
|
|
126
|
+
"@commitlint/config-conventional": "^9.1.1"
|
|
127
|
+
},
|
|
128
|
+
"engines": {
|
|
129
|
+
"node": ">= 10.13.0",
|
|
130
|
+
"npm": ">= 6.4.1"
|
|
131
|
+
},
|
|
132
|
+
"browserslist": [
|
|
133
|
+
"> 1%",
|
|
134
|
+
"last 2 versions",
|
|
135
|
+
"not ie <= 8",
|
|
136
|
+
"iOS >= 8",
|
|
137
|
+
"Firefox >= 20",
|
|
138
|
+
"Android > 4.4"
|
|
139
|
+
]
|
|
140
|
+
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akfun",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "前端脚手架:支持Vue
|
|
5
|
-
"keywords": [
|
|
6
|
-
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "前端脚手架:支持Vue技术栈和react技术栈",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"前端工程",
|
|
7
|
+
"前端脚手架",
|
|
8
|
+
"webpack",
|
|
9
|
+
"react项目脚手架",
|
|
10
|
+
"vue项目脚手架",
|
|
11
|
+
"lib库构建工具"
|
|
12
|
+
],
|
|
13
|
+
"author": "wibetter",
|
|
7
14
|
"license": "MIT",
|
|
8
15
|
"bin": {
|
|
9
16
|
"akfun": "./bin/akfun.js"
|
|
@@ -11,8 +18,6 @@
|
|
|
11
18
|
"main": "module/main.js",
|
|
12
19
|
"scripts": {
|
|
13
20
|
"akfun": "akfun",
|
|
14
|
-
"lint": "eslint --ext .js,.vue src",
|
|
15
|
-
"lintFix": "eslint --ext .js,.vue src --fix",
|
|
16
21
|
"format": "prettier --write \"src/**/**/*.{js,vue,tsx,ts,scss,json}\""
|
|
17
22
|
},
|
|
18
23
|
"files": ["bin/*", "module/*", "src/*"],
|
|
@@ -23,8 +28,7 @@
|
|
|
23
28
|
}
|
|
24
29
|
},
|
|
25
30
|
"lint-staged": {
|
|
26
|
-
"src/**/**/*.{js,
|
|
27
|
-
"src/**/**/*.{js,vue,tsx,ts,scss,json}": ["prettier --write"]
|
|
31
|
+
"src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}": ["prettier --write"]
|
|
28
32
|
},
|
|
29
33
|
"repository": {
|
|
30
34
|
"type": "git",
|
|
@@ -34,96 +38,123 @@
|
|
|
34
38
|
"url": "https://github.com/wibetter/akfun/issues"
|
|
35
39
|
},
|
|
36
40
|
"peerDependencies": {
|
|
37
|
-
"eslint": "^
|
|
41
|
+
"eslint": "^8.8.0",
|
|
42
|
+
"chalk": "^4.0.0",
|
|
43
|
+
"ora": "^4.0.4"
|
|
38
44
|
},
|
|
39
45
|
"dependencies": {
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
46
|
+
"@babel/cli": "^7.17.0",
|
|
47
|
+
"@babel/core": "^7.17.0",
|
|
48
|
+
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
49
|
+
"@babel/plugin-proposal-decorators": "^7.17.0",
|
|
50
|
+
"@babel/plugin-proposal-export-namespace-from": "^7.16.7",
|
|
51
|
+
"@babel/plugin-proposal-function-sent": "^7.16.7",
|
|
52
|
+
"@babel/plugin-proposal-json-strings": "^7.16.7",
|
|
53
|
+
"@babel/plugin-proposal-numeric-separator": "^7.16.7",
|
|
54
|
+
"@babel/plugin-proposal-throw-expressions": "^7.16.7",
|
|
55
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
56
|
+
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
|
57
|
+
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
58
|
+
"@babel/polyfill": "^7.10.1",
|
|
59
|
+
"@babel/preset-env": "^7.16.11",
|
|
60
|
+
"@babel/preset-react": "^7.16.7",
|
|
61
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
62
|
+
"@babel/register": "^7.17.0",
|
|
63
|
+
"@mapbox/stylelint-processor-arbitrary-tags": "^0.4.0",
|
|
64
|
+
"@rollup/plugin-alias": "^3.1.9",
|
|
65
|
+
"@rollup/plugin-babel": "^5.3.0",
|
|
66
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
67
|
+
"@rollup/plugin-image": "^2.1.1",
|
|
68
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
69
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
|
71
|
+
"@typescript-eslint/parser": "^5.10.2",
|
|
72
|
+
"@vue/compiler-sfc": "^3.2.29",
|
|
73
|
+
"@vue/eslint-config-typescript": "^10.0.0",
|
|
74
|
+
"autoprefixer": "^10.4.2",
|
|
75
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
76
|
+
"babel-loader": "^8.2.3",
|
|
77
|
+
"babel-plugin-import": "^1.13.3",
|
|
44
78
|
"chalk": "^4.0.0",
|
|
45
|
-
"
|
|
46
|
-
"ora": "^4.0.4",
|
|
47
|
-
"qs": "^6.9.4",
|
|
48
|
-
"rimraf": "^3.0.2",
|
|
49
|
-
"express": "^4.17.1",
|
|
50
|
-
"node-sass": "^4.14.1",
|
|
51
|
-
"portfinder": "^1.0.26",
|
|
52
|
-
"semver": "^7.3.2",
|
|
53
|
-
"shelljs": "^0.8.4",
|
|
54
|
-
"git-clone": "^0.1.0",
|
|
55
|
-
"webpack": "^4.43.0",
|
|
56
|
-
"webpack-bundle-analyzer": "^3.8.0",
|
|
57
|
-
"webpack-cli": "^3.3.11",
|
|
58
|
-
"webpack-dev-middleware": "^3.7.2",
|
|
59
|
-
"webpack-hot-middleware": "^2.25.0",
|
|
60
|
-
"webpack-merge": "^4.2.2",
|
|
61
|
-
"url-loader": "^4.1.0",
|
|
62
|
-
"vue-loader": "^15.9.2",
|
|
63
|
-
"vue-style-loader": "^4.1.2",
|
|
64
|
-
"vue-template-compiler": "^2.6.11",
|
|
65
|
-
"cache-loader": "^4.1.0",
|
|
66
|
-
"compression-webpack-plugin": "^4.0.0",
|
|
79
|
+
"compression-webpack-plugin": "^9.2.0",
|
|
67
80
|
"connect-history-api-fallback": "^1.6.0",
|
|
68
|
-
"copy-webpack-plugin": "^
|
|
69
|
-
"css-loader": "^
|
|
81
|
+
"copy-webpack-plugin": "^10.2.4",
|
|
82
|
+
"css-loader": "^6.6.0",
|
|
83
|
+
"cssnano": "^5.0.16",
|
|
84
|
+
"deepmerge": "^4.2.2",
|
|
85
|
+
"del": "^6.0.0",
|
|
70
86
|
"es6-promise-polyfill": "^1.2.0",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
87
|
+
"eslint": "^8.8.0",
|
|
88
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
89
|
+
"eslint-config-prettier": "^8.3.0",
|
|
90
|
+
"eslint-friendly-formatter": "^4.0.1",
|
|
91
|
+
"eslint-import-resolver-webpack": "^0.13.2",
|
|
92
|
+
"eslint-webpack-plugin": "^3.1.1",
|
|
93
|
+
"eslint-plugin-html": "^6.2.0",
|
|
94
|
+
"eslint-plugin-import": "^2.25.4",
|
|
95
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
96
|
+
"eslint-plugin-react": "^7.28.0",
|
|
97
|
+
"eslint-plugin-vue": "^8.4.0",
|
|
98
|
+
"eventsource-polyfill": "^0.9.6",
|
|
99
|
+
"express": "^4.17.2",
|
|
100
|
+
"figlet": "^1.5.2",
|
|
101
|
+
"file-loader": "^6.2.0",
|
|
102
|
+
"git-clone": "^0.2.0",
|
|
103
|
+
"glob": "^7.2.0",
|
|
104
|
+
"html-loader": "^3.1.0",
|
|
105
|
+
"html-webpack-plugin": "^5.5.0",
|
|
106
|
+
"http-proxy-middleware": "^2.0.2",
|
|
107
|
+
"inquirer": "^8.2.0",
|
|
108
|
+
"mini-css-extract-plugin": "^2.5.3",
|
|
109
|
+
"monaco-editor-webpack-plugin": "6.0.0",
|
|
110
|
+
"sass": "^1.49.7",
|
|
111
|
+
"open": "^8.4.0",
|
|
112
|
+
"ora": "^4.0.4",
|
|
78
113
|
"params-replace-loader": "^1.1.6",
|
|
114
|
+
"portfinder": "^1.0.28",
|
|
115
|
+
"postcss-loader": "^6.2.1",
|
|
116
|
+
"postcss-nested": "^5.0.6",
|
|
117
|
+
"postcss-preset-env": "^7.3.1",
|
|
118
|
+
"postcss-simple-vars": "^6.0.3",
|
|
79
119
|
"progress-bar-webpack-plugin": "^2.1.0",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"eslint-plugin-import": "^2.21.1",
|
|
112
|
-
"eslint-plugin-prettier": "^3.1.3",
|
|
113
|
-
"eslint-plugin-react": "^7.20.0",
|
|
114
|
-
"eslint-plugin-vue": "^6.2.2",
|
|
115
|
-
"vue-eslint-parser": "^7.1.0",
|
|
116
|
-
"stylelint": "^13.6.0",
|
|
117
|
-
"stylelint-config-standard": "^20.0.0",
|
|
118
|
-
"stylelint-webpack-plugin": "^2.0.0",
|
|
119
|
-
"@mapbox/stylelint-processor-arbitrary-tags": "^0.3.0"
|
|
120
|
+
"qs": "^6.10.3",
|
|
121
|
+
"rimraf": "^3.0.2",
|
|
122
|
+
"rollup": "^2.67.0",
|
|
123
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
124
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
125
|
+
"rollup-plugin-vue": "^6.0.0",
|
|
126
|
+
"sass-loader": "^12.4.0",
|
|
127
|
+
"sass-resources-loader": "^2.2.4",
|
|
128
|
+
"semver": "^7.3.5",
|
|
129
|
+
"shelljs": "^0.8.5",
|
|
130
|
+
"string-replace-loader": "^3.1.0",
|
|
131
|
+
"style-loader": "^3.3.1",
|
|
132
|
+
"stylelint": "^14.3.0",
|
|
133
|
+
"stylelint-config-standard": "^24.0.0",
|
|
134
|
+
"stylelint-webpack-plugin": "^3.1.1",
|
|
135
|
+
"ts-import-plugin": "^2.0.0",
|
|
136
|
+
"ts-loader": "^9.2.6",
|
|
137
|
+
"typescript": "^4.5.5",
|
|
138
|
+
"url-loader": "^4.1.1",
|
|
139
|
+
"vue-eslint-parser": "^8.2.0",
|
|
140
|
+
"vue-loader": "^15.9.8",
|
|
141
|
+
"vue-style-loader": "^4.1.3",
|
|
142
|
+
"vue-template-compiler": "^2.6.14",
|
|
143
|
+
"webpack": "^5.68.0",
|
|
144
|
+
"webpack-bundle-analyzer": "^4.5.0",
|
|
145
|
+
"webpack-cli": "^4.9.2",
|
|
146
|
+
"webpack-dev-middleware": "^5.3.1",
|
|
147
|
+
"webpack-hot-middleware": "^2.25.1",
|
|
148
|
+
"webpack-merge": "^5.8.0",
|
|
149
|
+
"webpack-node-externals": "^3.0.0",
|
|
150
|
+
"yargs": "^17.3.1"
|
|
120
151
|
},
|
|
121
152
|
"devDependencies": {
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
153
|
+
"@commitlint/cli": "^16.1.0",
|
|
154
|
+
"@commitlint/config-conventional": "^16.0.0",
|
|
155
|
+
"husky": "^4.3.8",
|
|
156
|
+
"lint-staged": "^12.3.3",
|
|
157
|
+
"prettier": "^2.5.1"
|
|
127
158
|
},
|
|
128
159
|
"engines": {
|
|
129
160
|
"node": ">= 10.13.0",
|
|
@@ -3,10 +3,11 @@ const { curWebpackBaseConfPath } = require('akfun');
|
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
root: true,
|
|
6
|
-
parser: 'babel-
|
|
6
|
+
parser: '@babel/eslint-parser', // 指定eslint解析器的,解析器必须符合规则
|
|
7
7
|
// 此项是用来指定javaScript语言类型和风格,sourceType用来指定js导入的方式,默认是script,此处设置为module,指某块导入方式
|
|
8
8
|
parserOptions: {
|
|
9
|
-
ecmaVersion:
|
|
9
|
+
ecmaVersion: 8,
|
|
10
|
+
requireConfigFile: false,
|
|
10
11
|
sourceType: 'module', // 支持的ES语法版本,默认为5。注意只是语法,不包括ES的全局变量
|
|
11
12
|
ecmaFeatures: {
|
|
12
13
|
// Features是特征的意思,这里用于指定要使用其他那些语言对象
|
|
@@ -23,11 +24,11 @@ module.exports = {
|
|
|
23
24
|
// 此项是用来配置标准的js风格,就是说写代码的时候要规范的写,如果你使用vs-code我觉得应该可以避免出错
|
|
24
25
|
extends: [
|
|
25
26
|
'airbnb-base', // eslint-config-airbnb-base
|
|
26
|
-
'
|
|
27
|
+
'prettier' // eslint-config-prettier
|
|
27
28
|
],
|
|
28
29
|
// 此项是用来提供插件的,插件名称省略了eslint-plugin-,下面这个配置是用来规范html的
|
|
29
30
|
// required to lint *.src files
|
|
30
|
-
plugins: ['
|
|
31
|
+
plugins: ['prettier', 'html', 'react'],
|
|
31
32
|
// check if imports actually resolve
|
|
32
33
|
settings: {
|
|
33
34
|
'import/resolver': {
|
|
@@ -52,8 +53,8 @@ module.exports = {
|
|
|
52
53
|
vue: 'never'
|
|
53
54
|
}
|
|
54
55
|
],
|
|
55
|
-
'react/jsx-uses-react': 'error',
|
|
56
|
-
'react/jsx-uses-vars': 'error',
|
|
56
|
+
'react/jsx-uses-react': 'error', // 防止在JSX中使用的变量被错误地标记为未使用
|
|
57
|
+
'react/jsx-uses-vars': 'error', // 防止在JSX中使用的变量被错误地标记为未使用
|
|
57
58
|
'import/first': 0,
|
|
58
59
|
'arrow-parens': 0,
|
|
59
60
|
'no-underscore-dangle': 'off',
|
|
@@ -80,6 +81,7 @@ module.exports = {
|
|
|
80
81
|
'no-lonely-if': 0, // 禁止else语句内只有if语句
|
|
81
82
|
'no-eval': 1, // JavaScript的eval()功能具有潜在的危险,并且经常被滥用
|
|
82
83
|
'object-curly-newline': 0, // 该规则在对象文字括号或销毁分配中强制使用一致的换行符
|
|
83
|
-
'operator-linebreak': [0, 'before'] // 换行时运算符在行尾还是行首
|
|
84
|
+
'operator-linebreak': [0, 'before'], // 换行时运算符在行尾还是行首
|
|
85
|
+
'max-len': ['warn', { code: 150 }]
|
|
84
86
|
}
|
|
85
87
|
};
|
|
@@ -12,7 +12,7 @@ module.exports = {
|
|
|
12
12
|
settings: {
|
|
13
13
|
enableESLint: false, // 调试模式是否开启ESLint,默认关闭ESLint检测代码格式
|
|
14
14
|
enableESLintFix: false, // 是否自动修正代码格式,默认不自动修正
|
|
15
|
-
enableStyleLint:
|
|
15
|
+
enableStyleLint: false, // 是否开启StyleLint,默认开启ESLint检测代码格式
|
|
16
16
|
enableStyleLintFix: false // 是否需要StyleLint自动修正代码格式
|
|
17
17
|
},
|
|
18
18
|
webpack: {
|