mirror of
				https://github.com/reduxjs/redux-devtools.git
				synced 2025-11-04 01:47:25 +03:00 
			
		
		
		
	Remove console logs in production
This commit is contained in:
		
							parent
							
								
									bc3234253c
								
							
						
					
					
						commit
						6e117be436
					
				| 
						 | 
				
			
			@ -24,7 +24,7 @@
 | 
			
		|||
    "react/jsx-quotes": 0,
 | 
			
		||||
    "eol-last": 0,
 | 
			
		||||
    "no-unused-vars": 0,
 | 
			
		||||
    "no-console": 0,
 | 
			
		||||
    "no-console": 1,
 | 
			
		||||
    "comma-dangle": 0
 | 
			
		||||
  },
 | 
			
		||||
  "plugins": [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,7 @@ export default class StackTraceTab extends Component {
 | 
			
		|||
    };
 | 
			
		||||
  }
 | 
			
		||||
  componentDidMount() {
 | 
			
		||||
        //console.log("StackTraceTab mounted");
 | 
			
		||||
    // console.log("StackTraceTab mounted");
 | 
			
		||||
    this.checkForStackTrace();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -39,7 +39,9 @@ export default class StackTraceTab extends Component {
 | 
			
		|||
 | 
			
		||||
      getStackFrames(deserializedError)
 | 
			
		||||
        .then(stackFrames => {
 | 
			
		||||
                  console.log('Stack frames: ', stackFrames);
 | 
			
		||||
          /* eslint-disable no-console */
 | 
			
		||||
          if (process.env.NODE_ENV === 'development') console.log('Stack frames: ', stackFrames);
 | 
			
		||||
          /* eslint-enable no-console */
 | 
			
		||||
          this.setState({stackFrames, currentError: deserializedError});
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +51,7 @@ export default class StackTraceTab extends Component {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  onStackLocationClicked = (fileLocation = {}) => {
 | 
			
		||||
        //console.log("Stack location args: ", ...args);
 | 
			
		||||
    // console.log("Stack location args: ", ...args);
 | 
			
		||||
 | 
			
		||||
    const {fileName, lineNumber} = fileLocation;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -62,7 +64,7 @@ export default class StackTraceTab extends Component {
 | 
			
		|||
        return matches;
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
            //console.log("Matching stack frame: ", matchingStackFrame);
 | 
			
		||||
      // console.log("Matching stack frame: ", matchingStackFrame);
 | 
			
		||||
 | 
			
		||||
      if(matchingStackFrame) {
 | 
			
		||||
        /*
 | 
			
		||||
| 
						 | 
				
			
			@ -80,7 +82,7 @@ export default class StackTraceTab extends Component {
 | 
			
		|||
            const {fileName: finalFileName, lineNumber: finalLineNumber} = matchingStackFrame;
 | 
			
		||||
            const adjustedLineNumber = Math.max(finalLineNumber - 1, 0);
 | 
			
		||||
            chrome.devtools.panels.openResource(finalFileName, adjustedLineNumber, (result) => {
 | 
			
		||||
                            //console.log("openResource result: ", result);
 | 
			
		||||
            // console.log("openResource result: ", result);
 | 
			
		||||
            });
 | 
			
		||||
          }
 | 
			
		||||
        });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,7 +86,7 @@ function generateAnsiHTML(txt: string): string {
 | 
			
		|||
        result += '<span style="color: #' + color + ';">' + part + '</span>';
 | 
			
		||||
      } else {
 | 
			
		||||
        if (fg != null) {
 | 
			
		||||
          console.log('Missing color mapping: ', fg);
 | 
			
		||||
          console.log('Missing color mapping:', fg); // eslint-disable-line no-console
 | 
			
		||||
        }
 | 
			
		||||
        result += '<span>' + part + '</span>';
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user