eslint-plugin-import-typescript
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -5,2 +5,3 @@ "use strict"; | ||
const path = require("path"); | ||
const jsonParser = require("jsonc-parser"); | ||
@@ -47,4 +48,4 @@ function has(map, path) { | ||
if (fs.existsSync(path.join(baseDir, "tsconfig.json"))) { | ||
const tsconfig = JSON.parse( | ||
fs.readFileSync(path.join(baseDir, "tsconfig.json")) | ||
const tsconfig = jsonParser.parse( | ||
fs.readFileSync(path.join(baseDir, "tsconfig.json")).toString() | ||
); | ||
@@ -58,4 +59,4 @@ if (has(tsconfig, "compilerOptions.baseUrl")) { | ||
} else if (fs.existsSync(path.join(baseDir, "jsconfig.json"))) { | ||
const jsconfig = JSON.parse( | ||
fs.readFileSync(path.join(baseDir, "jsconfig.json")) | ||
const jsconfig = jsonParser.parse( | ||
fs.readFileSync(path.join(baseDir, "jsconfig.json")).toString() | ||
); | ||
@@ -62,0 +63,0 @@ if (has(jsconfig, "compilerOptions.baseUrl")) { |
{ | ||
"name": "eslint-plugin-import-typescript", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "index.js", | ||
"dependencies": {}, | ||
"dependencies": { | ||
"jsonc-parser": "^3.2.0" | ||
}, | ||
"description": "Eslint rule enforcing supporting typescript absolute imports and paths", | ||
@@ -7,0 +9,0 @@ "license": "MIT", |
11046
150
1
+ Addedjsonc-parser@^3.2.0
+ Addedjsonc-parser@3.3.1(transitive)