Skip to content
This repository was archived by the owner on May 15, 2022. It is now read-only.

Commit 57da4d3

Browse files
committed
Implement Stylelint, add linting scripts, fix linting issues in scss, add missing package.json entries
1 parent 9af211f commit 57da4d3

File tree

4 files changed

+835
-34
lines changed

4 files changed

+835
-34
lines changed

.stylelintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Configure Stylint
3+
*
4+
* https://github.com/stylelint/stylelint-config-recommended
5+
*/
6+
module.exports = {
7+
extends: ['stylelint-config-recommended']
8+
};

package.json

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "react-dat-gui",
3-
"version": "3.0.0",
3+
"version": "4.0.0",
44
"description": "dat.GUI reimagined for React",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.es.js",
77
"jsnext:main": "dist/index.es.js",
8-
"style": "dist/index.css",
98
"types": "index.d.ts",
9+
"author": "Claus Wahlers <[email protected]> (https://github.com/claus)",
1010
"contributors": [
1111
{
1212
"name": "Claus Wahlers",
@@ -17,6 +17,11 @@
1717
"name": "Rohan Deshpande",
1818
"email": "[email protected]",
1919
"url": "https://github.com/rohan-deshpande"
20+
},
21+
{
22+
"name": "Tim Ellenberger",
23+
"email": "[email protected]",
24+
"url": "https://github.com/tim-soft"
2025
}
2126
],
2227
"license": "MIT",
@@ -28,6 +33,10 @@
2833
"type": "git",
2934
"url": "[email protected]:claus/react-dat-gui.git"
3035
},
36+
"bugs": {
37+
"url": "https://github.com/claus/react-dat-gui/issues"
38+
},
39+
"homepage": "https://claus.github.io/react-dat-gui/",
3140
"files": [
3241
"dist"
3342
],
@@ -37,9 +46,12 @@
3746
"prepare": "yarn run build",
3847
"test": "jest",
3948
"test:watch": "jest --watch",
40-
"dev": "npm run start --prefix dev",
49+
"lint": "yarn lint-js && yarn lint-styles",
4150
"lint-js": "eslint --ignore-path .gitignore --ignore-pattern \"!**/.*\" .",
42-
"fix-js": "yarn run lint-js --fix"
51+
"lint-styles": "stylelint --ignore-path .gitignore --ignore-pattern \"!**/.*\" \"./**/*.{css,less,styl,scss,sass,sss}\"",
52+
"fix": "yarn fix-js && yarn fix-styles",
53+
"fix-js": "yarn lint-js --fix",
54+
"fix-styles": "yarn lint-styles --fix"
4355
},
4456
"husky": {
4557
"hooks": {
@@ -55,6 +67,10 @@
5567
"prettier --write",
5668
"eslint --no-ignore --fix",
5769
"git add --force"
70+
],
71+
"*.{css,less,styl,scss,sass,sss}": [
72+
"stylelint --fix",
73+
"git add --force"
5874
]
5975
},
6076
"dependencies": {
@@ -104,7 +120,9 @@
104120
"rollup-plugin-filesize": "^6.2.0",
105121
"rollup-plugin-node-resolve": "^5.2.0",
106122
"rollup-plugin-postcss": "^2.0.3",
107-
"rollup-plugin-scss": "^1.0.2"
123+
"rollup-plugin-scss": "^1.0.2",
124+
"stylelint": "^10.1.0",
125+
"stylelint-config-recommended": "^2.2.0"
108126
},
109127
"peerDependencies": {
110128
"prop-types": "^15.7.2",

src/style/_color.scss

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
}
2727

2828
.picker {
29-
background: '#fff';
29+
background: #fff;
3030
box-shadow: 0 0 2px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.3);
3131
box-sizing: initial;
3232
width: auto;
33-
font-family: 'Menlo';
33+
font-family: Menlo, sans-serif;
3434
margin-top: -3px;
3535

3636
.body {
@@ -45,10 +45,6 @@
4545
.hue-wrap {
4646
height: 10px;
4747
position: relative;
48-
49-
.hue {
50-
radius: 2px;
51-
}
5248
}
5349
}
5450
}
@@ -59,10 +55,6 @@
5955
padding-bottom: 55%;
6056
position: relative;
6157
overflow: hidden;
62-
63-
.saturation {
64-
radius: 2px 2px 0 0;
65-
}
6658
}
6759
}
6860

0 commit comments

Comments
 (0)