Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was 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

Description

@jodyzhang

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions