Skip to content

Commit a278ac4

Browse files
author
vvo
committed
fix: eslint extends features works strangely
1 parent b0cc948 commit a278ac4

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var fs = require('fs')
2+
var path = require('path')
3+
var stripComments = require('strip-json-comments')
4+
5+
var filename = path.join(__dirname, '.eslintrc')
6+
var data = fs.readFileSync(filename, {encoding: 'utf-8'})
7+
var dataWithoutComments = stripComments(data)
8+
var parsed = JSON.parse(dataWithoutComments)
9+
10+
module.exports = parsed

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@
77
"eslint",
88
"eslintconfig"
99
],
10+
"main": "index.js",
1011
"author": "Algolia <support@algolia.com>",
1112
"license": "MIT",
1213
"bugs": {
1314
"url": "https://github.com/algolia/eslint-config-algolia"
1415
},
15-
"homepage": "https://github.com/algolia/eslint-config-algolia"
16+
"homepage": "https://github.com/algolia/eslint-config-algolia",
17+
"dependencies": {
18+
"strip-json-comments": "1.0.2"
19+
}
1620
}

0 commit comments

Comments
 (0)