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.

Add ability to only lint files.

See original GitHub issue

Related to #988 in some way

Use-case: I just want to lint my specs with the watcher, but without the extra compile.

Actually, files are linted only if they are watched (or at least it seems so, let me know if I’m wrong).

Problem is that watching specs without putting them in a joinTo cause warns like: warn: test/foo.js compiled, but not written. Check your javascripts.joinTo config

So I’ve tried to set my specs in conventions.ignored, but in this case, they’re not linted anymore, and moreover, this cause an extra compile which is not needed.

I’m not sure of what could be a good API to say: “Watch this files, if they change, just run the linters but don’t do anything else”. Maybe something simple like conventions.linted

  • linted key: anymatch set. Default value: /(^test)[\\/]/. If test gives true, files will be linted but no compile step.

Maybe I miss something but having tested different setup, I couldn’t find a way to achieve this yet. Thoughts?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
paulmillrcommented, Feb 16, 2017

You can specify a separate joinTo entry for environment: production — so that the test.js wouldn’t be built in production.

0reactions
mikezx6rcommented, Feb 17, 2017

Thank you so much for both Brunch, and the quick response. Just delving deeper into configuration, and didn’t think of overrides.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable eslint only for edited files - javascript - Stack Overflow
If you want to lint staged and edited files, use: eslint $(git diff --name-only HEAD | grep -E '\. · Also you can...
Read more >
Ability to pass files for linting to next lint #26564 - GitHub
I just opened #26777 which will let you pass in any file patterns like you normally would with the ESLint CLI. Do I...
Read more >
Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
eslint/eslint - Gitter
Creates a CLIEngine instance (see Node.js API docs) · Runs git diff --name-only ^master and store the files in a list · Runs...
Read more >
Setting up ESLINT in your JavaScript Project with VS Code
Goto your package.json file, in the script segment in your file add the following. script:{ "lint":"eslint" }. NB: "lint" is just an ...
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