8
0
فهرست منبع

Aligned comments to changes in the ESLint config.

Piotrek Koszuliński 8 سال پیش
والد
کامیت
4e495689a0

+ 2 - 0
packages/ckeditor5-engine/.eslintrc.js

@@ -3,6 +3,8 @@
  * For licensing, see LICENSE.md.
  */
 
+/* eslint-env node */
+
 'use strict';
 
 module.exports = {

+ 1 - 1
packages/ckeditor5-engine/gulpfile.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* jshint browser: false, node: true, strict: true */
+/* eslint-env node */
 
 'use strict';
 

+ 0 - 1
packages/ckeditor5-engine/src/model/liveposition.js

@@ -134,7 +134,6 @@ export default class LivePosition extends Position {
  * @method module:engine/model/liveposition~LivePosition.bindWithDocument
  */
 function bindWithDocument() {
-	/* jshint validthis: true */
 	// Operation types handled by LivePosition (these are operations that change model tree structure).
 	const supportedTypes = new Set( [ 'insert', 'move', 'remove', 'reinsert' ] );
 

+ 0 - 1
packages/ckeditor5-engine/src/model/writer.js

@@ -114,7 +114,6 @@ export function remove( range ) {
  * @returns {module:engine/model/range~Range} Range containing moved nodes.
  */
 export function move( sourceRange, targetPosition ) {
-	/* jshint validthis:true */
 	if ( !sourceRange.isFlat ) {
 		/**
 		 * Trying to move a range that starts and ends in different element.

+ 0 - 1
packages/ckeditor5-engine/tests/dataprocessor/xmldataprocessor.js

@@ -68,7 +68,6 @@ describe( 'XmlDataProcessor', () => {
 		for ( const name in xssTemplates ) {
 			const input = xssTemplates[ name ].replace( /%xss%/g, 'testXss()' );
 
-			// eslint-disable-next-line no-loop-func
 			it( 'should prevent XSS attacks: ' + name, done => {
 				window.testXss = sinon.spy();
 				dataProcessor.toView( input );

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

@@ -27,9 +27,7 @@ class FooOperation extends Operation {
 	}
 
 	getReversed() {
-		/* jshint ignore:start */
 		return new BarOperation( this.string, this.baseVersion );
-		/* jshint ignore:end */
 	}
 }
 

+ 1 - 1
packages/ckeditor5-engine/tests/view/manual/clickobserver.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* globals console:false, document */
+/* globals console, document */
 
 import Document from '../../../src/view/document';
 import DomEventObserver from '../../../src/view/observer/domeventobserver';

+ 1 - 1
packages/ckeditor5-engine/tests/view/manual/focusobserver.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* globals console:false, document */
+/* globals console, document */
 
 import Document from '../../../src/view/document';
 import { setData } from '../../../src/dev-utils/view';

+ 1 - 1
packages/ckeditor5-engine/tests/view/manual/keyobserver.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* globals console:false, document */
+/* globals console, document */
 
 import Document from '../../../src/view/document';
 import { setData } from '../../../src/dev-utils/view';

+ 1 - 1
packages/ckeditor5-engine/tests/view/manual/mutationobserver.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* globals console:false, document */
+/* globals console, document */
 
 import Document from '../../../src/view/document';
 import { setData } from '../../../src/dev-utils/view';

+ 1 - 1
packages/ckeditor5-engine/tests/view/manual/selectionobserver.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* globals console:false, document */
+/* globals console, document */
 
 import Document from '../../../src/view/document';
 import { setData } from '../../../src/dev-utils/view';

+ 1 - 1
packages/ckeditor5-engine/tests/view/manual/x-index.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* globals console:false, document */
+/* globals console, document */
 
 import Document from '../../../src/view/document';
 import { setData } from '../../../src/dev-utils/view';

+ 1 - 1
packages/ckeditor5-engine/tests/view/textproxy.js

@@ -94,7 +94,7 @@ describe( 'TextProxy', () => {
 		} );
 
 		it( 'should return null if element is inside DocumentFragment', () => {
-			new DocumentFragment( [ wrapper ] );
+			new DocumentFragment( [ wrapper ] ); // eslint-disable-line no-new
 
 			expect( textProxy.document ).to.be.null;
 		} );