Przeglądaj źródła

Added separate .jshintrc file in the tests directory. Remove global declarations from files.

Piotr Jasiun 10 lat temu
rodzic
commit
8e4348f5f0

+ 1 - 2
packages/ckeditor5-engine/.jshintrc

@@ -12,8 +12,7 @@
 	"globalstrict": true,
 	"globalstrict": true,
 
 
 	"globals": {
 	"globals": {
-		"CKEDITOR": false,
-		"bender": false
+		"CKEDITOR": false
 	},
 	},
 	"predef": [
 	"predef": [
 		"-Promise"
 		"-Promise"

+ 30 - 0
packages/ckeditor5-engine/tests/.jshintrc

@@ -0,0 +1,30 @@
+{
+	"esnext": true,
+	"expr": true,
+
+	"immed": true,
+	"latedef": "nofunc",
+	"noarg": true,
+	"nonbsp": true,
+	"undef": true,
+	"unused": true,
+	"strict": true,
+
+	"globalstrict": true,
+
+	"globals": {
+		"CKEDITOR": false,
+		"bender": false,
+		"describe": false,
+		"it": false,
+		"before": false,
+		"beforeEach": false,
+		"expect": false,
+		"bender": false,
+		"sinon": false,
+		"setTimeout": false
+	},
+	"predef": [
+		"-Promise"
+	]
+}

+ 1 - 1
packages/ckeditor5-engine/tests/ckeditor/ckeditor.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, beforeEach, document */
+/* globals document */
 
 
 'use strict';
 'use strict';
 
 

+ 0 - 2
packages/ckeditor5-engine/tests/config/config.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, beforeEach */
-
 'use strict';
 'use strict';
 
 
 var modules = bender.amd.require( 'config' );
 var modules = bender.amd.require( 'config' );

+ 1 - 1
packages/ckeditor5-engine/tests/editor/editor.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, beforeEach, sinon, document, setTimeout */
+/* globals document */
 
 
 'use strict';
 'use strict';
 
 

+ 0 - 2
packages/ckeditor5-engine/tests/editorconfig/editorconfig.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, beforeEach */
-
 'use strict';
 'use strict';
 
 
 var modules = bender.amd.require( 'editorconfig', 'ckeditor' );
 var modules = bender.amd.require( 'editorconfig', 'ckeditor' );

+ 0 - 2
packages/ckeditor5-engine/tests/emittermixin/emittermixin.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, beforeEach, bender, sinon */
-
 'use strict';
 'use strict';
 
 
 var modules = bender.amd.require( 'emittermixin', 'eventinfo', 'utils' );
 var modules = bender.amd.require( 'emittermixin', 'eventinfo', 'utils' );

+ 0 - 2
packages/ckeditor5-engine/tests/eventinfo/eventinfo.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, bender */
-
 'use strict';
 'use strict';
 
 
 var modules = bender.amd.require( 'eventinfo' );
 var modules = bender.amd.require( 'eventinfo' );

+ 0 - 2
packages/ckeditor5-engine/tests/mvc/collection/collection.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, bender, sinon */
-
 'use strict';
 'use strict';
 
 
 var modules = bender.amd.require( 'collection', 'model' );
 var modules = bender.amd.require( 'collection', 'model' );

+ 0 - 2
packages/ckeditor5-engine/tests/mvc/model/model.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, beforeEach, bender, sinon */
-
 'use strict';
 'use strict';
 
 
 var modules = bender.amd.require( 'model', 'eventinfo' );
 var modules = bender.amd.require( 'model', 'eventinfo' );

+ 1 - 1
packages/ckeditor5-engine/tests/plugin/plugin.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, before, document */
+/* globals document */
 
 
 'use strict';
 'use strict';
 
 

+ 1 - 1
packages/ckeditor5-engine/tests/plugincollection/plugincollection.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, before, document */
+/* globals document */
 
 
 'use strict';
 'use strict';
 
 

+ 0 - 2
packages/ckeditor5-engine/tests/promise/promise.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect */
-
 'use strict';
 'use strict';
 
 
 var modules = bender.amd.require( 'promise' );
 var modules = bender.amd.require( 'promise' );

+ 0 - 2
packages/ckeditor5-engine/tests/utils/utils.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals describe, it, expect, bender */
-
 'use strict';
 'use strict';
 
 
 var modules = bender.amd.require( 'utils', 'utils-lodash' );
 var modules = bender.amd.require( 'utils', 'utils-lodash' );