Skip to content

Commit e789619

Browse files
author
jfusco
committed
Initial commit of codebase
1 parent acf0f5d commit e789619

40 files changed

Lines changed: 1676 additions & 1 deletion

.babelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"presets": [
3+
"react",
4+
"es2015",
5+
"stage-2"
6+
],
7+
"plugins": [
8+
"transform-class-properties"
9+
]
10+
}

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is for unifying the coding style for different editors and IDEs.
2+
3+
# No .editorconfig files above the root directory
4+
root = true
5+
6+
# All files unicode
7+
[*]
8+
charset = utf-8
9+
10+
# Main styles for our files
11+
[*]
12+
indent_style = tab
13+
end_of_line = lf
14+
trim_trailing_whitespace = true
15+
insert_final_newline = true
16+
indent_size = 4

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/node_modules/
2+
/dist/
3+
/dist-components/
4+
/__tests__/

.eslintrc

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"parser": "babel-eslint",
3+
"rules": {
4+
"eqeqeq": [2, "allow-null"],
5+
"no-extra-semi": 2,
6+
"semi": ["error", "always"],
7+
"no-cond-assign": 2,
8+
"accessor-pairs": 2,
9+
"no-with": 2,
10+
"no-sparse-arrays": 2,
11+
"vars-on-top": 2,
12+
"no-void": 2,
13+
"no-undef": 2,
14+
"no-caller": 2,
15+
"no-new": 2,
16+
"yoda": 2,
17+
"no-whitespace-before-property": 2,
18+
"no-inner-declarations": 2,
19+
"no-ex-assign": 2,
20+
"no-else-return": 2,
21+
"no-dupe-keys": 2,
22+
"constructor-super": 2,
23+
"no-extra-boolean-cast": 2,
24+
"no-obj-calls": 2,
25+
"no-empty": 2,
26+
"semi-spacing": ["error", {
27+
"before": false, "after": true
28+
}],
29+
"keyword-spacing": ["error", {"overrides": {
30+
"if": {"after": true},
31+
"else": {"before": true, "after": true},
32+
"for": {"after": false},
33+
"while": {"after": false},
34+
"function": {"after": true}
35+
}}],
36+
"space-before-function-paren": ["error", {
37+
"anonymous": "never", "named": "never"
38+
}],
39+
"comma-dangle": [2, "never"],
40+
"comma-style": [2, "last"],
41+
"comma-spacing": ["error", {
42+
"before": false, "after": true
43+
}],
44+
"quotes": [2, "single", "avoid-escape"],
45+
"no-trailing-spaces": 2,
46+
"no-lonely-if": 0,
47+
"eol-last": 2,
48+
"no-nested-ternary": 2,
49+
"space-in-parens": [2, "never"],
50+
"brace-style": [2, "1tbs", {
51+
"allowSingleLine": true
52+
}],
53+
"object-curly-spacing": [2, "always", {
54+
"objectsInObjects": true,
55+
"arraysInObjects": true
56+
}],
57+
"computed-property-spacing": ["error", "never"],
58+
"block-spacing": ["error", "always"],
59+
"one-var": [2, {
60+
"let": "always",
61+
"const": "never"
62+
}],
63+
"no-spaced-func": 2,
64+
"spaced-comment": 0,
65+
"quote-props": [2, "as-needed", {
66+
"keywords": true
67+
}],
68+
"linebreak-style": ["error", "unix"],
69+
"guard-for-in": 2,
70+
"prefer-const": 2,
71+
"no-var": 2,
72+
"prefer-arrow-callback": 2,
73+
"no-const-assign": 2,
74+
"arrow-parens": [2, "as-needed"],
75+
"arrow-spacing": [2, {
76+
"before": true,
77+
"after": true
78+
}]
79+
},
80+
"globals": {
81+
"console": true
82+
}
83+
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/node_modules/
2+
/.idea/
3+
/coverage/
4+
*.DS_Store
5+
npm-debug.log

.scsslint.yml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
linters:
2+
3+
BangFormat:
4+
enabled: true
5+
space_before_bang: true
6+
space_after_bang: false
7+
8+
BorderZero:
9+
enabled: true
10+
11+
ColorKeyword:
12+
enabled: true
13+
14+
Comment:
15+
enabled: false
16+
17+
DebugStatement:
18+
enabled: true
19+
20+
DeclarationOrder:
21+
enabled: true
22+
23+
DuplicateProperty:
24+
enabled: false
25+
26+
ElsePlacement:
27+
enabled: true
28+
style: same_line
29+
30+
EmptyLineBetweenBlocks:
31+
enabled: true
32+
ignore_single_line_blocks: false
33+
34+
EmptyRule:
35+
enabled: true
36+
37+
FinalNewline:
38+
enabled: false
39+
present: false
40+
41+
HexLength:
42+
enabled: true
43+
style: short
44+
45+
HexNotation:
46+
enabled: true
47+
style: uppercase
48+
49+
HexValidation:
50+
enabled: true
51+
52+
IdSelector:
53+
enabled: false
54+
55+
ImportPath:
56+
enabled: true
57+
leading_underscore: false
58+
filename_extension: false
59+
60+
ImportantRule:
61+
enabled: false
62+
63+
Indentation:
64+
enabled: true
65+
character: tab
66+
width: 1
67+
68+
LeadingZero:
69+
enabled: true
70+
style: include_zero
71+
72+
MergeableSelector:
73+
enabled: false
74+
force_nesting: false
75+
76+
NameFormat:
77+
enabled: true
78+
convention: hyphenated_lowercase
79+
allow_leading_underscore: true
80+
81+
NestingDepth:
82+
enabled: true
83+
max_depth: 5
84+
85+
PlaceholderInExtend:
86+
enabled: false
87+
88+
PropertySortOrder:
89+
enabled: false
90+
ignore_unspecified: false
91+
92+
PropertySpelling:
93+
enabled: true
94+
extra_properties: []
95+
96+
QualifyingElement:
97+
enabled: true
98+
allow_element_with_attribute: true
99+
allow_element_with_class: false
100+
allow_element_with_id: false
101+
102+
SelectorDepth:
103+
enabled: true
104+
max_depth: 5
105+
106+
SelectorFormat:
107+
enabled: true
108+
convention: hyphenated_lowercase
109+
110+
Shorthand:
111+
enabled: true
112+
113+
SingleLinePerProperty:
114+
enabled: true
115+
allow_single_line_rule_sets: false
116+
117+
SingleLinePerSelector:
118+
enabled: true
119+
120+
SpaceAfterComma:
121+
enabled: true
122+
123+
SpaceAfterPropertyColon:
124+
enabled: true
125+
style: one_space
126+
127+
SpaceAfterPropertyName:
128+
enabled: true
129+
130+
SpaceBeforeBrace:
131+
enabled: true
132+
style: space
133+
allow_single_line_padding: true
134+
135+
SpaceBetweenParens:
136+
enabled: true
137+
spaces: 0
138+
139+
StringQuotes:
140+
enabled: true
141+
style: double_quotes
142+
143+
TrailingSemicolon:
144+
enabled: true
145+
146+
TrailingZero:
147+
enabled: true
148+
149+
UnnecessaryMantissa:
150+
enabled: true
151+
152+
UnnecessaryParentReference:
153+
enabled: true
154+
155+
UrlFormat:
156+
enabled: false
157+
158+
UrlQuotes:
159+
enabled: true
160+
161+
VendorPrefix:
162+
enabled: false
163+
164+
ZeroUnit:
165+
enabled: true
166+
severity: warning

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: node_js
2+
node_js:
3+
- "6"
4+
before_install:
5+
- npm install -g gulp
6+
- npm install -g eslint
7+
script:
8+
- "gulp eslint && npm test"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Prakhar Srivastav
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# react-autocomplete
2-
React autosuggest component
2+
3+
> WAI-ARIA compliant React autocomplete component

__tests__/Suggestion-test.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use strict';
2+
3+
jest.disableAutomock();
4+
5+
import React from 'react';
6+
import { findDOMNode } from 'react-dom';
7+
import { createRenderer, Simulate, renderIntoDocument } from 'react-addons-test-utils';
8+
import Suggestion from '../src/js/Suggestion';
9+
10+
describe('Suggestion', () => {
11+
it('should render', () => {
12+
const renderer = createRenderer();
13+
14+
renderer.render(
15+
<Suggestion />
16+
);
17+
18+
const suggestion = renderer.getRenderOutput();
19+
20+
expect(suggestion.type).toBe('li');
21+
expect(suggestion.props.role).toBe('option');
22+
});
23+
});

0 commit comments

Comments
 (0)