Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(basic): ignore all invalid files #181

Closed
wants to merge 1 commit into from

Conversation

zanminkian
Copy link
Contributor

@zanminkian zanminkian commented May 12, 2023

Description

Ignore all the files that should not be checked. For example: *.sh, *.go, *.jpg ...

Linked Issues

Additional context

@zanminkian zanminkian changed the title feat(basic): exclude all invalid files feat(basic): ignore all invalid files May 12, 2023
@zanminkian
Copy link
Contributor Author

zanminkian commented May 13, 2023

To me I think it would be best for ESLint to support ignoring unknown extensions

Hi @antfu, your thought 100% match what I'm thinking.

If Eslint support a pre-lint hook will be great (eg: {prelint: (file)=>file.endsWith('.ts')}). Or eslint ignores what they cannot lint (but they won't support it because they will treat the files with unknown extensions as js files).

I refactored this PR. Now, not only the ignorePatterns is listed statically, but also this eslint-config will ignore those we cannot lint.

Accepting this PR will not be worse. It make this eslint-config better. No matter Eslint support it or not.

@zanminkian
Copy link
Contributor Author

Please check the previous closed PR: #113.

@antfu
Copy link
Owner

antfu commented Sep 21, 2023

This PR conflicts with the #250 rewrite (sorry!). If you still want to push it, please create a new PR from the main branch. Thanks!

@antfu antfu closed this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants