Skip to content

Commit a66395c

Browse files
committed
es6, webpack, and more complete testing
1 parent 6c01f1e commit a66395c

27 files changed

+513
-471
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/**
22
reports/**
3+
index.js

.eslintrc

Lines changed: 0 additions & 157 deletions
This file was deleted.

.eslintrc.js

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
module.exports = {
2+
3+
"env": {
4+
"node": true,
5+
"commonjs": true,
6+
"es6": true
7+
},
8+
9+
"ecmaFeatures": {
10+
"arrowFunctions": true,
11+
"binaryLiterals": false,
12+
"blockBindings": true,
13+
"classes": false,
14+
"defaultParams": true,
15+
"destructuring": true,
16+
"forOf": false,
17+
"generators": false,
18+
"modules": true,
19+
"objectLiteralComputedProperties": false,
20+
"objectLiteralDuplicateProperties": false,
21+
"objectLiteralShorthandMethods": true,
22+
"objectLiteralShorthandProperties": true,
23+
"octalLiterals": false,
24+
"regexUFlag": false,
25+
"regexYFlag": false,
26+
"restParams": true,
27+
"spread": true,
28+
"superInFunctions": true,
29+
"templateStrings": true,
30+
"unicodeCodePointEscapes": false,
31+
"globalReturns": false,
32+
"jsx": true,
33+
"experimentalObjectRestSpread": true
34+
},
35+
36+
"parser": "babel-eslint",
37+
38+
"rules": {
39+
"array-bracket-spacing": [ 2, "always" ],
40+
"arrow-body-style": [ 2, "as-needed" ],
41+
"arrow-parens": [ 2, "as-needed" ],
42+
"block-scoped-var": 2,
43+
"block-spacing": [ 2, "always" ],
44+
"brace-style": [ 2, "1tbs", {
45+
"allowSingleLine": false
46+
} ],
47+
"comma-dangle": [ 2, "never" ],
48+
"comma-spacing": [ 2, {
49+
"after": true,
50+
"before": false
51+
} ],
52+
"consistent-return": 2,
53+
"consistent-this": [ 2, "self" ],
54+
"constructor-super": 2,
55+
"curly": [ 2, "all" ],
56+
"dot-location": [ 2, "property" ],
57+
"dot-notation": 2,
58+
"eol-last": 2,
59+
"indent": [ 2, 2, {
60+
"SwitchCase": 1
61+
} ],
62+
"jsx-quotes": [ 2, "prefer-double" ],
63+
"max-len": [ 2, 120, 2, {
64+
"ignorePattern": "((^import[^;]+;$)|(^\\s*it\\())",
65+
"ignoreUrls": true
66+
} ],
67+
"new-cap": 2,
68+
"no-alert": 2,
69+
"no-confusing-arrow": 2,
70+
"no-caller": 2,
71+
"no-class-assign": 2,
72+
"no-cond-assign": [ 2, "always" ],
73+
"no-console": 1,
74+
"no-const-assign": 2,
75+
"no-constant-condition": 2,
76+
"no-control-regex": 2,
77+
"no-debugger": 1,
78+
"no-dupe-args": 2,
79+
"no-dupe-class-members": 2,
80+
"no-dupe-keys": 2,
81+
"no-duplicate-case": 2,
82+
"no-else-return": 2,
83+
"no-empty": 2,
84+
"no-empty-character-class": 2,
85+
"no-eq-null": 2,
86+
"no-eval": 2,
87+
"no-ex-assign": 2,
88+
"no-extend-native": 2,
89+
"no-extra-bind": 2,
90+
"no-extra-boolean-cast": 2,
91+
"no-extra-parens": [ 2, "functions" ],
92+
"no-extra-semi": 2,
93+
"no-func-assign": 2,
94+
"no-implicit-coercion": [ 2, {
95+
"boolean": true,
96+
"number": true,
97+
"string": true
98+
} ],
99+
"no-implied-eval": 2,
100+
"no-inner-declarations": [ 2, "both" ],
101+
"no-invalid-regexp": 2,
102+
"no-invalid-this": 2,
103+
"no-irregular-whitespace": 2,
104+
"no-lonely-if": 2,
105+
"no-negated-condition": 2,
106+
"no-negated-in-lhs": 2,
107+
"no-new": 2,
108+
"no-new-func": 2,
109+
"no-new-object": 2,
110+
"no-obj-calls": 2,
111+
"no-proto": 2,
112+
"no-redeclare": 2,
113+
"no-regex-spaces": 2,
114+
"no-return-assign": 2,
115+
"no-self-compare": 2,
116+
"no-sequences": 2,
117+
"no-sparse-arrays": 2,
118+
"no-this-before-super": 2,
119+
"no-trailing-spaces": 2,
120+
"no-undef": 2,
121+
"no-unexpected-multiline": 2,
122+
"no-unneeded-ternary": 2,
123+
"no-unreachable": 2,
124+
"no-unused-vars": [ 1, {
125+
"args": "after-used",
126+
"vars": "all",
127+
"varsIgnorePattern": "React"
128+
} ],
129+
"no-use-before-define": 2,
130+
"no-useless-call": 2,
131+
"no-useless-concat": 2,
132+
"no-var": 2,
133+
"no-warning-comments": [ 1, {
134+
"location": "anywhere",
135+
"terms": [
136+
"todo"
137+
]
138+
} ],
139+
"no-with": 2,
140+
"object-curly-spacing": [ 2, "always" ],
141+
"object-shorthand": 2,
142+
"one-var": [ 2, "never" ],
143+
"prefer-arrow-callback": 2,
144+
"prefer-const": 2,
145+
"prefer-spread": 2,
146+
"prefer-template": 2,
147+
"radix": 2,
148+
"semi": 2,
149+
"sort-vars": [ 2, {
150+
"ignoreCase": true
151+
} ],
152+
"keyword-spacing": 2,
153+
"space-before-blocks": [ 2, "always" ],
154+
"space-before-function-paren": [ 2, "never" ],
155+
"space-infix-ops": [ 2, {
156+
"int32Hint": false
157+
} ],
158+
"use-isnan": 2,
159+
"valid-typeof": 2,
160+
"vars-on-top": 2,
161+
"yoda": [ 2, "never" ]
162+
}
163+
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
reports
33
npm-debug.log
44
coverage
5+
./index.js

.webpack.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
entry: './lib/index.js',
3+
4+
output: {
5+
filename: 'index.js',
6+
path: './'
7+
},
8+
9+
module: {
10+
loaders: [
11+
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}
12+
]
13+
}
14+
};

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
55

66
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
77

8-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,3 @@ Then configure the rules you want to use under the rules section.
7171
## License
7272

7373
MIT License.
74-
75-
76-
77-
78-

index.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)