[beast: 32/47] EBEAST: speed up linting by using 1 eslint invokation
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 32/47] EBEAST: speed up linting by using 1 eslint invokation
- Date: Sat, 2 Sep 2017 00:44:37 +0000 (UTC)
commit 37044bdd55c735368fb44c3bd3d1b11c9df953ea
Author: Tim Janik <timj gnu org>
Date: Thu Jun 8 16:30:00 2017 +0200
EBEAST: speed up linting by using 1 eslint invokation
Signed-off-by: Tim Janik <timj gnu org>
ebeast/.eslintrc.js | 4 +++-
ebeast/.gitignore | 3 +--
ebeast/Makefile.am | 25 ++++++-------------------
3 files changed, 10 insertions(+), 22 deletions(-)
---
diff --git a/ebeast/.eslintrc.js b/ebeast/.eslintrc.js
index acacfde..ae1c884 100644
--- a/ebeast/.eslintrc.js
+++ b/ebeast/.eslintrc.js
@@ -11,10 +11,12 @@ module.exports = {
"Vue": false,
"Bse": false,
"App": false,
+ "Shell": false,
+ "T": false,
"module": true /* allow mods */
},
"rules": {
- "no-unused-vars": [ "warn", { "argsIgnorePattern": "^_.*", "varsIgnorePattern": "^_.*" } ],
+ "no-unused-vars": [ "warn", { "args": "none", "argsIgnorePattern": "^__.*", "varsIgnorePattern": "^__.*"
} ],
"no-unreachable": [ "warn" ],
"semi": [ "error", "always" ],
"no-extra-semi": [ "warn" ],
diff --git a/ebeast/.gitignore b/ebeast/.gitignore
index eb466da..b623f9e 100644
--- a/ebeast/.gitignore
+++ b/ebeast/.gitignore
@@ -5,5 +5,4 @@
/package.json
/node_modules/
/objects/
-/xlint-html
-/xlint-js
+/xlinting
diff --git a/ebeast/Makefile.am b/ebeast/Makefile.am
index 24b4d51..6408611 100644
--- a/ebeast/Makefile.am
+++ b/ebeast/Makefile.am
@@ -75,7 +75,7 @@ objects/vue-components.html: $(VUE_COMPONENTS_INPUTS) Makefile
# == app ==
app: .appstamp
-.appstamp: package.json xlint-html xlint-js v8bse/v8bse.node
+.appstamp: package.json xlinting v8bse/v8bse.node
.appstamp: objects/app.css objects/gradient-01.png objects/vc-bundle.js objects/vue-components.html
$(Q) rm -rf .bundlestamp "./$(BUNDLEDIR)" # avoid electron picking up stale resources
$(Q) touch $@
@@ -118,28 +118,15 @@ objects/gradient-01.png: objects/app.css Makefile
$(Q) rm -f $@.tmp
MOSTLYCLEANFILES += objects/gradient-01.png objects/gradient-01.*tmp
-# == HTML linting ==
+# == Linting rules ==
HTML_LINT_FILES = index.html
-xlint-html: $(HTML_LINT_FILES)
- $(AM_V_GEN)
- $(Q) rm -f $@.log $@
- $(Q) for file in $(HTML_LINT_FILES) ; do \
- xmllint --html --noout --valid $$file >>$@.log 2>&1 ; \
- done
- $(Q) cat $@.log ; test ! -s $@.log
- $(Q) mv $@.log $@
-MOSTLYCLEANFILES += xlint-html xlint-html.log
-
-# == JS linting ==
-JS_LINT_FILES = *.js vc/*.js $(HTML_LINT_FILES)
-xlint-js: $(JS_LINT_FILES) package.json
+JS_LINT_FILES = *.js vc/*.js vc/*.vue $(HTML_LINT_FILES)
+xlinting: $(JS_LINT_FILES) package.json
$(AM_V_GEN)
$(Q) rm -f $@
- $(Q) for file in $(JS_LINT_FILES) ; do \
- ./node_modules/.bin/eslint -f unix $$file || exit $$? ; \
- done
+ $(Q) ./node_modules/.bin/eslint -f unix $(JS_LINT_FILES)
$(Q) touch $@
-MOSTLYCLEANFILES += xlint-js
+MOSTLYCLEANFILES += xlinting
# == install ==
install-exec-bundle: .bundlestamp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]