Skip to content

Commit

Permalink
Code style: Switched to ESLint. See #366.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed May 16, 2017
1 parent ea4dc26 commit 49eba13
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 111 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

/* eslint-env node */

'use strict';

module.exports = {
extends: 'ckeditor5'
};
92 changes: 0 additions & 92 deletions .jscsrc

This file was deleted.

12 changes: 0 additions & 12 deletions .jshintrc

This file was deleted.

15 changes: 9 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
* For licensing, see LICENSE.md.
*/

/* eslint-env node */

'use strict';

const path = require( 'path' );
const gulp = require( 'gulp' );

// Lint tasks. ---------------------------------------------------------------

const ckeditor5Lint = require( '@ckeditor/ckeditor5-dev-lint' )();
const ckeditor5Lint = require( '@ckeditor/ckeditor5-dev-lint' );

gulp.task( 'lint', ckeditor5Lint.lint );
gulp.task( 'lint-staged', ckeditor5Lint.lintStaged );
gulp.task( 'lint', () => ckeditor5Lint.lint() );
gulp.task( 'lint-staged', () => ckeditor5Lint.lintStaged() );
gulp.task( 'pre-commit', [ 'lint-staged' ] );

// Tests. ---------------------------------------------------------------------
Expand Down Expand Up @@ -42,7 +44,8 @@ gulp.task( 'docs', () => {
const umberto = require( 'umberto' );
const ckeditor5Docs = require( '@ckeditor/ckeditor5-dev-docs' );

return ckeditor5Docs.build( {
return ckeditor5Docs
.build( {
readmePath: path.join( process.cwd(), 'README.md' ),
sourceFiles: [
process.cwd() + '/packages/ckeditor5-*/src/**/*.@(js|jsdoc)',
Expand Down Expand Up @@ -106,8 +109,8 @@ function assertIsInstalled( packageName ) {
require( packageName + '/package.json' );
} catch ( err ) {
console.error( `Error: Cannot find package '${ packageName }'.\n` );
console.error( `You need to install optional dependencies.` );
console.error( `Run: 'npm run install-optional-dependencies'.` );
console.error( 'You need to install optional dependencies.' );
console.error( 'Run: \'npm run install-optional-dependencies\'.' );

process.exit( 1 );
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
"@ckeditor/ckeditor5-widget": "^0.1.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-dev-lint": "^2.0.2",
"@ckeditor/ckeditor5-dev-lint": "^3.0.0",
"@ckeditor/ckeditor5-dev-tests": "^7.3.0",
"eslint-config-ckeditor5": "^1.0.0",
"gulp": "^3.9.0",
"guppy-pre-commit": "^0.4.0",
"lerna": "^2.0.0-rc.1",
Expand Down

0 comments on commit 49eba13

Please sign in to comment.