diff --git a/e2e/cases/bundler-chain/src/pre.js b/e2e/cases/bundler-chain/src/pre.js
index 3a32b52f66..604fe9e0d4 100644
--- a/e2e/cases/bundler-chain/src/pre.js
+++ b/e2e/cases/bundler-chain/src/pre.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
const testEl = document.createElement('div');
testEl.id = 'test-el';
testEl.innerHTML = 'aaaaa';
diff --git a/e2e/cases/inline-chunk/src/another.js b/e2e/cases/inline-chunk/src/another.js
index a4ca44dc5b..98f013d3bb 100644
--- a/e2e/cases/inline-chunk/src/another.js
+++ b/e2e/cases/inline-chunk/src/another.js
@@ -4,6 +4,5 @@ import(
/* webpackChunkName: "foo" */
'./foo'
).then(({ foo }) => {
- // eslint-disable-next-line no-undef
window.answer = `another ${foo()}`;
});
diff --git a/e2e/cases/inline-chunk/src/index.js b/e2e/cases/inline-chunk/src/index.js
index 0db1626e0d..431d15d806 100644
--- a/e2e/cases/inline-chunk/src/index.js
+++ b/e2e/cases/inline-chunk/src/index.js
@@ -1,12 +1,10 @@
import './style.css';
-// eslint-disable-next-line no-undef
window.test = 'aaaa';
import(
/* webpackChunkName: "foo" */
'./foo'
).then(({ foo }) => {
- // eslint-disable-next-line no-undef
window.answer = foo();
});
diff --git a/e2e/cases/output/ascii/src/index.js b/e2e/cases/output/ascii/src/index.js
index 774f4f7889..c0f3eaf8f9 100644
--- a/e2e/cases/output/ascii/src/index.js
+++ b/e2e/cases/output/ascii/src/index.js
@@ -1,7 +1,5 @@
-// eslint-disable-next-line no-undef
window.a = '你好 world!';
-// eslint-disable-next-line no-undef
window.b = {
Д: 'A',
Å: 'A',
diff --git a/e2e/cases/output/externals/src/ex.js b/e2e/cases/output/externals/src/ex.js
index 94431efd74..555e1394e9 100644
--- a/e2e/cases/output/externals/src/ex.js
+++ b/e2e/cases/output/externals/src/ex.js
@@ -1,2 +1 @@
-// eslint-disable-next-line no-undef
window.aa = { a: 1 };
diff --git a/e2e/cases/preview/basic/src/index.js b/e2e/cases/preview/basic/src/index.js
index dc1bf868c3..05be4f5764 100644
--- a/e2e/cases/preview/basic/src/index.js
+++ b/e2e/cases/preview/basic/src/index.js
@@ -1,2 +1 @@
-// eslint-disable-next-line no-undef
document.getElementById('root').innerHTML = 'Hello Rsbuild!';
diff --git a/e2e/cases/react/remove-prop-types/src/App.jsx b/e2e/cases/react/remove-prop-types/src/App.jsx
index 99dd0a4573..f90a11afde 100644
--- a/e2e/cases/react/remove-prop-types/src/App.jsx
+++ b/e2e/cases/react/remove-prop-types/src/App.jsx
@@ -12,7 +12,6 @@ App.propTypes = {
testPropTypes: PropTypes.string,
};
-// eslint-disable-next-line no-undef
window.testAppPropTypes = App.propTypes;
export default App;
diff --git a/e2e/cases/source/basic/src/pre.js b/e2e/cases/source/basic/src/pre.js
index 3a32b52f66..604fe9e0d4 100644
--- a/e2e/cases/source/basic/src/pre.js
+++ b/e2e/cases/source/basic/src/pre.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
const testEl = document.createElement('div');
testEl.id = 'test-el';
testEl.innerHTML = 'aaaaa';
diff --git a/e2e/cases/svg/svg-default-export-component/src/App.jsx b/e2e/cases/svg/svg-default-export-component/src/App.jsx
index ed1d87a2aa..54347b4854 100644
--- a/e2e/cases/svg/svg-default-export-component/src/App.jsx
+++ b/e2e/cases/svg/svg-default-export-component/src/App.jsx
@@ -1,4 +1,3 @@
-// eslint-disable-next-line no-unused-vars
import Logo from './app.svg';
function App() {
diff --git a/e2e/cases/svg/svg-external-react/src/App.jsx b/e2e/cases/svg/svg-external-react/src/App.jsx
index 5c67bdcae9..eeffb25678 100644
--- a/e2e/cases/svg/svg-external-react/src/App.jsx
+++ b/e2e/cases/svg/svg-external-react/src/App.jsx
@@ -1,4 +1,3 @@
-// eslint-disable-next-line no-unused-vars
import svgImg, { ReactComponent as Logo } from './app.svg';
import './App.css';
diff --git a/e2e/cases/svg/svg-url/src/App.jsx b/e2e/cases/svg/svg-url/src/App.jsx
deleted file mode 100644
index 7c3f1af8a1..0000000000
--- a/e2e/cases/svg/svg-url/src/App.jsx
+++ /dev/null
@@ -1,17 +0,0 @@
-// eslint-disable-next-line no-unused-vars
-import Logo from './app.svg';
-import svgImg from './app.svg?url';
-import './App.css';
-
-function App() {
- return (
-
-
Hello Rsbuild!
-
-
-
-
- );
-}
-
-export default App;
diff --git a/e2e/cases/svg/svg/src/App.jsx b/e2e/cases/svg/svg/src/App.jsx
index 5c67bdcae9..eeffb25678 100644
--- a/e2e/cases/svg/svg/src/App.jsx
+++ b/e2e/cases/svg/svg/src/App.jsx
@@ -1,4 +1,3 @@
-// eslint-disable-next-line no-unused-vars
import svgImg, { ReactComponent as Logo } from './app.svg';
import './App.css';
diff --git a/e2e/cases/svg/svgr-query-url/src/App.jsx b/e2e/cases/svg/svgr-query-url/src/App.jsx
index f1f17831ff..41abd441da 100644
--- a/e2e/cases/svg/svgr-query-url/src/App.jsx
+++ b/e2e/cases/svg/svgr-query-url/src/App.jsx
@@ -1,4 +1,3 @@
-// eslint-disable-next-line no-unused-vars
import Logo from './app.svg';
import svgImg from './app.svg?url';
import './App.css';
diff --git a/e2e/cases/vue2/jsx-basic/src/index.js b/e2e/cases/vue2/jsx-basic/src/index.js
index efe255c761..6c28745664 100644
--- a/e2e/cases/vue2/jsx-basic/src/index.js
+++ b/e2e/cases/vue2/jsx-basic/src/index.js
@@ -1,7 +1,6 @@
import Vue from 'vue';
import A from './A';
-// eslint-disable-next-line no-new
new Vue({
el: '#root',
render: (h) => h(A),
diff --git a/e2e/cases/vue2/sfc-basic/src/index.js b/e2e/cases/vue2/sfc-basic/src/index.js
index e6a27e2321..c6101daee1 100644
--- a/e2e/cases/vue2/sfc-basic/src/index.js
+++ b/e2e/cases/vue2/sfc-basic/src/index.js
@@ -1,7 +1,6 @@
import Vue from 'vue';
import A from './A.vue';
-// eslint-disable-next-line no-new
new Vue({
el: '#root',
render: (h) => h(A),
diff --git a/e2e/cases/vue2/sfc-lang-jsx/src/index.js b/e2e/cases/vue2/sfc-lang-jsx/src/index.js
index 679387101d..0850ce8809 100644
--- a/e2e/cases/vue2/sfc-lang-jsx/src/index.js
+++ b/e2e/cases/vue2/sfc-lang-jsx/src/index.js
@@ -1,7 +1,6 @@
import Vue from 'vue';
import App from './App.vue';
-// eslint-disable-next-line no-new
new Vue({
el: '#root',
render: (h) => h(App),
diff --git a/e2e/cases/vue2/sfc-lang-ts/src/index.js b/e2e/cases/vue2/sfc-lang-ts/src/index.js
index 82cce7d115..e4572d75cc 100644
--- a/e2e/cases/vue2/sfc-lang-ts/src/index.js
+++ b/e2e/cases/vue2/sfc-lang-ts/src/index.js
@@ -1,7 +1,6 @@
import Vue from 'vue';
import App from './App.vue';
-// eslint-disable-next-line no-new
new Vue({
el: '#root',
render: (h) => h(App, { props: { foo: 'bar' } }),
diff --git a/e2e/cases/vue2/sfc-lang-tsx/src/index.js b/e2e/cases/vue2/sfc-lang-tsx/src/index.js
index 679387101d..0850ce8809 100644
--- a/e2e/cases/vue2/sfc-lang-tsx/src/index.js
+++ b/e2e/cases/vue2/sfc-lang-tsx/src/index.js
@@ -1,7 +1,6 @@
import Vue from 'vue';
import App from './App.vue';
-// eslint-disable-next-line no-new
new Vue({
el: '#root',
render: (h) => h(App),
diff --git a/e2e/cases/vue2/sfc-style/src/index.js b/e2e/cases/vue2/sfc-style/src/index.js
index ffb1fd6ae0..721f5f6c08 100644
--- a/e2e/cases/vue2/sfc-style/src/index.js
+++ b/e2e/cases/vue2/sfc-style/src/index.js
@@ -2,7 +2,6 @@ import Vue from 'vue';
import App from './App.vue';
import './a.less';
-// eslint-disable-next-line no-new
new Vue({
el: '#root',
render: (h) => h(App),
diff --git a/e2e/cases/wasm/wasm-basic/src/index.js b/e2e/cases/wasm/wasm-basic/src/index.js
index 34e6b301dd..bf19cbfa26 100644
--- a/e2e/cases/wasm/wasm-basic/src/index.js
+++ b/e2e/cases/wasm/wasm-basic/src/index.js
@@ -2,5 +2,4 @@ import { _Z4facti } from './factorial.wasm';
const factorial = _Z4facti;
-// eslint-disable-next-line no-undef
document.querySelector('#root').innerHTML = factorial(3);
diff --git a/e2e/cases/wasm/wasm-url/src/index.js b/e2e/cases/wasm/wasm-url/src/index.js
index 36f92658fa..56ed5d9fcc 100644
--- a/e2e/cases/wasm/wasm-url/src/index.js
+++ b/e2e/cases/wasm/wasm-url/src/index.js
@@ -1,5 +1,3 @@
-// eslint-disable-next-line node/no-unsupported-features/node-builtins, node/prefer-global/url
const wasmPath = new URL('./factorial.wasm', import.meta.url).pathname;
-// eslint-disable-next-line no-undef
document.querySelector('#root').innerHTML = wasmPath;
diff --git a/e2e/scripts/shared.ts b/e2e/scripts/shared.ts
index bab88d8a52..d59075cdde 100644
--- a/e2e/scripts/shared.ts
+++ b/e2e/scripts/shared.ts
@@ -29,7 +29,6 @@ export const gotoPage = async (
return page.goto(url);
};
-// eslint-disable-next-line @typescript-eslint/no-empty-function
const noop = async () => {};
export const createRsbuild = async (
diff --git a/packages/core/src/client/hmr/createSocketUrl.ts b/packages/core/src/client/hmr/createSocketUrl.ts
index f8d9dc8341..13df91fe38 100644
--- a/packages/core/src/client/hmr/createSocketUrl.ts
+++ b/packages/core/src/client/hmr/createSocketUrl.ts
@@ -37,7 +37,6 @@ export function formatURL({
pathname: string;
}) {
if (typeof URL !== 'undefined') {
- // eslint-disable-next-line node/prefer-global/url, node/no-unsupported-features/node-builtins
const url = new URL('http://localhost');
url.port = port;
url.hostname = hostname;
diff --git a/packages/core/src/client/hmr/index.ts b/packages/core/src/client/hmr/index.ts
index ff9557090b..b610553777 100644
--- a/packages/core/src/client/hmr/index.ts
+++ b/packages/core/src/client/hmr/index.ts
@@ -18,10 +18,8 @@ let hasCompileErrors = false;
function clearOutdatedErrors() {
// Clean up outdated compile errors, if any.
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
if (typeof console !== 'undefined' && typeof console.clear === 'function') {
if (hasCompileErrors) {
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
console.clear();
}
}
diff --git a/packages/plugin-babel/src/helper.ts b/packages/plugin-babel/src/helper.ts
index 00a9e98085..2f524872b3 100644
--- a/packages/plugin-babel/src/helper.ts
+++ b/packages/plugin-babel/src/helper.ts
@@ -128,7 +128,6 @@ const modifyPresetOptions = (
export const getBabelUtils = (
config: BabelTransformOptions,
): BabelConfigUtils => {
- // eslint-disable-next-line @typescript-eslint/no-empty-function
const noop = () => {};
return {
diff --git a/packages/shared/src/utils.ts b/packages/shared/src/utils.ts
index 2cbe0a8d42..c1cc29e222 100644
--- a/packages/shared/src/utils.ts
+++ b/packages/shared/src/utils.ts
@@ -78,7 +78,6 @@ export const awaitableGetter = (
): AwaitableGetter => {
const then: PromiseLike['then'] = (...args) =>
Promise.all(promises).then(...args);
- // eslint-disable-next-line no-thenable
return { then, promises };
};
diff --git a/scripts/check-changeset/src/index.ts b/scripts/check-changeset/src/index.ts
index 8061b835f3..47a7ba1ca5 100644
--- a/scripts/check-changeset/src/index.ts
+++ b/scripts/check-changeset/src/index.ts
@@ -64,6 +64,5 @@ async function run() {
run().catch((e) => {
console.error(e);
- // eslint-disable-next-line no-process-exit
process.exit(1);
});
diff --git a/scripts/update-packages/src/modern.ts b/scripts/update-packages/src/modern.ts
index 149fc154dd..2611443b3f 100644
--- a/scripts/update-packages/src/modern.ts
+++ b/scripts/update-packages/src/modern.ts
@@ -66,6 +66,5 @@ const updateModernVersion = async (
run().catch((e) => {
console.error(e);
- // eslint-disable-next-line no-process-exit
process.exit(1);
});
diff --git a/scripts/update-packages/src/rspack.ts b/scripts/update-packages/src/rspack.ts
index 91ac3fe0e6..a6ba79abc3 100644
--- a/scripts/update-packages/src/rspack.ts
+++ b/scripts/update-packages/src/rspack.ts
@@ -67,6 +67,5 @@ const updateRspackVersion = async (
run().catch((e) => {
console.error(e);
- // eslint-disable-next-line no-process-exit
process.exit(1);
});
diff --git a/scripts/update-packages/src/rspress.ts b/scripts/update-packages/src/rspress.ts
index 07480938a1..7ded80b7ec 100644
--- a/scripts/update-packages/src/rspress.ts
+++ b/scripts/update-packages/src/rspress.ts
@@ -38,6 +38,5 @@ async function run() {
run().catch((e) => {
console.error(e);
- // eslint-disable-next-line no-process-exit
process.exit(1);
});