File tree 7 files changed +679
-92
lines changed
7 files changed +679
-92
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ "env" : {
3
+ "es6" : true ,
4
+ "browser" : true
5
+ } ,
6
+ "extends" : "airbnb" ,
7
+ "parserOptions" : {
8
+ "ecmaVersion" : 7 ,
9
+ "ecmaFeatures" : {
10
+ "experimentalObjectRestSpread" : true ,
11
+ "jsx" : true
12
+ } ,
13
+ "sourceType" : "module"
14
+ } ,
15
+ "parser" : "babel-eslint" ,
16
+ rules : {
17
+ "comma-dangle" : [ 2 , "only-multiline" ] ,
18
+ "max-len" : [ 1 , { "code" : 140 } ] ,
19
+ "no-continue" : [ 0 ] ,
20
+ "no-plusplus" : [ 0 ] ,
21
+ "space-before-function-paren" : [ 2 , "always" ] ,
22
+ "import/no-extraneous-dependencies" : [ 2 , { "devDependencies" : true } ] ,
23
+ "react/jsx-filename-extension" : [ "error" , { "extensions" : [ ".js" ] } ]
24
+ } ,
25
+ } ;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ help: info
17
17
@echo " make deps - install all dependencies."
18
18
@echo " make serve - start the server."
19
19
@echo " make tests - run tests."
20
+ @echo " make lint - run lint."
20
21
@echo " make docs - build and serve the docs."
21
22
@echo " make build - build project artifacts."
22
23
@echo " make publish - build and publish version on npm."
48
49
tests-ci :
49
50
@npm run test -- --single-run
50
51
52
+ lint :
53
+ @npm run lint
54
+
51
55
docs : build-docs
52
56
gitbook serve
53
57
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 14
14
},
15
15
"scripts" : {
16
16
"start" : " ./node_modules/.bin/webpack-dev-server --inline --host 127.0.0.1 --content-base examples/" ,
17
- "test" : " cross-env NODE_ENV=test karma start"
17
+ "test" : " cross-env NODE_ENV=test karma start" ,
18
+ "test:full" : " npm-run-all -p 'test -- --single-run' lint" ,
19
+ "lint" : " eslint lib/ specs/"
18
20
},
19
21
"authors" : [
20
22
" Ryan Florence"
21
23
],
22
24
"license" : " MIT" ,
23
25
"devDependencies" : {
24
26
"babel-core" : " ^6.7.4" ,
27
+ "babel-eslint" : " ^7.1.1" ,
25
28
"babel-loader" : " ^6.2.4" ,
26
29
"babel-preset-es2015" : " ^6.6.0" ,
27
30
"babel-preset-react" : " ^6.5.0" ,
28
31
"babel-preset-stage-2" : " ^6.24.1" ,
29
32
"cross-env" : " ^5.0.1" ,
30
33
"envify" : " ^3.4.1" ,
34
+ "eslint" : " ^3.9.1" ,
35
+ "eslint-config-airbnb" : " latest" ,
36
+ "eslint-plugin-import" : " ^2.1.0" ,
37
+ "eslint-plugin-jsx-a11y" : " ^2.2.3" ,
38
+ "eslint-plugin-react" : " ^6.6.0" ,
31
39
"expect" : " ^1.20.2" ,
32
40
"gitbook-cli" : " ^2.3.0" ,
33
41
"karma" : " ^1.3.0" ,
Original file line number Diff line number Diff line change 1
1
const testsContext = require . context ( '.' , true , / s p e c $ / ) ;
2
- testsContext . keys ( ) . forEach ( function ( path ) {
3
- try {
4
- testsContext ( path ) ;
5
- } catch ( err ) {
6
- debugger
7
- console . error ( `[ERROR] WITH SPEC FILE: ${ path } ` ) ;
8
- console . error ( err ) ;
9
- }
2
+ testsContext . keys ( ) . forEach ( ( path ) => {
3
+ try {
4
+ testsContext ( path ) ;
5
+ } catch ( err ) {
6
+ console . error ( `[ERROR] WITH SPEC FILE: ${ path } ` ) ;
7
+ console . error ( err ) ;
8
+ }
10
9
} ) ;
Original file line number Diff line number Diff line change 1
- var commonConfig = require ( './webpack.config' ) ;
1
+ const commonConfig = require ( './webpack.config' ) ;
2
2
3
3
commonConfig . plugins = [ ] ;
4
4
commonConfig . entry = undefined ;
5
5
commonConfig . debug = true ;
6
+ commonConfig . devtool = 'inline-source-map' ;
6
7
7
8
module . exports = commonConfig ;
You can’t perform that action at this time.
0 commit comments