Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paragon
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
paragon
Commits
7986fc94
Unverified
Commit
7986fc94
authored
Dec 18, 2017
by
Jae Bradley
Committed by
GitHub
Dec 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #103 from edx/fix-node-6-linting-errors
fix(eslint): fix Node 6 eslint errors
parents
c20de7c3
b77cef52
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
17 deletions
+20
-17
src/Modal/Modal.stories.jsx
+0
-4
src/Modal/index.jsx
+4
-5
src/StatusAlert/StatusAlert.test.jsx
+1
-4
src/Table/Table.test.jsx
+10
-4
src/Tabs/index.jsx
+5
-0
No files found.
src/Modal/Modal.stories.jsx
View file @
7986fc94
...
@@ -51,10 +51,6 @@ ModalWrapper.propTypes = {
...
@@ -51,10 +51,6 @@ ModalWrapper.propTypes = {
body
:
PropTypes
.
oneOfType
([
PropTypes
.
string
,
PropTypes
.
element
]).
isRequired
,
body
:
PropTypes
.
oneOfType
([
PropTypes
.
string
,
PropTypes
.
element
]).
isRequired
,
};
};
ModalWrapper
.
defaultProps
=
{
open
:
false
,
};
storiesOf
(
'Modal'
,
module
)
storiesOf
(
'Modal'
,
module
)
.
add
(
'basic usage'
,
()
=>
(
.
add
(
'basic usage'
,
()
=>
(
<
Modal
<
Modal
...
...
src/Modal/index.jsx
View file @
7986fc94
...
@@ -89,13 +89,12 @@ class Modal extends React.Component {
...
@@ -89,13 +89,12 @@ class Modal extends React.Component {
}
}
renderBody
()
{
renderBody
()
{
let
body
;
let
{
body
}
=
this
.
props
;
if
(
typeof
this
.
props
.
body
===
'string'
)
{
if
(
typeof
body
===
'string'
)
{
body
=
<
p
>
{
this
.
props
.
body
}
</
p
>;
body
=
<
p
>
{
body
}
</
p
>;
}
else
{
body
=
this
.
props
.
body
;
}
}
return
body
;
return
body
;
}
}
...
...
src/StatusAlert/StatusAlert.test.jsx
View file @
7986fc94
...
@@ -117,10 +117,7 @@ describe('<StatusAlert />', () => {
...
@@ -117,10 +117,7 @@ describe('<StatusAlert />', () => {
});
});
describe
(
'focus functions properly'
,
()
=>
{
describe
(
'focus functions properly'
,
()
=>
{
it
(
'focus function changes focus'
,
()
=>
{
it
(
'focus function changes focus'
,
()
=>
{
wrapper
=
mount
(<
div
>
wrapper
=
mount
(<
div
><
Button
label=
"test"
/><
StatusAlert
{
...
defaultProps
}
/></
div
>);
<
Button
label=
"test"
/>
<
StatusAlert
{
...
defaultProps
}
/>
</
div
>);
const
buttons
=
wrapper
.
find
(
'button'
);
const
buttons
=
wrapper
.
find
(
'button'
);
...
...
src/Table/Table.test.jsx
View file @
7986fc94
...
@@ -12,9 +12,15 @@ const props = {
...
@@ -12,9 +12,15 @@ const props = {
{
key
:
'i'
,
label
:
'Imaginary Number'
},
{
key
:
'i'
,
label
:
'Imaginary Number'
},
],
],
data
:
[
data
:
[
{
sq
:
1
,
num
:
1
,
x2
:
2
,
i
:
'i'
},
{
{
sq
:
4
,
num
:
2
,
x2
:
4
,
i
:
'2i'
},
sq
:
1
,
num
:
1
,
x2
:
2
,
i
:
'i'
,
{
sq
:
9
,
num
:
3
,
x2
:
6
,
i
:
'3i'
},
},
{
sq
:
4
,
num
:
2
,
x2
:
4
,
i
:
'2i'
,
},
{
sq
:
9
,
num
:
3
,
x2
:
6
,
i
:
'3i'
,
},
],
],
};
};
...
@@ -62,7 +68,7 @@ describe('<Table />', () => {
...
@@ -62,7 +68,7 @@ describe('<Table />', () => {
it
(
'with data in the same order as the columns'
,
()
=>
{
it
(
'with data in the same order as the columns'
,
()
=>
{
wrapper
.
find
(
'tr'
).
at
(
1
).
find
(
'td'
).
forEach
((
td
,
i
)
=>
{
wrapper
.
find
(
'tr'
).
at
(
1
).
find
(
'td'
).
forEach
((
td
,
i
)
=>
{
let
parsed
=
Number
(
td
.
text
());
let
parsed
=
Number
(
td
.
text
());
if
(
isNaN
(
parsed
))
{
parsed
=
td
.
text
();
}
if
(
Number
.
isNaN
(
parsed
))
{
parsed
=
td
.
text
();
}
expect
(
parsed
).
toEqual
(
props
.
data
[
0
][
props
.
columns
[
i
].
key
]);
expect
(
parsed
).
toEqual
(
props
.
data
[
0
][
props
.
columns
[
i
].
key
]);
});
});
});
});
...
...
src/Tabs/index.jsx
View file @
7986fc94
// TODO: @jaebradley fix these eslint errors
/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
from
'react'
;
import
React
from
'react'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
PropTypes
from
'prop-types'
;
import
PropTypes
from
'prop-types'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment