Giter VIP home page Giter VIP logo

Comments (4)

foray1010 avatar foray1010 commented on May 20, 2024 1

thank you! I figure that it will be too much work to filter the files in lint-staged, as normally there are just a few markdown files per repo. I finally go for running on all markdown files in lint-staged by remark .

from unified-engine.

wooorm avatar wooorm commented on May 20, 2024

The engine has a silentlyIgnore option that allows this; unified-args doesn’t, and I kinda think that’s correct behavior.


The current behavior also resembles ESLint, say we had example.js:

console.log(1)

and .eslintrc.json:

{
  "extends": "eslint:recommended"
}

...now, if we’d run eslint example.js, we’d get:

  1:1  error  'console' is not defined  no-undef

✖ 1 problem (1 error, 0 warnings)

...and if we’d add an .eslintignore:

example.js

...we’d get:

  0:0  warning  File ignored because of a matching ignore pattern. Use "--no-ignore" to override

✖ 1 problem (0 errors, 1 warning)

Here’s what ESLint decided on the topic, and I feel similar, and you can solve this on lint-staged’s side as described in their docs.

from unified-engine.

muravjev avatar muravjev commented on May 20, 2024

thank you! I figure that it will be too much work to filter the files in lint-staged ...

Unfortunately, if there are many md files in repo it is a problem. And it should be solved twice: in .remarkignore and in .lintstagedrc.js, and then kept the solution in sync.

Great suggestion, @foray1010 .

P.S. I guess many people (as me) don't even suspect, that .remarkignore is not working in lint-staged :(

from unified-engine.

foray1010 avatar foray1010 commented on May 20, 2024

@muravjev Now remark-cli supports --silently-ignore flag, I have been able to run on modified markdown files only (See 1 and 2) for a while.

from unified-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.