Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[js code hints] code hints are affected by a javascript loading a module with require. #4192

Open
jodyzhang opened this issue Jun 11, 2013 · 2 comments

Comments

@jodyzhang
Copy link
Contributor

1.open folder brackets/src/extensions/default/JavaScriptCodeHints/unittest-files/non-module-test-files into bracket

2.check code hints for app.js file by putting a cursor at app.
->you will see code hints:a,b,c,d,b1

3.under the folder, create a module file called MyModule.js with contents:

define(function (require, exports, module) {
    "use strict";
    exports.TestA = function (a, b) {};
    exports.TestB = function () {
        return "a string";
    };
    exports.j = "hi";
});

4.create another js file under same directory called test.js with content:

/*jslint vars: true, plusplus: true, devel: true, browser: true, nomen: true, indent: 4, maxerr: 50 */
/*global brackets, require */

require(["MyModule"], function (myModule) {
    'use strict';
    var x = myModule.TestA;
});

5.reload the app.js and repeat step 1 for app. for code hint
->there is only d left for code hint.

Expect:
step 5, code hint should be same.

@ghost ghost assigned eztierney Jun 13, 2013
@njx
Copy link
Contributor

njx commented Jun 13, 2013

To @eztierney for prioritization and assignment.

@redmunds
Copy link
Contributor

Was assigned to tern team, so marking "Needs Review".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants