Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9207277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:21:11+00:00 2026-06-18T00:21:11+00:00

My application is running requireJS and is set up using two files: main.js sets

  • 0

My application is running requireJS and is set up using two files:

main.js sets everything and app.js “runs” the application.

main.js looks like this:

/*jslint browser: true, indent : 2, nomen : true, sloppy : true */
/*global requirejs: false */
(function () {
    "use strict";

    requirejs.config({
        baseUrl: "../js"
      , paths: {
          app:          'app'
        , text:         'text'
        ...
      }
      , shim: {
        'overrides':     { deps: ['jquery'] }
        ...
      }
  });

  // init
  requirejs([ 'overrides',..., 'app'], 
    function( $, overrides, ..., App){
      App.start( $, overrides );
    });
}());

And my app.js:

define([], function () {
    'use strict';
    var start = function () {
        require([ 'i18next'... ],
            function (i18n) {
                // stuff

            }
        );
    }
    return {"start": start};
});

My problem is that jslint complains about the return {"start": start}; as unexpected return. However, omitting it will cause my application to not start because of App being undefined.

Any idea how to remove the return-statement and still trigger the application? Or how to tweak to please JSLint? I don’t want to use JSHINT, so please don’t suggest it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:21:12+00:00Added an answer on June 18, 2026 at 12:21 am

    I’d start by adding the missing semicolon:

    define([], function () {
        'use strict';
        var start = function () {
            require([ 'i18next'... ],
                function (i18n) {
                    // stuff
    
                }
            );
        }   // <============ here
        return {"start": start};
    });
    

    I suspect that’s the real reason jslint is unhappy. (I’m surprised that’s not what it’s complaining about…)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application running on Windows IIS. This app has a database
I have an application running in JBoss AS6. Authentication is working using the FORM
I have a VB6 application running for years. This application always reference Excel 2003
Imagine a web application that performs two main functions: Serves data from a file
I'd like to generate alarms on my Java desktop application : alarms set with
I am working on a grails web-app The application is running on a very
I have an ASP.NET application running on IIS 7 and using Windows Authentication. For
How can i get the version of my running application? i have been using
I'm creating an application using Expressjs running on node under IISNode (i.e on windows).
My application running android ice cream sandwich, after importing roboto.ttf and roboto-bold.ttf fonts in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.