Skip to content

Commit a6fb216

Browse files
authored
Merge pull request #17 from uniquemo/feat/style-lint
feat: add style lint
2 parents b1e8583 + 3f72470 commit a6fb216

File tree

46 files changed

+754
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+754
-77
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
"typescript",
1818
"javascriptreact",
1919
"typescriptreact"
20-
]
20+
],
21+
"stylelint.enable": true, // 开启stylelint vscode插件
22+
"css.validate": false, // 关闭vscode默认的css插件
23+
"scss.validate": false // 关闭vscode默认的scss插件
2124
}

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## [1.1.4](https://github.com/uniquemo/react-netease-music/compare/v1.1.3...v1.1.4) (2020-11-04)
2+
3+
4+
### Bug Fixes
5+
6+
* html-webpack-plugin warning ([df2ae8c](https://github.com/uniquemo/react-netease-music/commit/df2ae8c544c586aeff47785dfaf1ed1bf3ccce46))
7+
8+
9+
### Features
10+
11+
* lint style files ([883628f](https://github.com/uniquemo/react-netease-music/commit/883628f02658779f6111be13a7c63167e5d0f47e))
12+
* **issues:** add 升级react16到react17 ([0f1355b](https://github.com/uniquemo/react-netease-music/commit/0f1355b309773f52b2c7754f64f30fe5902150e2))
13+
* update @babel/preset-react config, set runtime to automatic ([d7c8a62](https://github.com/uniquemo/react-netease-music/commit/d7c8a622f641b1306ca7c4ee5023ad48eb6428a3))
14+
* upgrade html-webpack-plugin version ([486fe26](https://github.com/uniquemo/react-netease-music/commit/486fe26cdd1b39962c3606e78e3fe856b22df3fc))
15+
* upgrade react16 to react17 ([287d4a0](https://github.com/uniquemo/react-netease-music/commit/287d4a0728d3038d2df99e7359d29f7e29bee083))
16+
* upgrade typescript3 to typescript4 ([93a54b1](https://github.com/uniquemo/react-netease-music/commit/93a54b1d6415a5cb90aa2dcc78229abfa4fcf773))
17+
18+
19+
120
## [1.1.3](https://github.com/uniquemo/react-netease-music/compare/v1.1.2...v1.1.3) (2020-10-21)
221

322

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "react-netease-music",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"description": "基于React、TypeScript的高仿网易云mac客户端播放器",
55
"main": "index.js",
66
"scripts": {
77
"dev": "node --trace-deprecation node_modules/.bin/webpack serve --mode=development",
88
"build": "webpack --mode=production",
99
"type-check": "tsc --watch",
1010
"lint": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
11+
"style-lint": "stylelint 'src/**/*.css' --fix",
1112
"release": "./deploy/bash.sh",
1213
"docker-release": "./deploy/docker.sh",
1314
"changelog-gen": "conventional-changelog -p angular -i CHANGELOG.md -s",
@@ -48,6 +49,10 @@
4849
"lint-staged": {
4950
"src/**/*.{js,jsx,ts,tsx}": [
5051
"eslint --fix"
52+
],
53+
"src/**/*.css": [
54+
"prettier --write",
55+
"stylelint --config stylelint.config.js --fix"
5156
]
5257
},
5358
"devDependencies": {
@@ -83,6 +88,8 @@
8388
"postcss-nested": "^4.2.1",
8489
"prettier": "^2.1.0",
8590
"style-loader": "^1.2.1",
91+
"stylelint": "^13.7.2",
92+
"stylelint-config-standard": "^20.0.0",
8693
"terser-webpack-plugin": "^5.0.0",
8794
"typescript": "^4.0.5",
8895
"url-loader": "^4.1.0",

src/components/Artists/style.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@value colors: "~styles/colors.module.css";
1+
@value colors: '~styles/colors.module.css';
22
@value tipsColor, tipsHoverColor from colors;
33

44
.root {

src/components/Comment/style.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@value colors: "~styles/colors.module.css";
1+
@value colors: '~styles/colors.module.css';
22
@value blue, tipsHoverColor from colors;
33

44
.root {
@@ -31,6 +31,7 @@
3131
.reply {
3232
margin-bottom: 10px;
3333
font-size: 0.9em;
34+
3435
.item {
3536
width: 100%;
3637
padding: 8px 10px;

src/components/Layout/Footer/PlayOperations/style.module.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
@value colors: "~styles/colors.module.css";
1+
@value colors: '~styles/colors.module.css';
22
@value red from colors;
33

4-
.prev, .next, .pause {
4+
.prev,
5+
.next,
6+
.pause {
57
cursor: pointer;
68
}
79

@@ -25,4 +27,4 @@
2527
& svg {
2628
color: #fff;
2729
}
28-
}
30+
}

src/components/Layout/Footer/PlayRecord/List/style.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@value colors: "~styles/colors.module.css";
1+
@value colors: '~styles/colors.module.css';
22
@value tipsColor, borderColor, nameHoverColor, nameColor from colors;
33

44
.name {
@@ -13,6 +13,7 @@
1313
.text {
1414
display: flex;
1515
align-items: center;
16+
1617
span {
1718
margin-right: 5px;
1819
}

src/components/Layout/Footer/PlayRecord/style.module.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@value constants: "~styles/constants.module.css";
1+
@value constants: '~styles/constants.module.css';
22
@value footerHeight, headerHeight from constants;
33

4-
@value colors: "~styles/colors.module.css";
4+
@value colors: '~styles/colors.module.css';
55
@value tipsColor, borderColor from colors;
66

77
.root {
@@ -43,7 +43,8 @@
4343
}
4444
}
4545

46-
.active, .active:hover {
46+
.active,
47+
.active:hover {
4748
color: #fff;
4849
background-color: tipsColor;
4950
}

src/components/Layout/Footer/PlayVolume/style.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@value colors: "~styles/colors.module.css";
1+
@value colors: '~styles/colors.module.css';
22
@value tipsColor from colors;
33

44
.root {

src/components/Layout/Footer/style.module.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@value colors: "~styles/colors.module.css";
1+
@value colors: '~styles/colors.module.css';
22
@value red from colors;
33

4-
@value constants: "~styles/constants.module.css";
4+
@value constants: '~styles/constants.module.css';
55
@value footerHeight, bodyMinWidth from constants;
66

77
.root {
@@ -55,11 +55,11 @@
5555
.hideLyric {
5656
display: block;
5757
}
58-
58+
5959
& img {
6060
width: 40px;
6161
height: 40px;
62-
margin-right: 10px;;
62+
margin-right: 10px;
6363
border: none;
6464
border-radius: 5px;
6565
background-color: #ccc;

0 commit comments

Comments
 (0)