Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 62f4066

Browse files
authored
Merge pull request #162 from geotrev/develop
Adds stylelint
2 parents a8cb77a + 51c39ee commit 62f4066

File tree

30 files changed

+1424
-318
lines changed

30 files changed

+1424
-318
lines changed

.eslintrc.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,5 @@ module.exports = {
208208
// jsx-a11y
209209
"jsx-a11y/no-noninteractive-element-interactions": OFF,
210210
"jsx-a11y/no-interactive-element-to-noninteractive-role": OFF,
211-
212-
// used for undernet only
213-
"no-console": OFF,
214211
},
215212
}

app/components/Article/Article.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ export default function Article(props) {
1414
COMPONENTS.forEach(Component => Component.stop())
1515
}
1616

17-
const onMountOnly = []
17+
const observedStateOnMount = []
1818
useEffect(() => {
1919
Prism.highlightAll()
2020
COMPONENTS.forEach(Component => Component.start())
2121
setDomIsLoaded(true)
2222

2323
return componentUnmountFunction
24-
}, onMountOnly)
24+
}, observedStateOnMount)
2525

2626
return (
2727
<article

app/components/Footer/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
.has-feather {
1111
@include colored-link;
1212
display: inline-block;
13-
padding: 1rem;
13+
padding: $global-space;
1414
}
1515
}

app/components/GlobalNav/styles.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
padding: 0;
1414
z-index: 5;
1515

16+
li {
17+
padding: 0;
18+
}
19+
1620
.nav-list {
1721
list-style-type: none;
1822
margin: 0;
@@ -41,23 +45,19 @@
4145
list-style-type: none;
4246
margin: 0;
4347
padding: 0;
48+
}
4449

45-
li {
46-
display: flex;
47-
align-items: center;
48-
}
50+
li {
51+
display: flex;
52+
align-items: center;
4953
}
5054
}
5155
}
5256

53-
li {
54-
padding: 0;
55-
}
56-
5757
li a {
5858
@include colored-link($white);
5959
display: flex;
6060
text-decoration: none;
61-
padding: 1rem;
61+
padding: $global-space;
6262
}
6363
}

app/components/PageHeader/PageHeader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import { FOCUSABLE_TABINDEX, UNFOCUSABLE_TABINDEX } from "./constants"
77
const PageHeader = props => {
88
const [tabIndex, setTabIndex] = useState(FOCUSABLE_TABINDEX)
99
const headerRef = useRef(null)
10-
const onMountOnly = []
10+
const observedStateOnMount = []
1111

1212
useEffect(() => {
1313
if (props.lastLocation) {
1414
headerRef.current.focus()
1515
} else {
1616
setTabIndex(UNFOCUSABLE_TABINDEX)
1717
}
18-
}, onMountOnly)
18+
}, observedStateOnMount)
1919

2020
const handleBlur = () => {
2121
if (tabIndex === UNFOCUSABLE_TABINDEX) return
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { useEffect } from "react"
22

33
export default function ScrollUpOnMount() {
4-
const onMountOnly = []
4+
const observedStateOnMount = []
55

66
useEffect(() => {
77
window.scrollTo(0, 0)
8-
}, onMountOnly)
8+
}, observedStateOnMount)
99

1010
return null
1111
}

app/components/SideNav/SideNav.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ export default function SideNav() {
3333
Accordions.stop()
3434
}
3535

36-
const onMountOnly = []
36+
const observedStateOnMount = []
3737
useEffect(() => {
3838
Accordions.start()
3939
window.addEventListener("resize", handleMenuVisibility)
4040
setMenuIsOpen(isLargerThanCollapseWidth)
4141

4242
return componentUnmountFunction
43-
}, onMountOnly)
43+
}, observedStateOnMount)
4444

45-
const updateConditions = [menuIsOpen]
45+
const observedStateOnUpdate = [menuIsOpen]
4646
useEffect(() => {
4747
Accordions.stop()
4848
Accordions.start()
49-
}, updateConditions)
49+
}, observedStateOnUpdate)
5050

5151
// set up handlers and other helper methods
5252

app/components/SideNav/styles.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@import "app/global";
22

3+
// stylelint-disable
4+
35
#side-nav {
46
background: #fbfbfb;
57

app/layouts/Main/Main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ export default function Main() {
2626
ContextUtil.disableFocusOutline()
2727
}
2828

29-
const onMountOnly = []
29+
const observedStateOnMount = []
3030
useEffect(() => {
3131
ContextUtil.enableFocusOutline()
3232
return componentUnmountFunction
33-
}, onMountOnly)
33+
}, observedStateOnMount)
3434

3535
const handleRefocusClick = ref => {
3636
ref.current.setAttribute(Attributes.TABINDEX, FOCUSABLE_TABINDEX)

app/layouts/Main/prism.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Prism template by Bram de Haan (http://atelierbram.github.io/syntax-highlighting
77
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
88
99
*/
10+
11+
// stylelint-disable
12+
1013
code[class*="language-"],
1114
pre[class*="language-"] {
1215
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console",

0 commit comments

Comments
 (0)