Skip to content

Commit 05bb2b3

Browse files
committed
Disable lint rule
1 parent 06f32ef commit 05bb2b3

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

docs/javascript_quirks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
1. The JavaScript standard ([ECMA-262][ecma-262-math-round]) defines the behavior of `Math.round` such that "ties" (e.g., `1.5` and `-1.5`) are rounded toward `+infinity`.
88

9+
<!-- eslint-disable stdlib/no-builtin-math -->
10+
911
```javascript
1012
var x = Math.round( 1.5 );
1113
// returns 2.0

docs/style-guides/javascript/README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,8 @@ Allows compiler to pre-allocate memory.
884884

885885
##### Bad Example
886886

887+
<!-- eslint-disable stdlib/no-builtin-math -->
888+
887889
```javascript
888890
// Do not...
889891
var arr = [];
@@ -895,6 +897,8 @@ for ( i = 0; i < 100; i++ ) {
895897

896898
##### Good Example
897899

900+
<!-- eslint-disable stdlib/no-builtin-math -->
901+
898902
```javascript
899903
// Do...
900904
var arr = new Array( 100 );
@@ -908,6 +912,8 @@ for ( i = 0; i < arr.length; i++ ) {
908912

909913
- Do **not** use the `new` operator if the `array` length is **very large** due to how compilers handle "fast" elements. Instead, to ensure "fast" elements,
910914

915+
<!-- eslint-disable stdlib/no-builtin-math -->
916+
911917
```javascript
912918
var arr;
913919
var i;
@@ -967,6 +973,8 @@ When copying a small `array`, using `Array#slice()` incurs a function overhead w
967973

968974
##### Small Array Example
969975

976+
<!-- eslint-disable stdlib/no-builtin-math -->
977+
970978
```javascript
971979
// Do...
972980
var arr = new Array( 10 );
@@ -983,6 +991,8 @@ for ( i = 0; i < arr.length; i++ ) {
983991

984992
##### Large Array Example
985993

994+
<!-- eslint-disable stdlib/no-builtin-math -->
995+
986996
```javascript
987997
// Do...
988998
var arr = new Array( 10000 );
@@ -1317,7 +1327,7 @@ for ( var i = 0; i < 10; i++ ) {
13171327

13181328
##### Bad Example
13191329

1320-
<!-- eslint-disable no-inner-declarations -->
1330+
<!-- eslint-disable no-inner-declarations, stdlib/no-builtin-math -->
13211331

13221332
```javascript
13231333
// Do not...
@@ -1332,6 +1342,8 @@ if ( i < 11 ) {
13321342

13331343
##### Good Example
13341344

1345+
<!-- eslint-disable stdlib/no-builtin-math -->
1346+
13351347
```javascript
13361348
// Do...
13371349
function bap() {
@@ -1395,7 +1407,7 @@ Reduces noise when first attempting to understand implementation flow, especiall
13951407

13961408
##### Bad Example
13971409

1398-
<!-- eslint-disable no-use-before-define -->
1410+
<!-- eslint-disable no-use-before-define, stdlib/no-builtin-math -->
13991411

14001412
```javascript
14011413
// Don't...
@@ -1424,6 +1436,8 @@ function getEquation( a, b, c ) {
14241436

14251437
##### Good Example
14261438

1439+
<!-- eslint-disable stdlib/no-builtin-math -->
1440+
14271441
```javascript
14281442
// Do...
14291443
function getEquation( a, b, c ) {
@@ -2682,6 +2696,8 @@ function factorial( x ) {
26822696

26832697
Use `// NOTE:` to annotate questions, comments, or anything which does not fit under `TODO`, `FIXME`, `HACK`, `WARNING`, `OPTIMIZE` which should be brought to a user's attention.
26842698
2699+
<!-- eslint-disable stdlib/no-builtin-math -->
2700+
26852701
```javascript
26862702
// NOTE: consider optimizing this for large arrays (len > 64K).
26872703
var arr = new Array( len );
@@ -3159,7 +3175,7 @@ Stream.prototype.window = function streamWindow( win ) {
31593175

31603176
##### Good Example
31613177

3162-
<!-- eslint-disable no-restricted-syntax -->
3178+
<!-- eslint-disable no-restricted-syntax, stdlib/no-builtin-math -->
31633179

31643180
```javascript
31653181
// Do...
@@ -3344,6 +3360,8 @@ var y = ( x >> 0 );
33443360

33453361
##### Good Example
33463362

3363+
<!-- eslint-disable stdlib/no-builtin-math -->
3364+
33473365
```javascript
33483366
// Do...
33493367
var y = Math.floor( x );

0 commit comments

Comments
 (0)