Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit 7e03db2

Browse files
committed
Enable eslint rule: quotes
1 parent 0eccd59 commit 7e03db2

File tree

7 files changed

+58
-59
lines changed

7 files changed

+58
-59
lines changed

.eslintrc

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"react/jsx-uses-vars": "error",
99
"array-bracket-spacing": 0,
1010
"comma-dangle": 0,
11-
"quotes": 0,
1211
"semi": 0,
1312
"space-before-blocks": 0,
1413
"space-before-function-paren": 0

examples/async-data/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let App = React.createClass({
2525
</p>
2626
<label htmlFor="states-autocomplete">Choose a state from the US</label>
2727
<Autocomplete
28-
inputProps={{ name: "US state", id: "states-autocomplete" }}
28+
inputProps={{ name: 'US state', id: 'states-autocomplete' }}
2929
ref="autocomplete"
3030
value={this.state.value}
3131
items={this.state.unitedStates}

examples/custom-menu/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let App = React.createClass({
2525
<label htmlFor="states-autocomplete">Choose a state from the US</label>
2626
<Autocomplete
2727
value={this.state.value}
28-
inputProps={{ name: "US state", id: "states-autocomplete" }}
28+
inputProps={{ name: 'US state', id: 'states-autocomplete' }}
2929
items={this.state.unitedStates}
3030
getItemValue={(item) => item.name}
3131
onSelect={(value, state) => this.setState({ value, unitedStates: [state] }) }

examples/managed-menu-visibility/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class App extends Component {
3535
<label htmlFor="states">Choose a US state</label>
3636
<Autocomplete
3737
value={state.value}
38-
inputProps={{ id: "states" }}
38+
inputProps={{ id: 'states' }}
3939
items={STATES}
4040
shouldItemRender={matchStateToTerm}
4141
getItemValue={item => item.name}

examples/static-data/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let App = React.createClass({
1818
<label htmlFor="states-autocomplete">Choose a state from the US</label>
1919
<Autocomplete
2020
value={this.state.value}
21-
inputProps={{ name: "US state", id: "states-autocomplete" }}
21+
inputProps={{ name: 'US state', id: 'states-autocomplete' }}
2222
items={getStates()}
2323
getItemValue={(item) => item.name}
2424
shouldItemRender={matchStateToTerm}

lib/__tests__/Autocomplete-test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function AutocompleteComponentJSX (extraProps) {
1010
return (
1111
<Autocomplete
1212
labelText="Choose a state from the US"
13-
inputProps={{ name: "US state" }}
13+
inputProps={{ name: 'US state' }}
1414
getItemValue={(item) => item.name}
1515
items={getStates()}
1616
renderItem={(item, isHighlighted) => (
@@ -189,7 +189,7 @@ describe('Autocomplete kewDown->ArrowDown event handlers', () => {
189189
autocompleteWrapper.setState({ 'isOpen': true });
190190
autocompleteWrapper.setState({ 'highlightedIndex': null });
191191

192-
autocompleteInputWrapper.simulate('keyDown', { key : "ArrowDown", keyCode: 40, which: 40 });
192+
autocompleteInputWrapper.simulate('keyDown', { key : 'ArrowDown', keyCode: 40, which: 40 });
193193

194194
expect(autocompleteWrapper.state('isOpen')).toBe(true);
195195
expect(autocompleteWrapper.state('highlightedIndex')).toEqual(0);
@@ -203,7 +203,7 @@ describe('Autocomplete kewDown->ArrowDown event handlers', () => {
203203
autocompleteInputWrapper.simulate('change', { target: { value: '' } });
204204
autocompleteWrapper.setState({ 'highlightedIndex': n });
205205

206-
autocompleteInputWrapper.simulate('keyDown', { key : "ArrowDown", keyCode: 40, which: 40 });
206+
autocompleteInputWrapper.simulate('keyDown', { key : 'ArrowDown', keyCode: 40, which: 40 });
207207

208208
expect(autocompleteWrapper.state('isOpen')).toBe(true);
209209
expect(autocompleteWrapper.state('highlightedIndex')).toEqual(n+1);
@@ -216,7 +216,7 @@ describe('Autocomplete kewDown->ArrowDown event handlers', () => {
216216
autocompleteInputWrapper.simulate('change', { target: { value: '' } });
217217
autocompleteWrapper.setState({ 'highlightedIndex': 49 });
218218

219-
autocompleteInputWrapper.simulate('keyDown', { key : "ArrowDown", keyCode: 40, which: 40 });
219+
autocompleteInputWrapper.simulate('keyDown', { key : 'ArrowDown', keyCode: 40, which: 40 });
220220

221221
expect(autocompleteWrapper.state('isOpen')).toBe(true);
222222
expect(autocompleteWrapper.state('highlightedIndex')).toEqual(0);

lib/utils.js

+50-50
Original file line numberDiff line numberDiff line change
@@ -57,56 +57,56 @@ export function fakeRequest (value, cb) {
5757

5858
export function getStates() {
5959
return [
60-
{ abbr: "AL", name: "Alabama" },
61-
{ abbr: "AK", name: "Alaska" },
62-
{ abbr: "AZ", name: "Arizona" },
63-
{ abbr: "AR", name: "Arkansas" },
64-
{ abbr: "CA", name: "California" },
65-
{ abbr: "CO", name: "Colorado" },
66-
{ abbr: "CT", name: "Connecticut" },
67-
{ abbr: "DE", name: "Delaware" },
68-
{ abbr: "FL", name: "Florida" },
69-
{ abbr: "GA", name: "Georgia" },
70-
{ abbr: "HI", name: "Hawaii" },
71-
{ abbr: "ID", name: "Idaho" },
72-
{ abbr: "IL", name: "Illinois" },
73-
{ abbr: "IN", name: "Indiana" },
74-
{ abbr: "IA", name: "Iowa" },
75-
{ abbr: "KS", name: "Kansas" },
76-
{ abbr: "KY", name: "Kentucky" },
77-
{ abbr: "LA", name: "Louisiana" },
78-
{ abbr: "ME", name: "Maine" },
79-
{ abbr: "MD", name: "Maryland" },
80-
{ abbr: "MA", name: "Massachusetts" },
81-
{ abbr: "MI", name: "Michigan" },
82-
{ abbr: "MN", name: "Minnesota" },
83-
{ abbr: "MS", name: "Mississippi" },
84-
{ abbr: "MO", name: "Missouri" },
85-
{ abbr: "MT", name: "Montana" },
86-
{ abbr: "NE", name: "Nebraska" },
87-
{ abbr: "NV", name: "Nevada" },
88-
{ abbr: "NH", name: "New Hampshire" },
89-
{ abbr: "NJ", name: "New Jersey" },
90-
{ abbr: "NM", name: "New Mexico" },
91-
{ abbr: "NY", name: "New York" },
92-
{ abbr: "NC", name: "North Carolina" },
93-
{ abbr: "ND", name: "North Dakota" },
94-
{ abbr: "OH", name: "Ohio" },
95-
{ abbr: "OK", name: "Oklahoma" },
96-
{ abbr: "OR", name: "Oregon" },
97-
{ abbr: "PA", name: "Pennsylvania" },
98-
{ abbr: "RI", name: "Rhode Island" },
99-
{ abbr: "SC", name: "South Carolina" },
100-
{ abbr: "SD", name: "South Dakota" },
101-
{ abbr: "TN", name: "Tennessee" },
102-
{ abbr: "TX", name: "Texas" },
103-
{ abbr: "UT", name: "Utah" },
104-
{ abbr: "VT", name: "Vermont" },
105-
{ abbr: "VA", name: "Virginia" },
106-
{ abbr: "WA", name: "Washington" },
107-
{ abbr: "WV", name: "West Virginia" },
108-
{ abbr: "WI", name: "Wisconsin" },
109-
{ abbr: "WY", name: "Wyoming" }
60+
{ abbr: 'AL', name: 'Alabama' },
61+
{ abbr: 'AK', name: 'Alaska' },
62+
{ abbr: 'AZ', name: 'Arizona' },
63+
{ abbr: 'AR', name: 'Arkansas' },
64+
{ abbr: 'CA', name: 'California' },
65+
{ abbr: 'CO', name: 'Colorado' },
66+
{ abbr: 'CT', name: 'Connecticut' },
67+
{ abbr: 'DE', name: 'Delaware' },
68+
{ abbr: 'FL', name: 'Florida' },
69+
{ abbr: 'GA', name: 'Georgia' },
70+
{ abbr: 'HI', name: 'Hawaii' },
71+
{ abbr: 'ID', name: 'Idaho' },
72+
{ abbr: 'IL', name: 'Illinois' },
73+
{ abbr: 'IN', name: 'Indiana' },
74+
{ abbr: 'IA', name: 'Iowa' },
75+
{ abbr: 'KS', name: 'Kansas' },
76+
{ abbr: 'KY', name: 'Kentucky' },
77+
{ abbr: 'LA', name: 'Louisiana' },
78+
{ abbr: 'ME', name: 'Maine' },
79+
{ abbr: 'MD', name: 'Maryland' },
80+
{ abbr: 'MA', name: 'Massachusetts' },
81+
{ abbr: 'MI', name: 'Michigan' },
82+
{ abbr: 'MN', name: 'Minnesota' },
83+
{ abbr: 'MS', name: 'Mississippi' },
84+
{ abbr: 'MO', name: 'Missouri' },
85+
{ abbr: 'MT', name: 'Montana' },
86+
{ abbr: 'NE', name: 'Nebraska' },
87+
{ abbr: 'NV', name: 'Nevada' },
88+
{ abbr: 'NH', name: 'New Hampshire' },
89+
{ abbr: 'NJ', name: 'New Jersey' },
90+
{ abbr: 'NM', name: 'New Mexico' },
91+
{ abbr: 'NY', name: 'New York' },
92+
{ abbr: 'NC', name: 'North Carolina' },
93+
{ abbr: 'ND', name: 'North Dakota' },
94+
{ abbr: 'OH', name: 'Ohio' },
95+
{ abbr: 'OK', name: 'Oklahoma' },
96+
{ abbr: 'OR', name: 'Oregon' },
97+
{ abbr: 'PA', name: 'Pennsylvania' },
98+
{ abbr: 'RI', name: 'Rhode Island' },
99+
{ abbr: 'SC', name: 'South Carolina' },
100+
{ abbr: 'SD', name: 'South Dakota' },
101+
{ abbr: 'TN', name: 'Tennessee' },
102+
{ abbr: 'TX', name: 'Texas' },
103+
{ abbr: 'UT', name: 'Utah' },
104+
{ abbr: 'VT', name: 'Vermont' },
105+
{ abbr: 'VA', name: 'Virginia' },
106+
{ abbr: 'WA', name: 'Washington' },
107+
{ abbr: 'WV', name: 'West Virginia' },
108+
{ abbr: 'WI', name: 'Wisconsin' },
109+
{ abbr: 'WY', name: 'Wyoming' }
110110
]
111111
}
112112

0 commit comments

Comments
 (0)