Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[Bug 315507] Customize JSDT formatter to comply JSLint #1

Open
wants to merge 1 commit into from

1 participant

John Yani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 30, 2012
  1. John Yani
This page is out of date. Refresh to see the latest.
8 ...se.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/FormatterRegressionTests.java
View
@@ -9246,4 +9246,12 @@ public void _test655() {
public void test656() {
runTest("test656", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
+
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=315507
+ public void test657() {
+ final Map options = DefaultCodeFormatterConstants.getJSLintConventionsSettings();
+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
+ runTest(codeFormatter, "test657", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
+ }
}
12 tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test657/A_in.js
View
@@ -0,0 +1,12 @@
+function Test()
+{
+
+ if (true)
+ {
+ return;
+ }
+}
+
+Test.myFunction = function() {
+
+}
10 tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test657/A_out.js
View
@@ -0,0 +1,10 @@
+function Test() {
+
+ if (true) {
+ return;
+ }
+}
+
+Test.myFunction = function () {
+
+}
Something went wrong with that request. Please try again.