有没有办法在颤动中禁用线条的 linting 规则?
我有一个特定的用例,我想禁用两行的 linting。我已经写了很多业务逻辑,所以我无法更改代码。
abstract class ReviewName {
static final NEW = 'NEW';
static final OLD = 'OLD';
}
Run Code Online (Sandbox Code Playgroud)
上面的代码会有 linting 错误: Name non-constant identifiers using lowerCamelCase.dart(non_constant_identifier_names)
有什么方法可以避免仅两行的 lint 错误?
如何在ReactJS中实现以下场景?
function foo1(){
console.log('foo1')
}
function foo2(){
console.log('foo2')
}
$('#button').click(foo1);
$('#button').click(foo2);
Run Code Online (Sandbox Code Playgroud)
我希望在单击按钮时调用这两个函数
考虑下面的jsx代码
Var Component = React.createClass({
foo1: function(){
console.log('foo1');
},
foo2: function(){
console.log('foo2');
},
render: function(){
return (
<button onClick={this.foo}> click me </button>
);
}
});
Run Code Online (Sandbox Code Playgroud)