Skip to content

Extract linters from pre-commit. #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[flake8]
max-line-length = 88
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,node_modules,site
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,3 @@ repos:
rev: 1.19.1
hooks:
- id: prettier
- repo: https://github.com/PyCQA/flake8
rev: 3.7.9
hooks:
- id: flake8
7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,5 @@
"vscode-html-languageserver-bin": "^1.4.0",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
},
"scripts": {
"build:slides": "webpack",
"lint:css": "stylelint --ignore-path .gitignore '**/*.css'",
"lint:js": "eslint --ext .js --ignore-path .gitignore .",
"lint:md": "remark --frail .",
"lint:pug": "pug-lint **/*.pug"
}
}
68 changes: 67 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mkdocs-material = "^4.6.0"
[tool.poetry.dev-dependencies]
dependencies = "^0.15"
django = "^3.0.2"
flake8 = "^3.7.9"
invoke = "^1.4.0"
pre-commit = "^1.21.0"
stories = "^0.10.1"
Expand Down
11 changes: 6 additions & 5 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
def lint(c):
c.run("poetry run pre-commit run -a")
c.run("poetry run python -m mddoctest")
c.run("poetry run flake8 .")
c.run("poetry run yamllint --strict .")
c.run("npm run lint:css")
c.run("npm run lint:js")
c.run("npm run lint:md")
c.run("npm run lint:pug")
c.run("npx stylelint --ignore-path .gitignore '**/*.css'")
c.run("npx eslint --ext .js --ignore-path .gitignore .")
c.run("npx remark --frail .")
c.run("npx pug-lint **/*.pug")
c.run("vale '--glob=*.md' docs")


@task
def build(c):
c.run("poetry run mkdocs build")
c.run("npm run build:slides")
c.run("npx webpack")


@task
Expand Down