Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upSourcing multiple files? #582
Comments
dcousens
added
the
question
label
Aug 3, 2016
This comment has been minimized.
This comment has been minimized.
|
If you're using a module loading system, like browserify's a.jsexports.foo = function () {}b.jsvar a = require('./a')
a.foo()But it sounds like you're just including both a.js and b.js in a page via a.jsfunction foo () {}b.jsfoo()index.html<script src="a.js"></script>
<script src="b.js"></script>To make the relationship between these files, clear to the linter (and to readers of your code), you should explicitly reference where the b.jswindow.foo()That should fix your issue! |
feross
closed this
Aug 3, 2016
This comment has been minimized.
This comment has been minimized.
|
Great, thanks! |
This comment has been minimized.
This comment has been minimized.
|
One note. The |
This comment has been minimized.
This comment has been minimized.
imjoehaines
commented
Sep 15, 2016
|
In |
This comment has been minimized.
This comment has been minimized.
|
Yep, what @imjoehaines said. |
This comment has been minimized.
This comment has been minimized.
|
Also see #619 which might influence your decision to use, or not to use, |
maasha commentedAug 3, 2016
If I have a function defined in one file that is used in another file I get warnings on defined but not used and not defined. What can be done?