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(linter): Add support for ignorePatterns property within config file #7092

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

nrayburn-tech
Copy link
Collaborator

This could probably use some tests, but I'm not really sure what exactly should be tested.

Will leave a review with a few comments on things that might need a different approach.

Closes #7032.

Copy link

graphite-app bot commented Nov 2, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-editor Area - Editor and Language Server C-enhancement Category - New feature or request labels Nov 2, 2024
apps/oxlint/src/lint.rs Outdated Show resolved Hide resolved
crates/oxc_language_server/src/main.rs Outdated Show resolved Hide resolved
crates/oxc_language_server/src/main.rs Outdated Show resolved Hide resolved
Copy link

codspeed-hq bot commented Nov 2, 2024

CodSpeed Performance Report

Merging #7092 will not alter performance

Comparing nrayburn-tech:support-ignores-config (2717bf2) with main (ef62b9d)

Summary

✅ 30 untouched benchmarks

@nrayburn-tech nrayburn-tech force-pushed the support-ignores-config branch from c4e2d96 to a70b833 Compare November 3, 2024 22:56
@pumano
Copy link
Contributor

pumano commented Nov 4, 2024

@Boshen Could you please a look at this PR?

@Boshen Boshen self-assigned this Nov 4, 2024
@Boshen Boshen self-requested a review November 4, 2024 13:46
@Boshen Boshen requested a review from camchenry November 21, 2024 08:13
@Boshen Boshen assigned camchenry and unassigned Boshen Nov 21, 2024
Copy link
Contributor

@camchenry camchenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this approach is okay for now, we'll likely need to adjust it when we support nested configuration. The main thing we should add in this PR is some test cases in apps/oxlint/fixtures. I would recommend adding a JSON config file that includes some common ignores patterns, and then add a test in apps/oxlint/src/lint.rs that the number of files is correct.

@Sysix
Copy link
Collaborator

Sysix commented Nov 23, 2024

Do we want ignores? The name is for eslint v9, eslint v8 uses ignorePatterns:
https://eslint.org/docs/latest/use/configure/ignore-deprecated

@nrayburn-tech
Copy link
Collaborator Author

I’m hoping to get to the feedback here in the next few days.

I’m also fine with just waiting until nested configs are supported and then creating a solution based on that if that would be preferred.

@pumano
Copy link
Contributor

pumano commented Nov 24, 2024

Do we want ignores? The name is for eslint v9, eslint v8 uses ignorePatterns: https://eslint.org/docs/latest/use/configure/ignore-deprecated

I'm really waiting any of it. If team want to support v8 first, it's nice to have ignorePatterns or maybe both as alias? It will cover v9 too

@nrayburn-tech nrayburn-tech marked this pull request as draft November 25, 2024 07:53
@nrayburn-tech nrayburn-tech changed the title feat(linter): Add support for ignores property within config file feat(linter): Add support for ignorePatterns property within config file Nov 27, 2024
@nrayburn-tech nrayburn-tech marked this pull request as ready for review November 27, 2024 00:28
@Boshen Boshen requested a review from camchenry November 27, 2024 04:30
@Boshen Boshen merged commit 32f860d into oxc-project:main Nov 28, 2024
32 checks passed
@oxc-bot oxc-bot mentioned this pull request Dec 1, 2024
Boshen added a commit that referenced this pull request Dec 1, 2024
## [0.14.0] - 2024-12-01

### Features

- 32f860d linter: Add support for ignorePatterns property within config
file (#7092) (Nicholas Rayburn)
- 053bc08 linter: Implement typescript/no-unused-expressions (#7498)
(camc314)
- 60b28fc linter: Implement typescript/consistent-generic-constructors
(#7497) (camc314)
- bd0693b linter: Allow lint rules with the same name (#7496) (camc314)
- 2ac9f96 linter: Typescript/no-inferrable-types (#7438) (camc314)
- 8d89fdc linter: Add eslint/prefer-spread (#7112) (tbashiyy)

### Bug Fixes

- 123b5b7 linter: False positive in
`typescript/consistent-type-definitions` (#7560) (dalaoshu)
- cc078d6 linter: Add missing error message prefix to
`eslint/no-const-assign` (Boshen)
- 17c0dd8 linter: Fix `jsx_no_script_url` doc failed to build (Boshen)

### Performance

- 6cc7a48 linter: Use `OsString` for module cache hash (#7558) (Boshen)
- 6655345 linter: Use `FxDashMap` for module cache (#7522)
(overlookmotel)

### Documentation

- a6b0100 linter: Fix config example headings (#7562) (Boshen)

### Refactor

- 0f3f67a linter: Add capability of adding semantic data to module
record (#7561) (Boshen)
- 8392177 linter: Clean up the runtime after the module record change
(#7557) (Boshen)
- 823353a linter: Clean up APIs for `ModuleRecord` (#7556) (Boshen)
- f847d0f linter: Call `str::ends_with` with array not slice (#7526)
(overlookmotel)
- 2077ff9 linter: Remove `once_cell` (#7510) (Boshen)
- 169b8bf linter, syntax: Introduce type alias `FxDashMap` (#7520)
(overlookmotel)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
@nrayburn-tech nrayburn-tech deleted the support-ignores-config branch December 10, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area - CLI A-editor Area - Editor and Language Server A-linter Area - Linter C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

linter: add support "ignores" to config
5 participants