Skip to content

Commit 972da18

Browse files
committed
Add Stylelint
1 parent b363100 commit 972da18

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

.stylelintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"processors": ["stylelint-processor-styled-components"],
3+
"extends": "stylelint-config-standard",
4+
"syntax": "scss"
5+
}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"prepublish": "babel ./src --out-dir ./lib --ignore tests,stories",
1717
"lint": "eslint src",
1818
"lintfix": "eslint src --fix",
19+
"lint:css": "stylelint './src/**/styles.js'",
1920
"jest": "jest --no-cache",
2021
"test:update": "npm run jest -- -u",
2122
"test": "npm run lint && npm run jest",
@@ -61,7 +62,10 @@
6162
"react-addons-test-utils": "^15.0.0",
6263
"react-dom": "^15.0.0",
6364
"sass-loader": "^4.0.2",
64-
"storybook-addon-specifications": "^1.0.15"
65+
"storybook-addon-specifications": "^1.0.15",
66+
"stylelint": "^7.6.0",
67+
"stylelint-config-standard": "^15.0.0",
68+
"stylelint-processor-styled-components": "^0.0.4"
6569
},
6670
"peerDependencies": {
6771
"react": "^0.14.7 || ^15.0.0"

src/Editor/styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled from 'styled-components';
33
export const EditorContainer = styled.div`
44
height: 100%;
55
6-
>div {
6+
> div {
77
height: 100%;
88
}
99
`;

src/Tabs/styles.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ export const TabsContainer = styled.div`
77
height: 100%;
88
overflow-y: hidden;
99
10-
>div:first-child {
10+
> div:first-child {
1111
display: flex;
1212
flex: 0 0 3em;
13-
14-
>div:first-child {
15-
display: flex;
16-
alignItems: flex-end;
13+
14+
> div:first-child {
15+
display: flex;
16+
align-items: flex-end;
1717
flex-wrap: nowrap;
1818
overflow-x: auto;
1919
@@ -25,34 +25,35 @@ export const TabsContainer = styled.div`
2525
text-align: center;
2626
overflow: hidden;
2727
outline: 0;
28-
transition: all .5s;
28+
transition: all 0.5s;
2929
color: inherit;
3030
31-
&:hover, &:focus {
31+
&:hover,
32+
&:focus {
3233
background-color: rgba(190, 190, 190, 0.4);
3334
}
3435
}
3536
36-
>[data-selected] {
37+
> [data-selected] {
3738
background-color: transparent;
3839
}
3940
}
40-
41-
>div:last-child {
41+
42+
> div:last-child {
4243
flex: 1;
4344
display: flex;
4445
justify-content: flex-end;
4546
align-items: center;
4647
padding: 0 1em;
47-
background-color: rgba(190, 190 ,190, 0.2);
48+
background-color: rgba(190, 190, 190, 0.2);
4849
4950
button {
5051
margin-left: 0.2em;
5152
}
5253
}
5354
}
5455
55-
>div:last-child {
56+
> div:last-child {
5657
flex: 1;
5758
overflow-y: auto;
5859
position: relative;

0 commit comments

Comments
 (0)