Move to 2 space indentation + editorconfig
This commit is contained in:
parent
9bb9e0b4c2
commit
d40841d8dd
|
@ -0,0 +1,9 @@
|
|||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
|
@ -10,7 +10,7 @@
|
|||
"rules": {
|
||||
"quotes": [2, "single"],
|
||||
"strict": [2, "never"],
|
||||
"indent": ["error", 4, {"SwitchCase": 1}],
|
||||
"indent": ["error", 2, {"SwitchCase": 1}],
|
||||
"eol-last": "off",
|
||||
"arrow-body-style": "off",
|
||||
"no-underscore-dangle": "off",
|
||||
|
|
|
@ -9,7 +9,8 @@ import {
|
|||
activateChoices,
|
||||
addGroup,
|
||||
clearAll,
|
||||
} from './actions/index';
|
||||
}
|
||||
from './actions/index';
|
||||
import {
|
||||
isScrolledIntoView,
|
||||
getAdjacentEl,
|
||||
|
@ -21,14 +22,16 @@ import {
|
|||
getWidthOfInput,
|
||||
sortByAlpha,
|
||||
sortByScore,
|
||||
} from './lib/utils.js';
|
||||
}
|
||||
from './lib/utils.js';
|
||||
import './lib/polyfills.js';
|
||||
|
||||
|
||||
/**
|
||||
* Choices
|
||||
*/
|
||||
export default class Choices {
|
||||
export
|
||||
default class Choices {
|
||||
constructor(element = '[data-choice]', userConfig = {}) {
|
||||
// If there are multiple elements, create a new instance
|
||||
// for each element besides the first one (as that already has an instance)
|
||||
|
@ -808,7 +811,9 @@ export default class Choices {
|
|||
this._removeItem(lastItem);
|
||||
this._triggerChange(lastItem.value);
|
||||
} else {
|
||||
if (!hasHighlightedItems) { this.highlightItem(lastItem); }
|
||||
if (!hasHighlightedItems) {
|
||||
this.highlightItem(lastItem);
|
||||
}
|
||||
this.removeHighlightedItems();
|
||||
}
|
||||
}
|
||||
|
@ -2045,7 +2050,9 @@ export default class Choices {
|
|||
this._highlightChoice();
|
||||
} else {
|
||||
// Otherwise show a notice
|
||||
const dropdownItem = this.isSearching ? this._getTemplate('notice', this.config.noResultsText) : this._getTemplate('notice', this.config.noChoicesText);
|
||||
const dropdownItem = this.isSearching ?
|
||||
this._getTemplate('notice', this.config.noResultsText) :
|
||||
this._getTemplate('notice', this.config.noChoicesText);
|
||||
this.choiceList.appendChild(dropdownItem);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable */
|
||||
|
||||
// Production steps of ECMA-262, Edition 6, 22.1.2.1
|
||||
// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from
|
||||
if (!Array.from) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Capitalises the first letter of each word in a string
|
||||
* @param {String} str String to capitalise
|
||||
|
|
|
@ -4,8 +4,8 @@ import rootReducer from './../reducers/index.js';
|
|||
export default class Store {
|
||||
constructor() {
|
||||
this.store = createStore(
|
||||
rootReducer,
|
||||
window.devToolsExtension ? window.devToolsExtension() : undefined
|
||||
rootReducer
|
||||
, window.devToolsExtension ? window.devToolsExtension() : undefined
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue