mirror of
https://github.com/encounter/react-add-to-calendar.git
synced 2026-07-10 21:18:44 -07:00
removing deprecated linter rules, fixing linter errors, and resolving issue with switch to latest istanbul-instrumenter-loader since the isparta-loader package has been deprecated. all of this should fix the build errors
This commit is contained in:
@@ -218,7 +218,7 @@
|
||||
"react/jsx-no-literals": 0,
|
||||
"react/jsx-no-undef": 2,
|
||||
"react/jsx-pascal-case": 2,
|
||||
"react/jsx-sort-prop-types": 2,
|
||||
"react/jsx-sort-prop-types": 0,
|
||||
"react/jsx-sort-props": 0,
|
||||
"react/jsx-uses-react": 2,
|
||||
"react/jsx-uses-vars": 2,
|
||||
@@ -233,7 +233,7 @@
|
||||
"react/prefer-es6-class": 0,
|
||||
"react/prop-types": 2,
|
||||
"react/react-in-jsx-scope": 2,
|
||||
"react/require-extension": 2,
|
||||
"react/require-extension": 0,
|
||||
"react/self-closing-comp": 2,
|
||||
"react/sort-comp": 2,
|
||||
"react/wrap-multilines": 0
|
||||
|
||||
+121
-113
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,9 @@ export default class CodeExampleComponent extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div
|
||||
key={this.props.id}
|
||||
id={`example-${this.props.id}`}
|
||||
className="example"
|
||||
>
|
||||
key={this.props.id}
|
||||
id={`example-${this.props.id}`}
|
||||
className="example">
|
||||
<h2 className="example__heading">{this.props.title}</h2>
|
||||
{this.props.children}
|
||||
</div>
|
||||
|
||||
@@ -56,10 +56,9 @@ export default class ExampleComponents extends React.Component {
|
||||
renderExamples() {
|
||||
return examples.map((example, index) => (
|
||||
<CodeExampleComponent
|
||||
key={`example-${index}`}
|
||||
id={index}
|
||||
title={example.title}
|
||||
>
|
||||
key={`example-${index}`}
|
||||
id={index}
|
||||
title={example.title}>
|
||||
{<example.component />}
|
||||
</CodeExampleComponent>
|
||||
));
|
||||
|
||||
@@ -25,15 +25,15 @@ export default class ChangeDropdownLabels extends React.Component {
|
||||
<code className="js">
|
||||
{"let items = ["}<br />
|
||||
|
||||
{"\{ outlook: 'Outlook' \}"}<br />
|
||||
{"{ outlook: 'Outlook' }"}<br />
|
||||
|
||||
{"\{ outlookcom: 'Outlook.com' \}"}<br />
|
||||
{"{ outlookcom: 'Outlook.com' }"}<br />
|
||||
|
||||
{"\{ apple: 'iCal' \}"}<br />
|
||||
{"{ apple: 'iCal' }"}<br />
|
||||
|
||||
{"\{ yahoo: 'Yahoo!' \}"}<br />
|
||||
{"{ yahoo: 'Yahoo!' }"}<br />
|
||||
|
||||
{"\{ google: 'Google' \}"}<br />
|
||||
{"{ google: 'Google' }"}<br />
|
||||
{"];"}<br /><br />
|
||||
</code>
|
||||
<code className="jsx">
|
||||
@@ -41,7 +41,7 @@ export default class ChangeDropdownLabels extends React.Component {
|
||||
|
||||
{"event={event}"}<br />
|
||||
|
||||
{"listItems=\{items\} />"}
|
||||
{"listItems={items} />"}
|
||||
</code>
|
||||
</pre>
|
||||
<div className="column">
|
||||
|
||||
@@ -25,15 +25,15 @@ export default class ChangeDropdownOrder extends React.Component {
|
||||
<code className="js">
|
||||
{"let items = ["}<br />
|
||||
|
||||
{"\{ outlook: 'Outlook' \}"}<br />
|
||||
{"{ outlook: 'Outlook' }"}<br />
|
||||
|
||||
{"\{ outlookcom: 'Outlook.com' \}"}<br />
|
||||
{"{ outlookcom: 'Outlook.com' }"}<br />
|
||||
|
||||
{"\{ apple: 'Apple Calendar' \}"}<br />
|
||||
{"{ apple: 'Apple Calendar' }"}<br />
|
||||
|
||||
{"\{ yahoo: 'Yahoo' \}"}<br />
|
||||
{"{ yahoo: 'Yahoo' }"}<br />
|
||||
|
||||
{"\{ google: 'Google' \}"}<br />
|
||||
{"{ google: 'Google' }"}<br />
|
||||
{"];"}<br /><br />
|
||||
</code>
|
||||
<code className="jsx">
|
||||
@@ -41,7 +41,7 @@ export default class ChangeDropdownOrder extends React.Component {
|
||||
|
||||
{"event={event}"}<br />
|
||||
|
||||
{"listItems=\{items\} />"}
|
||||
{"listItems={items} />"}
|
||||
</code>
|
||||
</pre>
|
||||
<div className="column">
|
||||
|
||||
@@ -17,7 +17,7 @@ export default class ChangeTemplate extends React.Component {
|
||||
<div className="row">
|
||||
<pre className="column example__code">
|
||||
<code className="js">
|
||||
{"let icon = \{ 'calendar-plus-o': 'left' \};"}<br /><br />
|
||||
{"let icon = { 'calendar-plus-o': 'left' };"}<br /><br />
|
||||
{"/*"}<br />
|
||||
|
||||
{"object property can be any Font Awesome icon"}<br />
|
||||
@@ -30,7 +30,7 @@ export default class ChangeTemplate extends React.Component {
|
||||
|
||||
{"event={event}"}<br />
|
||||
|
||||
{"buttonTemplate=\{icon\} />"}
|
||||
{"buttonTemplate={icon} />"}
|
||||
</code>
|
||||
</pre>
|
||||
<div className="column">
|
||||
|
||||
@@ -15,7 +15,7 @@ export default class Default extends React.Component {
|
||||
<div className="row">
|
||||
<pre className="column example__code">
|
||||
<code className="js">
|
||||
{"let event = \{"}<br />
|
||||
{"let event = {"}<br />
|
||||
|
||||
{" title: 'Sample Event',"}<br />
|
||||
|
||||
@@ -29,7 +29,7 @@ export default class Default extends React.Component {
|
||||
{" startTime: '2016-09-16T20:15:00-04:00',"}<br />
|
||||
|
||||
{" endTime: '2016-09-16T21:45:00-04:00'"}<br />
|
||||
{"\};"}<br /><br />
|
||||
{"};"}<br /><br />
|
||||
{"/*"}<br />
|
||||
|
||||
{"startTime and endTime can use any datetime"}<br />
|
||||
|
||||
@@ -19,9 +19,9 @@ export default class RemoveDropdownItem extends React.Component {
|
||||
<code className="js">
|
||||
{"let items = ["}<br />
|
||||
|
||||
{"\{ outlook: 'Outlook' \}"}<br />
|
||||
{"{ outlook: 'Outlook' }"}<br />
|
||||
|
||||
{"\{ google: 'Google' \}"}<br />
|
||||
{"{ google: 'Google' }"}<br />
|
||||
{"];"}<br /><br />
|
||||
</code>
|
||||
<code className="jsx">
|
||||
@@ -29,7 +29,7 @@ export default class RemoveDropdownItem extends React.Component {
|
||||
|
||||
{"event={event}"}<br />
|
||||
|
||||
{"listItems=\{items\} />"}
|
||||
{"listItems={items} />"}
|
||||
</code>
|
||||
</pre>
|
||||
<div className="column">
|
||||
|
||||
@@ -19,7 +19,7 @@ export default class TextOnlyDropdown extends React.Component {
|
||||
|
||||
{"event={event}"}<br />
|
||||
|
||||
{"displayItemIcons=\{false\} />"}
|
||||
{"displayItemIcons={false} />"}
|
||||
</code>
|
||||
</pre>
|
||||
<div className="column">
|
||||
|
||||
@@ -17,14 +17,14 @@ export default class TextOnlyTemplate extends React.Component {
|
||||
<div className="row">
|
||||
<pre className="column example__code">
|
||||
<code className="js">
|
||||
{"let icon = \{ textOnly: 'none' \};"}<br /><br />
|
||||
{"let icon = { textOnly: 'none' };"}<br /><br />
|
||||
</code>
|
||||
<code className="jsx">
|
||||
{"<AddToCalendar"}<br />
|
||||
|
||||
{"event={event}"}<br />
|
||||
|
||||
{"buttonTemplate=\{icon\} />"}
|
||||
{"buttonTemplate={icon} />"}
|
||||
</code>
|
||||
</pre>
|
||||
<div className="column">
|
||||
|
||||
+13
-19
@@ -26,33 +26,28 @@ export default class Root extends React.Component {
|
||||
<p>
|
||||
<a href="https://npmjs.org/package/react-add-to-calendar">
|
||||
<img
|
||||
src="https://badge.fury.io/js/react-add-to-calendar.svg"
|
||||
className="badge"
|
||||
/>
|
||||
src="https://badge.fury.io/js/react-add-to-calendar.svg"
|
||||
className="badge"/>
|
||||
</a>
|
||||
<a href="https://travis-ci.org/jasonsalzman/react-add-to-calendar">
|
||||
<img
|
||||
src="https://travis-ci.org/jasonsalzman/react-add-to-calendar.svg?branch=master"
|
||||
className="badge"
|
||||
/>
|
||||
src="https://travis-ci.org/jasonsalzman/react-add-to-calendar.svg?branch=master"
|
||||
className="badge"/>
|
||||
</a>
|
||||
<a href="https://david-dm.org/jasonsalzman/react-add-to-calendar">
|
||||
<img
|
||||
src="https://img.shields.io/david/strongloop/express.svg?maxAge=2592000"
|
||||
className="badge"
|
||||
/>
|
||||
src="https://img.shields.io/david/strongloop/express.svg?maxAge=2592000"
|
||||
className="badge"/>
|
||||
</a>
|
||||
<a href="https://david-dm.org/jasonsalzman/react-add-to-calendar">
|
||||
<img
|
||||
src="https://img.shields.io/david/peer/webcomponents/generator-element.svg?maxAge=2592000"
|
||||
className="badge"
|
||||
/>
|
||||
src="https://img.shields.io/david/peer/webcomponents/generator-element.svg?maxAge=2592000"
|
||||
className="badge"/>
|
||||
</a>
|
||||
<a href={"https://npmjs.org/package/react-add-to-calendar"}>
|
||||
<img
|
||||
src="https://img.shields.io/npm/dm/react-add-to-calendar.svg"
|
||||
className="badge"
|
||||
/>
|
||||
src="https://img.shields.io/npm/dm/react-add-to-calendar.svg"
|
||||
className="badge"/>
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
@@ -69,10 +64,9 @@ export default class Root extends React.Component {
|
||||
|
||||
<a href="https://github.com/jasonsalzman/react-add-to-calendar/">
|
||||
<img
|
||||
className="github-ribbon"
|
||||
src="images/ribbon.png"
|
||||
alt="Fork me on GitHub"
|
||||
/>
|
||||
className="github-ribbon"
|
||||
src="images/ribbon.png"
|
||||
alt="Fork me on GitHub"/>
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
|
||||
+4
-1
@@ -56,7 +56,10 @@ module.exports = function(config) {
|
||||
{
|
||||
test: /\.js?$/,
|
||||
include: path.resolve(__dirname, 'src'),
|
||||
loader: 'istanbul-instrumenter'
|
||||
loader: 'istanbul-instrumenter',
|
||||
query: {
|
||||
esModules: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"author": "Jason Salzman",
|
||||
"name": "react-add-to-calendar",
|
||||
"description": "A simple and reusable add to calendar button component for React",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/jasonsalzman/react-add-to-calendar",
|
||||
"repository": {
|
||||
|
||||
@@ -99,11 +99,10 @@ export default class ReactAddToCalendar extends React.Component {
|
||||
return (
|
||||
<li key={helpers.getRandomKey()}>
|
||||
<a
|
||||
className={currentItem + "-link"}
|
||||
onClick={self.handleDropdownLinkClick}
|
||||
href={helpers.buildUrl(self.props.event, currentItem)}
|
||||
target="_blank"
|
||||
>
|
||||
className={currentItem + "-link"}
|
||||
onClick={self.handleDropdownLinkClick}
|
||||
href={helpers.buildUrl(self.props.event, currentItem)}
|
||||
target="_blank">
|
||||
{icon}
|
||||
{currentLabel}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user