From e40fad87d687efb162def39851201f5a6b1fc9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Go=C5=82aszewski?= Date: Tue, 10 Oct 2017 11:04:50 +0200 Subject: [PATCH 1/2] Internal: Remove gulp dependency for pre-commit linting. --- .eslintignore | 1 + .gitignore | 4 ---- gulpfile.js | 22 ---------------------- package.json | 16 ++++++++++++---- 4 files changed, 13 insertions(+), 30 deletions(-) create mode 100644 .eslintignore delete mode 100644 gulpfile.js diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..b90d0ce --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +src/lib/ diff --git a/.gitignore b/.gitignore index 1ec5cd5..c2658d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1 @@ -# These files will be ignored by Git and by our linting tools: -# gulp lint -# gulp lint-staged - node_modules/ diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 40c0e59..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -/* eslint-env node */ - -'use strict'; - -const gulp = require( 'gulp' ); -const ckeditor5Lint = require( '@ckeditor/ckeditor5-dev-lint' ); -const options = { - // Files ignored by `gulp lint` task. - // Files from .gitignore will be added automatically during task execution. - ignoredFiles: [ - 'src/lib/**' - ] -}; - -gulp.task( 'lint', () => ckeditor5Lint.lint( options ) ); -gulp.task( 'lint-staged', () => ckeditor5Lint.lintStaged( options ) ); -gulp.task( 'pre-commit', [ 'lint-staged' ] ); diff --git a/package.json b/package.json index 3780e7e..9107096 100644 --- a/package.json +++ b/package.json @@ -14,13 +14,12 @@ "@ckeditor/ckeditor5-utils": "^1.0.0-alpha.1" }, "devDependencies": { - "@ckeditor/ckeditor5-dev-lint": "^3.1.4", "@ckeditor/ckeditor5-basic-styles": "^1.0.0-alpha.1", "@ckeditor/ckeditor5-paragraph": "^1.0.0-alpha.1", "@ckeditor/ckeditor5-essentials": "^1.0.0-alpha.1", "eslint-config-ckeditor5": "^1.0.6", - "gulp": "^3.9.1", - "guppy-pre-commit": "^0.4.0" + "husky": "^0.14.3", + "lint-staged": "^4.2.3" }, "engines": { "node": ">=6.0.0", @@ -38,5 +37,14 @@ "lang", "src", "theme" - ] + ], + "scripts": { + "lint": "eslint --quiet '**/*.js'", + "precommit": "lint-staged" + }, + "lint-staged": { + "**/*.js": [ + "eslint --quiet" + ] + } } From dd43e118b594e6813d48b7cfee083f0a057918fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Go=C5=82aszewski?= Date: Tue, 10 Oct 2017 16:44:28 +0200 Subject: [PATCH 2/2] Other: Move ESLint ignore configuration to package.json. --- .eslintignore | 1 - package.json | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index b90d0ce..0000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -src/lib/ diff --git a/package.json b/package.json index 9107096..9f72e89 100644 --- a/package.json +++ b/package.json @@ -46,5 +46,6 @@ "**/*.js": [ "eslint --quiet" ] - } + }, + "eslintIgnore": [ "src/lib/**" ] }