Skip to content

Commit

Permalink
Merge branch 'master' of github.com:salesforce/design-system-react in…
Browse files Browse the repository at this point in the history
…to prettylint

# Conflicts:
#	.eslintrc.json
  • Loading branch information
interactivellama committed Feb 14, 2018
2 parents b422033 + 6d9abc5 commit 9733124
Show file tree
Hide file tree
Showing 40 changed files with 115 additions and 136 deletions.
7 changes: 1 addition & 6 deletions .eslintrc.json
Expand Up @@ -12,10 +12,7 @@
"modules": true
}
},
"plugins": [
"filenames",
"json"
],
"plugins": ["filenames", "json"],
"env": {
"browser": true
},
Expand Down Expand Up @@ -142,8 +139,6 @@
"func-names": "off",
// May consider removing
"function-paren-newline": "off",
// TODO: Should be removed
"import/first": "off",
// currently used in older files, this should be removed
"no-param-reassign": [
2,
Expand Down
4 changes: 2 additions & 2 deletions components/alert/__tests__/alert.browser-test.jsx
Expand Up @@ -9,13 +9,13 @@ import {
unmountComponent,
} from '../../../tests/enzyme-helpers';

chai.use(chaiEnzyme());

import Alert from '../';
import AlertContainer from '../container';
import Icon from '../../icon';
import IconSettings from '../../icon-settings';

chai.use(chaiEnzyme());

class DemoComponent extends Component {
constructor (props) {
super(props);
Expand Down
4 changes: 2 additions & 2 deletions components/alert/index.jsx
Expand Up @@ -7,14 +7,14 @@

import React from 'react';
import PropTypes from 'prop-types';
import assign from 'lodash.assign';
import { shape } from 'airbnb-prop-types';
import classNames from '../../utilities/class-names';
import Button from '../button';
import Icon from '../icon';
import checkProps from './check-props';
import { ALERT } from '../../utilities/constants';
import assign from 'lodash.assign';
import DOMElementFocus from '../../utilities/dom-element-focus';
import { shape } from 'airbnb-prop-types';

const propTypes = {
/**
Expand Down
6 changes: 3 additions & 3 deletions components/app-launcher/__tests__/section.browser-test.jsx
Expand Up @@ -4,13 +4,13 @@ import chai from 'chai';
import assign from 'lodash.assign';
import TestUtils from 'react-addons-test-utils';

const expect = chai.expect;
const should = chai.should();

import IconSettings from '../../icon-settings';
import AppLauncherTile from '../../app-launcher/tile';
import AppLauncherSection from '../../app-launcher/section';

const expect = chai.expect;
const should = chai.should();

const { Simulate } = TestUtils;

describe('SLDS APP LAUNCHER SECTION *******************************************', () => {
Expand Down
6 changes: 3 additions & 3 deletions components/app-launcher/__tests__/tile.browser-test.jsx
Expand Up @@ -5,12 +5,12 @@ import assign from 'lodash.assign';
import TestUtils from 'react-addons-test-utils';
import IconSettings from '../../icon-settings';

const expect = chai.expect;
const should = chai.should();

import AppLauncherTile from '../../app-launcher/tile';
import Icon from '../../icon';

const expect = chai.expect;
const should = chai.should();

const { Simulate } = TestUtils;

describe('SLDS APP LAUNCHER TILE *******************************************', () => {
Expand Down
13 changes: 1 addition & 12 deletions components/app-launcher/tile.jsx
Expand Up @@ -3,28 +3,17 @@

/* eslint-disable jsx-a11y/no-noninteractive-tabindex */

// # App Launcher Component

// ## Dependencies

// ### React
import React from 'react';
import PropTypes from 'prop-types';

// ### classNames
import isFunction from 'lodash.isfunction';
import classNames from 'classnames';

// ### Truncate
import Truncate from '../utilities/truncate';

// ### isFunction
import isFunction from 'lodash.isfunction';

// ## Children
import Highlighter from '../utilities/highlighter';
import PopoverTooltip from '../popover-tooltip';

// ## Constants
import { APP_LAUNCHER_TILE } from '../../utilities/constants';

const handleClick = (event, href, onClick) => {
Expand Down
4 changes: 2 additions & 2 deletions components/avatar/__tests__/avatar.browser-test.jsx
Expand Up @@ -10,11 +10,11 @@ import {
destroyMountNode,
} from '../../../tests/enzyme-helpers';

chai.use(chaiEnzyme());

import SLDSAvatar from '../../avatar';
import IconSettings from '../../icon-settings';

chai.use(chaiEnzyme());

describe('SLDSAvatar: ', function () {
let mountNode;
let wrapper;
Expand Down
6 changes: 3 additions & 3 deletions components/button/__tests__/button.browser-test.jsx
Expand Up @@ -5,15 +5,15 @@ import TestUtils from 'react-addons-test-utils';
import { expect } from 'chai';
import assign from 'lodash.assign';

import SLDSButton from '../../button';
import IconSettings from '../../icon-settings';

const {
Simulate,
findRenderedDOMComponentWithTag,
findRenderedDOMComponentWithClass,
} = TestUtils;

import SLDSButton from '../../button';
import IconSettings from '../../icon-settings';

const mockCallback = sinon.spy();

describe('SLDSButton: ', () => {
Expand Down
4 changes: 2 additions & 2 deletions components/card/private/body.jsx
Expand Up @@ -5,13 +5,13 @@
import React from 'react';
import PropTypes from 'prop-types';

import { CARD_BODY } from '../../../utilities/constants';

// ### classNames
// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)
// This project uses `classnames`, "a simple javascript utility for conditionally joining classNames together."
import classNames from 'classnames';

import { CARD_BODY } from '../../../utilities/constants';

const CardBody = (props) => (
<div className={classNames('slds-card__body', props.className)} id={props.id}>
{props.children}
Expand Down
4 changes: 2 additions & 2 deletions components/combobox/__tests__/combobox.browser-test.jsx
Expand Up @@ -19,12 +19,12 @@ import {
// Import your internal dependencies (for example):
import Combobox from '../../../components/combobox';
import Icon from '../../../components/icon';
import filter from '~/components/combobox/filter';
import filter from '../../../components/combobox/filter';
import KEYS, { keyObjects } from '../../../utilities/key-code';
import LETTERKEYS, {
keyObjects as letterKeyObjects,
} from '../../../utilities/letter-key-code';
import IconSettings from '~/components/icon-settings';
import IconSettings from '../../../components/icon-settings';

/* Set Chai to use chaiEnzyme for enzyme compatible assertions:
* https://github.com/producthunt/chai-enzyme
Expand Down
14 changes: 7 additions & 7 deletions components/combobox/combobox.jsx
Expand Up @@ -6,13 +6,6 @@
import React from 'react';
import PropTypes from 'prop-types';

import Dialog from '../utilities/dialog';
import InnerInput from '../../components/forms/input/private/inner-input';
import InputIcon from '../icon/input-icon';
import Menu from './private/menu';
import Label from '../forms/private/label';
import SelectedListBox from './private/selected-listbox';

import assign from 'lodash.assign';
import find from 'lodash.find';
import reject from 'lodash.reject';
Expand All @@ -28,6 +21,13 @@ import classNames from 'classnames';

import shortid from 'shortid';

import Dialog from '../utilities/dialog';
import InnerInput from '../../components/forms/input/private/inner-input';
import InputIcon from '../icon/input-icon';
import Menu from './private/menu';
import Label from '../forms/private/label';
import SelectedListBox from './private/selected-listbox';

import KEYS from '../../utilities/key-code';
import mapKeyEventCallbacks from '../../utilities/key-callbacks';

Expand Down
5 changes: 2 additions & 3 deletions components/combobox/private/selected-listbox.jsx
Expand Up @@ -4,13 +4,12 @@
import React from 'react';
import PropTypes from 'prop-types';

import Pill from '../../utilities/pill';

import classNames from 'classnames';
import isEqual from 'lodash.isequal';

import { shape } from 'airbnb-prop-types';

import Pill from '../../utilities/pill';

const propTypes = {
/*
* The option object within the selection prop that should have focus.
Expand Down
10 changes: 5 additions & 5 deletions components/date-picker/date-picker.jsx
Expand Up @@ -4,11 +4,6 @@
import React from 'react';
import PropTypes from 'prop-types';

import Dialog from '../utilities/dialog';
import CalendarWrapper from './private/calendar-wrapper';
import InputIcon from '../icon/input-icon';
import Input from '../forms/input';

import assign from 'lodash.assign';

import { shape } from 'airbnb-prop-types';
Expand All @@ -27,6 +22,11 @@ import classNames from 'classnames';
// shortid is a short, non-sequential, url-friendly, unique id generator
import shortid from 'shortid';

import Dialog from '../utilities/dialog';
import CalendarWrapper from './private/calendar-wrapper';
import InputIcon from '../icon/input-icon';
import Input from '../forms/input';

// This component's `checkProps` which issues warnings to developers about properties
// when in development mode (similar to React's built in development tools)
import checkProps from './check-props';
Expand Down
12 changes: 6 additions & 6 deletions components/date-picker/private/calendar-wrapper.jsx
Expand Up @@ -4,18 +4,18 @@
import React from 'react';
import PropTypes from 'prop-types';

import Calendar from './calendar';
import CalendarNavigation from './navigation';

import EventUtil from '../../../utilities/event';
import KEYS from '../../../utilities/key-code';

// ### classNames
// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)
// This project uses `classnames`, "a simple javascript utility for conditionally
// joining classNames together."
import classNames from 'classnames';

import Calendar from './calendar';
import CalendarNavigation from './navigation';

import EventUtil from '../../../utilities/event';
import KEYS from '../../../utilities/key-code';

class DatepickerCalendarWrapper extends React.Component {
static defaultProps = {
selectedDate: new Date(),
Expand Down
8 changes: 4 additions & 4 deletions components/date-picker/private/day.jsx
Expand Up @@ -4,16 +4,16 @@
import React from 'react';
import PropTypes from 'prop-types';

import EventUtil from '../../../utilities/event';
import DateUtil from '../../../utilities/date';
import KEYS from '../../../utilities/key-code';

// ### classNames
// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)
// This project uses `classnames`, "a simple javascript utility for conditionally
// joining classNames together."
import classNames from 'classnames';

import EventUtil from '../../../utilities/event';
import DateUtil from '../../../utilities/date';
import KEYS from '../../../utilities/key-code';

const handleClick = (event, { date, onSelectDate }) => {
onSelectDate(event, { date });
};
Expand Down
10 changes: 5 additions & 5 deletions components/filter/index.jsx
Expand Up @@ -21,17 +21,17 @@ import assign from 'lodash.assign';
// ### classNames
import classNames from 'classnames';

// ### shortid
// [npmjs.com/package/shortid](https://www.npmjs.com/package/shortid)
// shortid is a short, non-sequential, url-friendly, unique id generator
import shortid from 'shortid';

// This component's `checkProps` which issues warnings to developers about properties when in development mode (similar to React's built in development tools)
import checkProps from './check-props';

import Button from '../button';
import Popover from '../popover';

// ### shortid
// [npmjs.com/package/shortid](https://www.npmjs.com/package/shortid)
// shortid is a short, non-sequential, url-friendly, unique id generator
import shortid from 'shortid';

// ## Constants
import { FILTER } from '../../utilities/constants';

Expand Down
6 changes: 3 additions & 3 deletions components/forms/checkbox/index.jsx
Expand Up @@ -13,6 +13,9 @@ import PropTypes from 'prop-types';
// ### isFunction
import isFunction from 'lodash.isfunction';

// ### classNames
import classNames from 'classnames';

// ### shortid
// [npmjs.com/package/shortid](https://www.npmjs.com/package/shortid)
// shortid is a short, non-sequential, url-friendly, unique id generator
Expand All @@ -22,9 +25,6 @@ import shortid from 'shortid';
import KEYS from '../../../utilities/key-code';
import EventUtil from '../../../utilities/event';

// ### classNames
import classNames from 'classnames';

// This component's `checkProps` which issues warnings to developers about properties when in development mode (similar to React's built in development tools)
import checkProps from './check-props';

Expand Down
3 changes: 1 addition & 2 deletions components/icon-settings/index.jsx
Expand Up @@ -7,8 +7,7 @@ import PropTypes from 'prop-types';
import { ICON_SETTINGS } from '../../utilities/constants';

/**
* The Icon Settings component allows for the path to the icons to be specified.
* This should be used at the root of the application.
* The Icon Settings component allows for the path to the icons to be specified in all child components and is recommended to be used at the root of the application. It's render function is `return this.props.children`, so it can only have one child node.
*
* **Individual sprites**
* If you are using webpack it is advised to use the sprite properties
Expand Down
2 changes: 1 addition & 1 deletion components/lookup/lookup.jsx
Expand Up @@ -17,6 +17,7 @@ import PropTypes from 'prop-types';
import escapeRegExp from 'lodash.escaperegexp';
import isBoolean from 'lodash.isboolean';
import isEqual from 'lodash.isequal';
import classNames from 'classnames';

// This component's `checkProps` which issues warnings to developers about properties
// when in development mode (similar to React's built in development tools)
Expand All @@ -34,7 +35,6 @@ import EventUtil from '../../utilities/event';
import KEYS from '../../utilities/key-code';

import Menu from './menu';
import classNames from 'classnames';

import { LOOKUP } from '../../utilities/constants';

Expand Down
2 changes: 1 addition & 1 deletion components/lookup/private/item.jsx
Expand Up @@ -5,9 +5,9 @@

import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import Icon from '../../icon';
import EventUtil from '../../../utilities/event';
import cx from 'classnames';

const displayName = 'Lookup-Menu-Item';
const propTypes = {
Expand Down
3 changes: 2 additions & 1 deletion components/menu-dropdown/button-trigger.jsx
Expand Up @@ -8,14 +8,15 @@
import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
import Button from '../button';

// ### classNames
// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)
// This project uses `classnames`, "a simple javascript utility for conditionally
// joining classNames together."
import classnames from 'classnames';

import Button from '../button';

// ### Children
import { MENU_DROPDOWN_TRIGGER } from '../../utilities/constants';

Expand Down

0 comments on commit 9733124

Please sign in to comment.