Skip to content

Commit f312fa7

Browse files
Removes trailing comma
1 parent 555a1ec commit f312fa7

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

index.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
const resolve = require('resolve');
22
const path = require('path');
33

4-
module.exports.interfaceVersion = 2;
5-
64
function opts(file, config) {
75
return Object.assign(
86
{ extensions: ['.ts', '.tsx'] },
97
config,
108
// path.resolve will handle paths relative to CWD
11-
{ basedir: path.dirname(path.resolve(file)) },
9+
{ basedir: path.dirname(path.resolve(file)) }
1210
);
1311
}
1412

15-
module.exports.resolve = function(source, file, config) {
16-
if (resolve.isCore(source)) {
17-
return { found: true, path: null };
18-
}
13+
module.exports = {
14+
interfaceVersion: 2,
15+
resolve: function(source, file, config) {
16+
if (resolve.isCore(source)) {
17+
return { found: true, path: null };
18+
}
1919

20-
try {
21-
return { found: true, path: resolve.sync(source, opts(file, config)) };
22-
} catch (err) {
23-
return { found: false };
24-
}
20+
try {
21+
return { found: true, path: resolve.sync(source, opts(file, config)) };
22+
} catch (err) {
23+
return { found: false };
24+
}
25+
},
2526
};

0 commit comments

Comments
 (0)