Skip to content

Commit c7e78e7

Browse files
authored
chore(deps): upgrade rslint to v0.4.2 (#1592)
1 parent e69da48 commit c7e78e7

19 files changed

Lines changed: 70 additions & 49 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"devDependencies": {
4545
"@biomejs/biome": "^2.4.10",
4646
"@changesets/cli": "^2.30.0",
47-
"@rslint/core": "^0.3.4",
47+
"@rslint/core": "^0.4.2",
4848
"@rstest/adapter-rslib": "^0.2.2",
4949
"@rstest/core": "^0.9.6",
5050
"@types/fs-extra": "^11.0.4",

pnpm-lock.yaml

Lines changed: 34 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rslint.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { defineConfig, ts } from '@rslint/core';
22

33
export default defineConfig([
4-
{ ignores: ['**/dist/**', '**/dist-types/**', '**/compiled/**'] },
54
ts.configs.recommended,
65
{
76
languageOptions: {
@@ -16,6 +15,12 @@ export default defineConfig([
1615
],
1716
'@typescript-eslint/ban-ts-comment': 'off',
1817
'@typescript-eslint/no-explicit-any': 'off',
18+
'prefer-const': [
19+
'error',
20+
{
21+
destructuring: 'all',
22+
},
23+
],
1924
},
2025
},
2126
]);

tests/e2e/module-federation/index.pw.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference types="node" />
21
import { expect, test } from '@playwright/test';
32

43
import { libText, remoteText } from './constant';

tests/integration/auto-external/module-import-warn/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* rslint-disable @typescript-eslint/no-require-imports */
12
export const foo = () => {
23
const React = require('react');
34
const e1 = require('e1');

tests/integration/external-helpers/index.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ test('should throw error when @swc/helpers is not be installed when externalHelp
1616
const fixturePath = join(__dirname, 'no-deps');
1717
try {
1818
await buildAndGetResults({ fixturePath });
19-
} catch {}
19+
} catch {
20+
// do nothing
21+
}
2022

2123
const logStrings = logs.map((log) => stripAnsi(log));
2224

tests/integration/externals/module-import-warn/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* rslint-disable @typescript-eslint/no-require-imports */
12
export const baz = async () => {
23
const foo = require('foo');
34
const bar = require('bar');

tests/integration/externals/node/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* rslint-disable @typescript-eslint/no-require-imports */
12
import assert from 'node:assert'; // handle node built-in modules with node: protocol
23
import fs from 'fs'; // handle bare node built-in modules
34
import React from 'react'; // works with the externals option in rslib.config.ts

tests/integration/parser-javascript/require/require-dynamic/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* rslint-disable @typescript-eslint/no-require-imports */
12
import { createRequire } from 'node:module';
23

34
// Using CommonJS require.

tests/integration/polyfill/rslib.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { type BabelTransformOptions, pluginBabel } from '@rsbuild/plugin-babel';
22
import { defineConfig } from '@rslib/core';
33
import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper';
4+
import { createRequire } from 'node:module';
5+
6+
const require = createRequire(import.meta.url);
47

58
const polyfillPlugin = (targets: BabelTransformOptions['targets']) =>
69
pluginBabel({

0 commit comments

Comments
 (0)