question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

linting between pre-commit and package.json is inconsistent

See original GitHub issue

Observed behavior

mentioned by @rtibbles:

our frontend linting commands in our package.json don’t match the way we do linting in our pre-commit hooks/travis linting. Would be good to update those if possible.

There was an update you had made to the build tools Javascript which was getting linted by travis, but doesn’t get linted by default by our package.json commands.

Expected behavior

linting when running devserver should be consistent with pre-commit, which is used by travis

User-facing consequences

devs think PRs are good but they turn out not to be

Steps to reproduce

make a change to build tools. This will be linted by pre-commit but not the devserver

Context

0.14

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rtibblescommented, Jun 19, 2020

I think I slightly misled @DXCanas here by failing to mention the linting role of flake8 during our conversation, so that’s my fault!

0reactions
rtibblescommented, Jun 22, 2020

Except that flake8 is also auto-formatting files, so it does have some overlap with black’s role.

fix up import ordering for you

Fairly sure that flake8 doesn’t modify import ordering, that’s this hook: https://github.com/learningequality/kolibri/blob/develop/.pre-commit-config.yaml#L16

I think the issue that @DXCanas is raising is if flake8 is also modifying files, then we should stop it doing that and let black handle that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using lint-staged, husky, and pre-commit hooks to fail fast and ...
json . In the multi-package repo we have a single linting config set up in the root package, with its rules applied across...
Read more >
Automate and Keep Your Code Consistent Using ESLint ...
Lint -Staged — is used to run linter to staged git files and prevent from committing the buggy code. Husky — is a...
Read more >
Diving into Husky and Lint-staged | Laurie on Tech
The commands you configure will run "pre-commit". As you're attempting to commit files to your project you'll see ESLint run in your terminal....
Read more >
Code consistency with ESLint and Husky - orangejellyfish
With Husky you can configure git hooks in your package.json file. For example, to define a pre-commit hook that runs our ESLint command...
Read more >
Pre-Commit Hooks for Pretter and ESLint in TypeScript Projects
Configuring Pre-commit Hooks for Prettier and Linting on a TypeScript Project. How to enforce code styles with Prettier and ESLint.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found