@@ -0,0 +1,1720 @@
+/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage org.lomatek.jslint;%0A%0Aimport java.io.IOException;%0Aimport org.mozilla.javascript.Context;%0Aimport org.mozilla.javascript.Scriptable;%0Aimport org.mozilla.javascript.NativeArray;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.InputStreamReader;%0Aimport java.io.Reader;%0Aimport java.nio.charset.Charset;%0Aimport org.openide.util.Exceptions;%0A/**%0A *%0A * @author LORD%0A */%0Afinal public class JSLint %7B%0A    private static JSLint instance;%0A    %0A    private Context context = null;%0A    private Scriptable scope = null;%0A    %0A    JSLint ()%7B%0A%09%0A    %7D%0A    public static JSLint getInstance() %7B%0A%09if (instance == null) %7B%0A%09%09instance = new JSLint();%0A%09%7D%0A%09return instance;%0A    %7D%0A    %0A    public NativeArray run(String contents) %7B%0A%09init();%0A%09scope.put(%22contents%22, scope, contents);%0A%09//Get options%0A%09scope.put(%22opts%22, scope, JSLintOptions.getInstance().getOptions(context, scope));%0A%09context.evaluateString(scope, %22results = JSLINT(contents, opts);%22, %22JSLint%22, 1, null);%0A%09Scriptable lint = (Scriptable) scope.get(%22JSLINT%22, scope);%0A%09//%D0%92%D1%8B%D1%85%D0%BE%D0%B4%D0%B8%D0%BC %D0%B8%D0%B7 %D0%BA%D0%BE%D0%BD%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%B0%0A%09context.exit();%0A%09return (NativeArray) lint.get(%22errors%22, null);%0A    %7D%0A    public void init() %7B%0A%09try %7B%0A%09    context = Context.enter();%0A%09    context.setLanguageVersion(Context.VERSION_1_6);%0A%09    %0A%09    if (null == scope) %7B%0A%09%09scope = context.initStandardObjects();%0A%09%09Reader reader = new BufferedReader(new InputStreamReader(getClass().getClassLoader()%0A%09%09%09.getResourceAsStream(%22org/lomatek/jslint/resources/jslint.js%22), Charset.forName(%22UTF-8%22)));%0A%0A%09%09context.evaluateReader(scope, reader, %22JSLint%22, 1, null);%0A%09    %7D%0A%09%7D catch (IOException ex) %7B%0A%09    Exceptions.printStackTrace(ex);%0A%09%7D%0A    %7D%0A    %0A%7D%0A

Add JSLint singltone