Skip to content

Commit

Permalink
chore: remove unused eslint comments (#1809)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Mar 13, 2024
1 parent 53bf2a1 commit dbbe6e3
Show file tree
Hide file tree
Showing 30 changed files with 0 additions and 50 deletions.
1 change: 0 additions & 1 deletion e2e/cases/bundler-chain/src/pre.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
const testEl = document.createElement('div');
testEl.id = 'test-el';
testEl.innerHTML = 'aaaaa';
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/inline-chunk/src/another.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ import(
/* webpackChunkName: "foo" */
'./foo'
).then(({ foo }) => {
// eslint-disable-next-line no-undef
window.answer = `another ${foo()}`;
});
2 changes: 0 additions & 2 deletions e2e/cases/inline-chunk/src/index.js
Original file line number Diff line number Diff line change
@@ -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();
});
2 changes: 0 additions & 2 deletions e2e/cases/output/ascii/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// eslint-disable-next-line no-undef
window.a = '你好 world!';

// eslint-disable-next-line no-undef
window.b = {
Д: 'A',
Å: 'A',
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/output/externals/src/ex.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line no-undef
window.aa = { a: 1 };
1 change: 0 additions & 1 deletion e2e/cases/preview/basic/src/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line no-undef
document.getElementById('root').innerHTML = 'Hello Rsbuild!';
1 change: 0 additions & 1 deletion e2e/cases/react/remove-prop-types/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ App.propTypes = {
testPropTypes: PropTypes.string,
};

// eslint-disable-next-line no-undef
window.testAppPropTypes = App.propTypes;

export default App;
1 change: 0 additions & 1 deletion e2e/cases/source/basic/src/pre.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
const testEl = document.createElement('div');
testEl.id = 'test-el';
testEl.innerHTML = 'aaaaa';
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/svg/svg-default-export-component/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
import Logo from './app.svg';

function App() {
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/svg/svg-external-react/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
import svgImg, { ReactComponent as Logo } from './app.svg';
import './App.css';

Expand Down
17 changes: 0 additions & 17 deletions e2e/cases/svg/svg-url/src/App.jsx

This file was deleted.

1 change: 0 additions & 1 deletion e2e/cases/svg/svg/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
import svgImg, { ReactComponent as Logo } from './app.svg';
import './App.css';

Expand Down
1 change: 0 additions & 1 deletion e2e/cases/svg/svgr-query-url/src/App.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/vue2/jsx-basic/src/index.js
Original file line number Diff line number Diff line change
@@ -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),
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/vue2/sfc-basic/src/index.js
Original file line number Diff line number Diff line change
@@ -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),
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/vue2/sfc-lang-jsx/src/index.js
Original file line number Diff line number Diff line change
@@ -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),
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/vue2/sfc-lang-ts/src/index.js
Original file line number Diff line number Diff line change
@@ -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' } }),
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/vue2/sfc-lang-tsx/src/index.js
Original file line number Diff line number Diff line change
@@ -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),
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/vue2/sfc-style/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 0 additions & 1 deletion e2e/cases/wasm/wasm-basic/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ import { _Z4facti } from './factorial.wasm';

const factorial = _Z4facti;

// eslint-disable-next-line no-undef
document.querySelector('#root').innerHTML = factorial(3);
2 changes: 0 additions & 2 deletions e2e/cases/wasm/wasm-url/src/index.js
Original file line number Diff line number Diff line change
@@ -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;
1 change: 0 additions & 1 deletion e2e/scripts/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/client/hmr/createSocketUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/client/hmr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-babel/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ const modifyPresetOptions = <T>(
export const getBabelUtils = (
config: BabelTransformOptions,
): BabelConfigUtils => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
const noop = () => {};

return {
Expand Down
1 change: 0 additions & 1 deletion packages/shared/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export const awaitableGetter = <T>(
): AwaitableGetter<T> => {
const then: PromiseLike<T[]>['then'] = (...args) =>
Promise.all(promises).then(...args);
// eslint-disable-next-line no-thenable
return { then, promises };
};

Expand Down
1 change: 0 additions & 1 deletion scripts/check-changeset/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,5 @@ async function run() {

run().catch((e) => {
console.error(e);
// eslint-disable-next-line no-process-exit
process.exit(1);
});
1 change: 0 additions & 1 deletion scripts/update-packages/src/modern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,5 @@ const updateModernVersion = async (

run().catch((e) => {
console.error(e);
// eslint-disable-next-line no-process-exit
process.exit(1);
});
1 change: 0 additions & 1 deletion scripts/update-packages/src/rspack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,5 @@ const updateRspackVersion = async (

run().catch((e) => {
console.error(e);
// eslint-disable-next-line no-process-exit
process.exit(1);
});
1 change: 0 additions & 1 deletion scripts/update-packages/src/rspress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ async function run() {

run().catch((e) => {
console.error(e);
// eslint-disable-next-line no-process-exit
process.exit(1);
});

0 comments on commit dbbe6e3

Please sign in to comment.