File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
packages/eslint-config-airbnb Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1- module . exports = require ( 'airbnb-style/linters/.eslintrc' ) ;
1+ var resolve = require ( 'resolve' ) ;
2+ var stripComments = require ( 'strip-json-comments' ) ;
3+ var fs = require ( 'fs' ) ;
4+
5+ // you could do this all at once if you wanted to look cool
6+ var filename = resolve . sync ( 'airbnb-style/linters/.eslintrc' ) ;
7+ var data = fs . readFileSync ( filename , { encoding : 'utf-8' } ) ;
8+ var dataWithoutComments = stripComments ( data ) ;
9+ var parsed = JSON . parse ( dataWithoutComments ) ;
10+
11+ module . exports = parsed ;
Original file line number Diff line number Diff line change 2727 "airbnb-style" : " 2.0.0" ,
2828 "babel-eslint" : " 3.1.7" ,
2929 "eslint" : " 0.21.2" ,
30- "eslint-plugin-react" : " 2.3.0"
30+ "eslint-plugin-react" : " 2.3.0" ,
31+ "resolve" : " 1.1.6" ,
32+ "strip-json-comments" : " 1.0.2"
3133 }
3234}
You can’t perform that action at this time.
0 commit comments