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

Exclude .DS_Store files from newline check #30

Closed klown closed 3 years ago

klown commented 3 years ago

Is your feature request related to a problem?

The lintspaces.newlines check will report problems for any local .DS_Store files. Even if manually removed, macOS will add a .DS_Store file if looking at the files/folders using the Finder. This is problematic in terms of having to clear out .DS_Store files with some regularity.

Describe the solution you'd like

The .DS_Store files should be ignored or excluded from the newlines check.

Describe alternative solutions you've considered

Adding .DS_Store to .eslintignore does not work since it does not override the rules in lintspaces.newlines. It's a good solution (if it worked) since the project I'm working on does not have a .eslintignore in the upstream repository. There are no worries about pushing a file that only applies to the local workspace.

Adding a lintspaces block to fluid-lintallrc.json listing .DS_Store is another possible solution that does work, e.g.,

    "lintspaces": {
        "newlines": {
            "excludes": [
                ".DS_Store"
            ]
        }
    }
the-t-in-rtf commented 3 years ago

I will address this in #31

the-t-in-rtf commented 3 years ago

Or maybe not? @klown, if you can try the dev release of 1.0.5-dev.20210201T163615Z.cff0a11.GH-3, I suspect that this one is better to handle using a .gitignore rule.

klown commented 3 years ago

Maybe not indeed @the-t-in-rtf.

I tried the dev release you suggested (remembering to remove my copy of .eslintignore) and npm run lint reported no .DS_Store errors.

the-t-in-rtf commented 3 years ago

Great, I'll close this one out and will ping the chat when the full release is out that adds .gitignore support.