diff --git a/package.json b/package.json index 2153820b1d30..0e06698ee34e 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "pnpm": "10.26.2" }, "devDependencies": { - "@rslint/core": "0.4.0", + "@rslint/core": "0.4.1", "@rstest/core": "^0.9.7", "@taplo/cli": "^0.7.0", "@types/node": "^20.19.39", diff --git a/packages/rspack/src/Watching.ts b/packages/rspack/src/Watching.ts index aae8346877a5..0b360aebf949 100644 --- a/packages/rspack/src/Watching.ts +++ b/packages/rspack/src/Watching.ts @@ -333,7 +333,7 @@ export class Watching { private _done(error: Error | null, compilation?: Compilation) { this.running = false; - let stats: undefined | Stats; + let stats: undefined | Stats = undefined; const handleError = (err: Error, cbs?: Callback[]) => { this.compiler.hooks.failed.call(err); diff --git a/packages/rspack/src/util/cleverMerge.ts b/packages/rspack/src/util/cleverMerge.ts index 14fc87705396..cc144e29faa8 100644 --- a/packages/rspack/src/util/cleverMerge.ts +++ b/packages/rspack/src/util/cleverMerge.ts @@ -275,7 +275,8 @@ const _cleverMerge = ( // If the first argument has a dynamic part we modify the dynamic part to merge the second argument let secondObj = second; if (firstDynamicInfo !== undefined) { - let { byProperty, fn } = firstDynamicInfo; + let { fn } = firstDynamicInfo; + const { byProperty } = firstDynamicInfo; const fnInfo = fn[DYNAMIC_INFO]; if (fnInfo) { secondObj = internalCaching diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 196e4a2cb8f0..f6a8359f294f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,8 +14,8 @@ importers: .: devDependencies: '@rslint/core': - specifier: 0.4.0 - version: 0.4.0(jiti@2.6.1) + specifier: 0.4.1 + version: 0.4.1(jiti@2.6.1) '@rstest/core': specifier: ^0.9.7 version: 0.9.7(@emnapi/core@1.9.2)(@emnapi/runtime@1.9.2)(@module-federation/runtime-tools@2.3.1)(core-js@3.49.0)(jsdom@26.1.0) @@ -2900,8 +2900,8 @@ packages: typescript: optional: true - '@rslint/core@0.4.0': - resolution: {integrity: sha512-RoFnhoeTRx7ZY/4pD07F2XYCVI7qx5ocYLvtyhiFwqFXZF8Y1dZakehKlJBe8MpWQ7IQE/TIGcthdonzUJjUhQ==} + '@rslint/core@0.4.1': + resolution: {integrity: sha512-EaW6A6uvk9vDM3fV926gFUApowhmX6VrmJeHu+ENtnzBBW/nnJGs29tCNd2GKF8g7mbICnD4x9OMYS/UkgF/Ow==} hasBin: true peerDependencies: jiti: ^2.0.0 @@ -2909,33 +2909,33 @@ packages: jiti: optional: true - '@rslint/darwin-arm64@0.4.0': - resolution: {integrity: sha512-A7rueI2eUNtpBR7SIHRUOJ9cEyHnf3TvzFhKsav0U+s6nMkFUIDc4XFVlynwqhmH++53yoIGkjrlYLbVTOt0Jg==} + '@rslint/darwin-arm64@0.4.1': + resolution: {integrity: sha512-iUsS/W/ihy9iXC1IqT0MfZfLVK2Iykm4BkbDiMVgDGwCKP5vjQBZfc5eV/e2EOGF60SZbIu2LeD6QSyjOYeU9g==} cpu: [arm64] os: [darwin] - '@rslint/darwin-x64@0.4.0': - resolution: {integrity: sha512-lrMm7F7OwFDTjG3ZH3ktfhXSAaAsg3z1ExXVme72X5Wrwf88bLo1yXDkCvUjBuWgfpdKGe2eTVaICToEhatE+g==} + '@rslint/darwin-x64@0.4.1': + resolution: {integrity: sha512-LKlBGS8eYjTDIdXNQSH7euYgbZxvaJR9LgZVP/+O33ky8hG0BDW1jbQ1oFm8DyQIARgIB01UOe9Lmdb88Z0LQA==} cpu: [x64] os: [darwin] - '@rslint/linux-arm64@0.4.0': - resolution: {integrity: sha512-+6XaVJ3KHjs3VUZ1/Q9OEKEhacxwQ7M1rhjal3mT2WxcqAaDU4zcXvCD1eA12YV5cP8NGaxNqKd0xaIxxQOmJg==} + '@rslint/linux-arm64@0.4.1': + resolution: {integrity: sha512-uJuy03rRGudGXgXLyvDmX5cLlXTO2It3NzA3G95rdXY52vyIRNrb1Z63yYw7+6MqycJnsnz8LKoDjgfWWqlDsQ==} cpu: [arm64] os: [linux] - '@rslint/linux-x64@0.4.0': - resolution: {integrity: sha512-nDv0KQ9dff8BCUk+UtPj2QsR53XkwVI5lexH52g1l8viT67WvlmaT44wLSi93DqxqiP1lcy5ZGk7Annt84RztA==} + '@rslint/linux-x64@0.4.1': + resolution: {integrity: sha512-0VGYCgj82kZ8xJu5ximVO3u1fiA2zAzGRbhwFgjoThyIGiKFaIZhqc7wfEt/z1/aHlWRdIG1c+fWqlomh3U66w==} cpu: [x64] os: [linux] - '@rslint/win32-arm64@0.4.0': - resolution: {integrity: sha512-o8V+QGQMrf/xoL1ZDGdkbj5Bb9+BeJC71E5TK6snAOyJcDFQeJUjQzkxjdSidIvhQ/HqNDoIvFgcBUu01jRoAw==} + '@rslint/win32-arm64@0.4.1': + resolution: {integrity: sha512-BztIuv8PAWOGKtTu4T+idy7DMebTlLzdYtND+qt4ba4sIxgz0jEQujmK+zn3rNmu6lLhdVECPZQ6/z6hpIF5yw==} cpu: [arm64] os: [win32] - '@rslint/win32-x64@0.4.0': - resolution: {integrity: sha512-bfSiSkcVsLmKLnwHtUsb8OXc+ZxKB43Ll3URIFxY/qBv5Ea0OtGqAdaORc9ME0o1blYugsx1UCLWorJoMmE7TQ==} + '@rslint/win32-x64@0.4.1': + resolution: {integrity: sha512-a3KKGyVxf7lL4VE2v5MogQ29yocrA/24lUsEok2ZKXcdZMf/XRZV5BgXTIGNymnGo9H69QhR+aC1iNHU1Sal8w==} cpu: [x64] os: [win32] @@ -9642,34 +9642,34 @@ snapshots: - '@typescript/native-preview' - core-js - '@rslint/core@0.4.0(jiti@2.6.1)': + '@rslint/core@0.4.1(jiti@2.6.1)': dependencies: picomatch: 4.0.4 optionalDependencies: - '@rslint/darwin-arm64': 0.4.0 - '@rslint/darwin-x64': 0.4.0 - '@rslint/linux-arm64': 0.4.0 - '@rslint/linux-x64': 0.4.0 - '@rslint/win32-arm64': 0.4.0 - '@rslint/win32-x64': 0.4.0 + '@rslint/darwin-arm64': 0.4.1 + '@rslint/darwin-x64': 0.4.1 + '@rslint/linux-arm64': 0.4.1 + '@rslint/linux-x64': 0.4.1 + '@rslint/win32-arm64': 0.4.1 + '@rslint/win32-x64': 0.4.1 jiti: 2.6.1 - '@rslint/darwin-arm64@0.4.0': + '@rslint/darwin-arm64@0.4.1': optional: true - '@rslint/darwin-x64@0.4.0': + '@rslint/darwin-x64@0.4.1': optional: true - '@rslint/linux-arm64@0.4.0': + '@rslint/linux-arm64@0.4.1': optional: true - '@rslint/linux-x64@0.4.0': + '@rslint/linux-x64@0.4.1': optional: true - '@rslint/win32-arm64@0.4.0': + '@rslint/win32-arm64@0.4.1': optional: true - '@rslint/win32-x64@0.4.0': + '@rslint/win32-x64@0.4.1': optional: true '@rspack/binding-darwin-arm64@2.0.0-rc.1': diff --git a/rslint.config.ts b/rslint.config.ts index d14e360d3cee..eee44b416414 100644 --- a/rslint.config.ts +++ b/rslint.config.ts @@ -32,7 +32,6 @@ export default defineConfig([ '@typescript-eslint/triple-slash-reference': 'off', 'no-constant-binary-expression': 'off', 'no-empty': 'off', - 'prefer-const': 'off', }, }, {