From b08bf3b398e1f19d48d44a05044943a0d556651d Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 23 Jun 2020 19:00:21 +0200 Subject: [PATCH] Change to a more standard way of specifying the eslint version Tested-by: Travis --- .travis.yml | 2 +- INSTALL.adoc | 4 +++- Makefile | 2 +- package.json | 5 +++++ 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 package.json diff --git a/.travis.yml b/.travis.yml index 105e5c83c..324d019e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ python: dist: xenial before_script: - nvm install - - npm install -g eslint@7.0.0 + - npm install script: make check after_success: - "curl -o /tmp/travis-automerge https://raw.githubusercontent.com/vmiklos/osm-gimmisn/master/tools/travis-automerge" diff --git a/INSTALL.adoc b/INSTALL.adoc index ecd8b9008..1f8e8053d 100644 --- a/INSTALL.adoc +++ b/INSTALL.adoc @@ -35,10 +35,12 @@ python3 -m venv osm-gimmisn-env This makes sure that you will have exactly the same version of the depdendencies as everyone else. -- Install Python dependencies: +- Install the dependencies (Python, node and eslint): ---- pip install -r requirements.txt +nvm install +npm install ---- - Build the generated code and data: diff --git a/Makefile b/Makefile index 6d04dbd2e..1a774090f 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ check-mypy: $(patsubst %.py,%.mypy,$(PYTHON_OBJECTS)) $(QUIET_PYLINT)env PYTHONPATH=. pylint $< && touch $@ %.eslint : %.js Makefile .eslintrc - $(QUIET_ESLINT)eslint $< && touch $@ + $(QUIET_ESLINT)node_modules/eslint/bin/eslint.js $< && touch $@ %.mypy: %.py Makefile $(QUIET_MYPY)mypy --python-version 3.6 --strict --no-error-summary $< && touch $@ diff --git a/package.json b/package.json new file mode 100644 index 000000000..39294b5c1 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "eslint": "7.0.0" + } +}