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

Use Git Sparse checkout to make it easier to get the local rules #64

Merged
merged 15 commits into from
May 20, 2024

Conversation

vincentbriglia
Copy link
Contributor

Making these changes is a prerequisite to get the categories of each of the rules according to this request: #61 which makes sense to then create recommended configurations for the separate configs.

opening this PR is to get input on direction and if this is agreed on.

@vincentbriglia vincentbriglia requested a review from Dunqing as a code owner April 25, 2024 14:11
@vincentbriglia vincentbriglia marked this pull request as draft April 26, 2024 04:51
@vincentbriglia
Copy link
Contributor Author

@Boshen @Djiit feedback requested if you want to go down this way

@Dunqing
Copy link
Member

Dunqing commented Apr 29, 2024

Thank you for your working on this! Although this will become quite complex, doing so is meaningful, go ahead!

@vincentbriglia
Copy link
Contributor Author

vincentbriglia commented Apr 30, 2024

this will now print out this config:

{
  configs: {
    recommended: { plugins: [Array], rules: [Object] },
    'flat/recommended': { rules: [Object] },
    'flat/eslint': { rules: [Object] },
    'flat/import': { rules: [Object] },
    'flat/jest': { rules: [Object] },
    'flat/jsdoc': { rules: [Object] },
    'flat/jsxA11y': { rules: [Object] },
    'flat/nextjs': { rules: [Object] },
    'flat/react': { rules: [Object] },
    'flat/reactPerf': { rules: [Object] },
    'flat/treeShaking': { rules: [Object] },
    'flat/typescript': { rules: [Object] },
    'flat/unicorn': { rules: [Object] },
    'flat/pedantic': { rules: [Object] },
    'flat/nursery': { rules: [Object] },
    'flat/style': { rules: [Object] },
    'flat/correctness': { rules: [Object] },
    'flat/restriction': { rules: [Object] },
    'flat/suspicious': { rules: [Object] }
  }
}

I think we should avoid having a non-flat for all the other ones, and instead recommend to use the non-recommended configs together with setting up the plugin manually, otherwise this list will grow.

@Dunqing
Copy link
Member

Dunqing commented Apr 30, 2024

I think we should avoid having a non-flat for all the other ones, and instead recommend to use the non-recommended configs together with setting up the plugin manually, otherwise this list will grow.

Yes, I agree

@vincentbriglia vincentbriglia marked this pull request as ready for review May 1, 2024 06:10
@vincentbriglia
Copy link
Contributor Author

vincentbriglia commented May 1, 2024

vitest sometimes ails because of an upstream issue with the v8-to-istanbul library as they have an off-by-one issue

this line is the cause: https://github.com/istanbuljs/v8-to-istanbul/blob/master/lib/range.js#L30 so i would recommend that this coverage reporter be turned off..

other than that, this PR is now ready

@vincentbriglia
Copy link
Contributor Author

I've also fixed so that the codebase works using prettier, and formats the files in vscode when saving. if you don't like the prettier configuration, please recommend what you'd prefer (see prettier.config.js)

@Dunqing
Copy link
Member

Dunqing commented May 8, 2024

vitest sometimes ails because of an upstream issue with the v8-to-istanbul library as they have an off-by-one issue

this line is the cause: https://github.com/istanbuljs/v8-to-istanbul/blob/master/lib/range.js#L30 so i would recommend that this coverage reporter be turned off..

Yes, we can turn off coverage. we don't need it.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@Dunqing Dunqing requested a review from Djiit as a code owner May 20, 2024 08:54
@Dunqing
Copy link
Member

Dunqing commented May 20, 2024

Thanks for working on this! It's amazing for oxlint users.

@Dunqing Dunqing merged commit 9a17ad9 into oxc-project:main May 20, 2024
1 check passed
@Dunqing Dunqing linked an issue May 20, 2024 that may be closed by this pull request
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.

Allows rules for a specified category to be turned off
2 participants