Skip to content

Commit

Permalink
infra(unicorn): no-new-array (#2441)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Oct 9, 2023
1 parent 66b7a14 commit fe3fb5d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ module.exports = defineConfig({
'unicorn/no-hex-escape': 'off',
'unicorn/no-instanceof-array': 'off',
'unicorn/no-negated-condition': 'off',
'unicorn/no-new-array': 'off',
'unicorn/no-object-as-default-parameter': 'off',
'unicorn/no-process-exit': 'off',
'unicorn/no-useless-switch-case': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/internal/mersenne.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class MersenneTwister19937 {
private readonly MATRIX_A = 0x9908b0df; // constant vector a
private readonly UPPER_MASK = 0x80000000; // most significant w-r bits
private readonly LOWER_MASK = 0x7fffffff; // least significant r bits
private mt: number[] = new Array(this.N); // the array for the state vector
private mt: number[] = Array.from({ length: this.N }); // the array for the state vector
private mti = this.N + 1; // mti==N+1 means mt[N] is not initialized

/**
Expand Down

0 comments on commit fe3fb5d

Please sign in to comment.