Skip to content

Commit 2e25a1d

Browse files
committed
Move eslint/flake8 to style/style_check make targets
This makes it more likely to for contributors to catch errors alongside style errors before hitting CI servers. Developers need only run one make target rather than several.
1 parent 4315af0 commit 2e25a1d

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ cache: pip
44
matrix:
55
fast_finish: true
66
include:
7-
- env: TOXENV=eslint
8-
- env: TOXENV=flake8
97
- env: TOXENV=style
108
- env: TOXENV=readme
119
- python: 3.5

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,22 @@ style: package-lock.json
66
isort .
77
black --target-version=py35 .
88
flake8
9+
npx eslint --ignore-path .gitignore --fix .
910
npx prettier --ignore-path .gitignore --write $(PRETTIER_TARGETS)
1011

1112
style_check: package-lock.json
1213
isort -c .
1314
black --target-version=py35 --check .
14-
npx prettier --ignore-path .gitignore --check $(PRETTIER_TARGETS)
15-
16-
flake8:
1715
flake8
16+
npx eslint --ignore-path .gitignore .
17+
npx prettier --ignore-path .gitignore --check $(PRETTIER_TARGETS)
1818

1919
example:
2020
python example/manage.py migrate --noinput
2121
-DJANGO_SUPERUSER_PASSWORD=p python example/manage.py createsuperuser \
2222
--noinput --username="$(USER)" --email="$(USER)@mailinator.com"
2323
python example/manage.py runserver
2424

25-
eslint: package-lock.json
26-
npx eslint --ignore-path .gitignore .
27-
2825
package-lock.json: package.json
2926
npm install
3027
touch $@

tox.ini

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[tox]
22
envlist =
3-
eslint
4-
flake8
53
style
64
readme
75
py{35,36,37,38}-dj22-sqlite
@@ -35,25 +33,15 @@ whitelist_externals = make
3533
pip_pre = True
3634
commands = make coverage TEST_ARGS='{posargs:tests}'
3735

38-
[testenv:flake8]
39-
basepython = python3
40-
commands = make flake8
41-
deps = flake8
42-
skip_install = true
43-
4436
[testenv:style]
4537
basepython = python3
4638
commands = make style_check
4739
deps =
4840
black>=19.10b0
41+
flake8
4942
isort>=5.0.2
5043
skip_install = true
5144

52-
[testenv:eslint]
53-
commands = make eslint
54-
deps =
55-
skip_install = true
56-
5745
[testenv:readme]
5846
basepython = python3
5947
commands = python setup.py check -r -s

0 commit comments

Comments
 (0)