Selaa lähdekoodia

Merge pull request #597 from ckeditor/t/473

Internal: Remove gulp dependency for pre-commit linting. Closes #473.
Piotrek Koszuliński 8 vuotta sitten
vanhempi
commit
9c898589fb

+ 0 - 4
.gitignore

@@ -1,7 +1,3 @@
-# These files will be ignored by Git and by our linting tools:
-#	gulp lint
-#	gulp lint-staged
-
 node_modules/
 build/
 coverage/

+ 1 - 1
docs/framework/guides/contributing/development-environment.md

@@ -96,7 +96,7 @@ total 16
 drwxr-xr-x    5 p  staff   170 31 Jan 10:37 .
 drwxr-xr-x  292 p  staff  9928 20 Jan 00:20 ..
 lrwxr-xr-x    1 p  staff    23 31 Jan 10:37 ckeditor5-core -> ../../../ckeditor5-core
-drwxr-xr-x    7 p  staff   238 20 Jan 00:20 ckeditor5-dev-lint
+drwxr-xr-x    7 p  staff   238 20 Jan 00:20 ckeditor5-dev-docs
 lrwxr-xr-x    1 p  staff    25 31 Jan 10:37 ckeditor5-engine -> ../../../ckeditor5-engine
 ```
 

+ 0 - 8
gulpfile.js

@@ -10,14 +10,6 @@
 const path = require( 'path' );
 const gulp = require( 'gulp' );
 
-// Lint tasks. ---------------------------------------------------------------
-
-const ckeditor5Lint = require( '@ckeditor/ckeditor5-dev-lint' );
-
-gulp.task( 'lint', () => ckeditor5Lint.lint() );
-gulp.task( 'lint-staged', () => ckeditor5Lint.lintStaged() );
-gulp.task( 'pre-commit', [ 'lint-staged' ] );
-
 // Tests. ---------------------------------------------------------------------
 
 gulp.task( 'test', () => {

+ 1 - 1
lerna.json

@@ -5,7 +5,7 @@
     "."
   ],
   "hoist": true,
-  "nohoist": "guppy-pre-commit",
+  "nohoist": "husky",
   "commands": {
     "bootstrap": {
       "concurrency": 1

+ 16 - 3
package.json

@@ -45,11 +45,12 @@
   },
   "devDependencies": {
     "@ckeditor/ckeditor5-dev-docs": "^7.4.1",
-    "@ckeditor/ckeditor5-dev-lint": "^3.1.4",
     "@ckeditor/ckeditor5-dev-tests": "^8.2.2",
+    "eslint": "^4.8.0",
     "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",
     "lerna": "^2.2.0",
     "mgit2": "^0.7.2"
   },
@@ -66,9 +67,21 @@
     "url": "https://github.com/ckeditor/ckeditor5.git"
   },
   "scripts": {
+    "lint": "eslint --quiet '**/*.js'",
+    "precommit": "lint-staged",
     "test": "node --max_old_space_size=4096 ./node_modules/.bin/ckeditor5-dev-tests --reporter=dots",
     "install-optional-dependencies": "./scripts/install-optional-dependencies.sh",
     "switch-to-dev-dev": "./scripts/switch-to-dev-dev.sh",
     "build-and-publish-docs": "./scripts/docs/build-and-publish.js"
-  }
+  },
+  "lint-staged": {
+    "**/*.js": [
+      "eslint --quiet"
+    ]
+  },
+  "eslintIgnore": [
+	  "build/**",
+	  "coverage/**",
+	  "packages/**"
+  ]
 }

+ 0 - 5
scripts/switch-to-dev-dev.sh

@@ -23,11 +23,6 @@ echo "Linking ckeditor5-dev-env..."
 rm -rf node_modules/@ckeditor/ckeditor5-dev-env
 ln -s ../../../ckeditor5-dev/packages/ckeditor5-dev-env node_modules/@ckeditor
 
-echo "Linking ckeditor5-dev-lint..."
-
-rm -rf node_modules/@ckeditor/ckeditor5-dev-lint
-ln -s ../../../ckeditor5-dev/packages/ckeditor5-dev-lint node_modules/@ckeditor
-
 echo "Linking ckeditor5-dev-tests..."
 
 rm -rf node_modules/@ckeditor/ckeditor5-dev-tests