暂时不想解决 报错: 3:16 error Component should be written as a pure function react/prefer-stateless-function 4:3 error Useless constructor no-useless-constructor 1 import , { Component } from ''; 2 3 export default class MyComponent extends Component { 4 c…
Eslint规范 for 循环禁止使用无限循环(这个非默认推荐) // bad for (var i = 0; i < 10; i--) { } for (var i = 10; i >= 0; i++) { } // good for (var i = 0; i < 10; i++) { } 不允许和负0比较 // bad if (x === -0) { // doSomething()... } // good if (x === 0) { // doSomething()... }…
The default error handling in PHP is very simple.An error message with filename, line number and a message describing the error is sent to the browser. PHP has different error handling methods: Simple "die()" statements Custom errors and error t…
package blog4go import ( "fmt" "strings" ) // LevelType type defined for logging level // just use int type LevelType int const ( // level enum 日志枚举 // TRACE trace level TRACE LevelType = iota // DEBUG debug level DEBUG // INFO info l…