Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Use loophole package to to fix #104 (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
guncha authored and Arcanemagus committed Aug 10, 2016
1 parent 72d50c6 commit a155977
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ module.exports =
requireResolve TSLINT_MODULE_NAME, { basedir },
(err, linterPath, pkg) =>
if not err and pkg?.version.startsWith '3.'
linter = require linterPath
linter = require('loophole').allowUnsafeNewFunction ->
require linterPath
else
linter = @tslintDef
@tslintCache.set basedir, linter
resolve(linter)

provideLinter: ->
@tslintDef = require TSLINT_MODULE_NAME
@tslintDef = require('loophole').allowUnsafeNewFunction ->
require TSLINT_MODULE_NAME

provider =
grammarScopes: @scopes
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"dependencies": {
"atom-package-deps": "4.1.0",
"loophole": "^1.1.0",
"resolve": "1.1.7",
"tslint": "3.14.0",
"typescript": "1.8.10"
Expand Down

0 comments on commit a155977

Please sign in to comment.