fluid-project / fluid-lint-all

Consolidated linting logic free from any particular build technology
BSD 3-Clause "New" or "Revised" License
0 stars 5 forks source link

New version applies JSON indentation rules in spite of ignore configuration #69

Open greatislander opened 1 month ago

greatislander commented 1 month ago

Describe the bug

In this project, I have configured fluid-lint-all to ignore the JSON indentation lint for package.json and package-lock.json. However it appears that this is broken in versions of fluid-lint-all > 1.2.9.

To reproduce

Steps to reproduce the behavior:

  1. Review logs: https://github.com/fluid-project/eleventy-plugin-fluid/actions/runs/8969677691/job/24631537717?pr=267

Expected behavior

fluid-lint-all should respect ignore configuration for all linters.

Screenshots

Not applicable.

duhrer commented 1 month ago

@greatislander, I can reproduce the problem and will start looking into it in a branch shortly.

duhrer commented 1 month ago

I actually already had tests for this, but I excluded the badly indented content rather than changing the rule options. I will work to make it work the other way, which should be supported.

I will need to try a few things in your package to understand why your excludes don't seem to work.

duhrer commented 1 month ago

Turns out I also had a test for the configuration option.

duhrer commented 1 month ago

I thought at first this was a lintspaces issue, but it's actually the eslint.json check that throws the error. You can work around the issue by excluding the file in the eslint.json check as well.

The change in behaviour is likely related to the recent ESLint formatting purge (and our move to using a replacement plugin). I will check to see if there's a default rule that needs to be updated.

duhrer commented 1 month ago

Looks like the namespacing changes in eslint-config-fluid did not actually make it into the full release of 2.1.1, which you're using. In my testing I was working with a dev release which did include those changes. I'll probably have to fix it from that end.

duhrer commented 1 month ago

Turns out I just didn't release a new version of eslint-config-fluid with the changes. I mistakenly cut the dev release against the older 2.1.1 version as well, which is why I thought it was already out there. My apologies.

I have cut the full 2.1.2 release of eslint-config-fluid. If I update my copy of the main branch of your code to use eslint-config-fluid@2.1.2, I no longer see the linting error.