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

chore(infra/biome): enable more rules #7387

Merged

Conversation

shulaoda
Copy link
Collaborator

@shulaoda shulaoda commented Jul 31, 2024

Summary

Related to #7182

  • remove "noMultipleSpacesInRegularExpressionLiterals": "off",
  • remove "noStaticOnlyClass": "off",
  • remove "noThisInStatic": "off",
  • remove "noUselessConstructor": "off",
  • remove "noBannedTypes": "off",
  • remove "useOptionalChain": "off",
  • remove "noUselessEmptyExport": "off",
  • remove "noExtraBooleanCast": "off",
  • remove "noConstructorReturn": "off",
  • remove "noSwitchDeclarations": "off",
  • remove "noInvalidUseBeforeDeclaration": "off",
  • remove "noInnerDeclarations": "off",
  • remove "noVoidTypeReturn": "off",
  • remove "noCommaOperator": "off",
  • remove "useExponentiationOperator": "off",
  • remove "useShorthandFunctionType": "off",
  • remove "noArguments": "off",
  • remove "noInferrableTypes": "off",
  • remove "noParameterAssign": "off",
  • remove "useTemplate": "off",
  • remove "useSingleVarDeclarator": "off" -
  • remove "noAccumulatingSpread": "off" -
  • remove "noEmptyInterface": "off",
  • remove "noGlobalAssign": "off",
  • remove "noGlobalIsNan": "off",
  • remove "noFallthroughSwitchClause": "off",
  • remove "noConfusingVoidType": "off",
  • remove "noPrototypeBuiltins": "off",
  • remove "noImplicitAnyLet": "off",
  • remove "noAssignInExpressions": "off",
  • remove "noArrayIndexKey": "off",
  • remove "noRedundantUseStrict": "off",
  • remove "noControlCharactersInRegex": "off", -

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Jul 31, 2024

Deploy Preview for rspack ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 06376fd
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/66ab2bdafdbf100008d09db4
😎 Deploy Preview https://deploy-preview-7387--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shulaoda shulaoda marked this pull request as draft July 31, 2024 09:01
@shulaoda shulaoda changed the title chore(infra/biome): enable noGlobalAssign chore(infra/biome): enable more rules Jul 31, 2024
@shulaoda shulaoda force-pushed the chore/biome-remove-noGlobalAssign branch from b0b894f to 64f18cd Compare July 31, 2024 10:47
@SoonIter SoonIter self-requested a review July 31, 2024 11:18
@SoonIter SoonIter self-assigned this Jul 31, 2024
@shulaoda shulaoda force-pushed the chore/biome-remove-noGlobalAssign branch from 40875f0 to f6f5b7a Compare July 31, 2024 13:37
@shulaoda shulaoda marked this pull request as ready for review July 31, 2024 15:53
@shulaoda shulaoda requested a review from jerrykingxyz as a code owner July 31, 2024 15:53
@shulaoda
Copy link
Collaborator Author

Fixed some bugs related to #7103

The arguments will be parameters to the compiler, but in reality they should be parameters to the readFile.

async compiler(context: ITestContext) {
await super.compiler(context);
const instance = this.getCompiler(context).getCompiler()! as any;
const compilers: Compiler[] = instance.compilers
? instance.compilers
: [instance];
for (const compiler of compilers) {
const ifs = compiler.inputFileSystem;
compiler.inputFileSystem = Object.create(ifs);
compiler.inputFileSystem.readFile = () => {
const args = Array.prototype.slice.call(arguments);

@shulaoda shulaoda force-pushed the chore/biome-remove-noGlobalAssign branch from cd9442b to 2ae528b Compare July 31, 2024 17:30
@shulaoda
Copy link
Collaborator Author

The remaining rules are a bit complicated, I will address them in other PRs.

@shulaoda shulaoda force-pushed the chore/biome-remove-noGlobalAssign branch 4 times, most recently from 657730c to 7ad7f44 Compare August 1, 2024 03:43
@SoonIter SoonIter force-pushed the chore/biome-remove-noGlobalAssign branch from 539c46c to 578d46c Compare August 1, 2024 06:31
Copy link
Member

@SoonIter SoonIter left a comment

Choose a reason for hiding this comment

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

LGTM❤️

@SoonIter SoonIter enabled auto-merge (squash) August 1, 2024 07:01
@SoonIter SoonIter merged commit 6e86a14 into web-infra-dev:main Aug 1, 2024
28 checks passed
@shulaoda shulaoda deleted the chore/biome-remove-noGlobalAssign branch August 1, 2024 07:11
@chenjiahan chenjiahan mentioned this pull request Aug 2, 2024
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.

2 participants