Skip to content

Commit 4162784

Browse files
chore(deps): bump the npm-dependencies group with 3 updates (#11)
* chore(deps): bump the npm-dependencies group with 3 updates Bumps the npm-dependencies group with 3 updates: [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime), [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint). Updates `@babel/runtime` from 7.29.7 to 8.0.0 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.0/packages/babel-runtime) Updates `@eslint/js` from 9.39.4 to 10.0.1 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/commits/v10.0.1/packages/js) Updates `eslint` from 9.39.4 to 10.6.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v9.39.4...v10.6.0) --- updated-dependencies: - dependency-name: "@babel/runtime" dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: npm-dependencies - dependency-name: "@eslint/js" dependency-version: 10.0.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm-dependencies - dependency-name: eslint dependency-version: 10.6.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * fix: support eslint 10 dependency update * fix: resolve eslint 10 lint errors * test: cover scientific notation expansion * fix: keep scientific expansion coverage stable --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: afc163 <afc163@gmail.com>
1 parent 69db0d3 commit 4162784

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

eslint.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import js from '@eslint/js';
2+
import { fixupConfigRules } from '@eslint/compat';
23
import { defineConfig } from 'eslint/config';
34
import { dirname } from 'node:path';
45
import { fileURLToPath } from 'node:url';
@@ -40,8 +41,8 @@ export default defineConfig([
4041
files: ['**/*.{js,jsx,ts,tsx}'],
4142
extends: [
4243
js.configs.recommended,
43-
react.configs.flat.recommended,
44-
react.configs.flat['jsx-runtime'],
44+
...fixupConfigRules(react.configs.flat.recommended),
45+
...fixupConfigRules(react.configs.flat['jsx-runtime']),
4546
prettier,
4647
],
4748
plugins: {

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@
3939
"tsc": "npm run lint:tsc"
4040
},
4141
"dependencies": {
42-
"@babel/runtime": "^7.29.7"
42+
"@babel/runtime": "^8.0.0"
4343
},
4444
"devDependencies": {
45-
"@eslint/js": "^9.39.4",
45+
"@eslint/js": "^10.0.1",
46+
"@eslint/compat": "^2.1.0",
4647
"@rc-component/father-plugin": "^2.2.0",
4748
"@rc-component/np": "^1.0.4",
4849
"@testing-library/jest-dom": "^6.9.1",
@@ -52,7 +53,7 @@
5253
"@types/react": "^19.2.17",
5354
"@types/react-dom": "^19.2.3",
5455
"dumi": "^2.4.38",
55-
"eslint": "^9.39.4",
56+
"eslint": "^10.6.0",
5657
"eslint-config-prettier": "^10.1.8",
5758
"eslint-plugin-jest": "^29.15.4",
5859
"eslint-plugin-react": "^7.37.5",

src/numberUtil.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ function expandScientificNotation(parsed: ParsedScientificNotation) {
109109
const initialDecimalIndex = integerDigits || -leadingDecimalZeros;
110110
const decimalIndex = initialDecimalIndex + exponent;
111111

112+
// eslint-disable-next-line no-useless-assignment
112113
let expanded = '';
113114

114115
if (decimalIndex <= 0) {

tests/util.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ describe('InputNumber.Util', () => {
152152
expect(num2str(0e5)).toEqual('0');
153153
expect(num2str(1.23e-19)).toEqual(`0.${'0'.repeat(18)}123`);
154154
expect(num2str(-1.23e-20)).toEqual(`-0.${'0'.repeat(19)}123`);
155+
expect(num2str(1.23e1)).toEqual('12.3');
156+
expect(num2str(1.23e5)).toEqual('123000');
155157
});
156158
});
157159

0 commit comments

Comments
 (0)