File tree Expand file tree Collapse file tree
packages/eslint-config-airbnb/rules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -637,24 +637,24 @@ Other Style Guides
637637
638638 ` ` ` javascript
639639 // bad
640- function f (a ){
640+ function f1 (a ) {
641641 a = 1 ;
642642 }
643- function f (a ){
643+ function f2 (a ) {
644644 if (! a) { a = 1 ; }
645645 }
646- function f (obj ){
646+ function f3 (obj ) {
647647 obj .key = 1 ;
648648 };
649649
650650 // good
651- function f (a ){
652- const b = ( a || 1 ) ;
651+ function f4 (a ) {
652+ const b = a || 1 ;
653653 }
654- function f (a = 1 ){
654+ function f5 (a = 1 ) {
655655 }
656- function f (obj ){
657- const key = obj . hasOwnProperty ( ' key' ) ? obj .key ? 1 ;
656+ function f6 (obj ) {
657+ const key = Object . prototype . hasOwnProperty . call (obj, ' key' ) ? obj .key : 1 ;
658658 };
659659 ` ` `
660660
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ module.exports = {
7575 'no-octal-escape' : 2 ,
7676 // disallow reassignment of function parameters
7777 // disallow parameter object manipulation
78+ // rule: http://eslint.org/docs/rules/no-param-reassign.html
7879 'no-param-reassign' : [ 2 , { 'props' : true } ] ,
7980 // disallow use of process.env
8081 'no-process-env' : 0 ,
You can’t perform that action at this time.
0 commit comments