jsx-filename-extension': [ 'error', { extensions: ['.js', '.jsx', '.ts', '.tsx'] } ], 'class-methods-use-this
vue-property-decorator'; @Component({}) export default class Debug extends Vue { // eslint-disable-next-line class-methods-use-this
Tencent/Hippy/blob/master/packages/hippy-react-web/src/components/navigator.tsx /\* eslint-disable class-methods-use-this
对于数据相关操作函数比如reduce, map, filter等,callback必须有return block-scoped-var error 把var关键字看成块级作用域,防止变量提升导致的bug class-methods-use-this
2 : 0, indent: 0, 'linebreak-style': 0, 'no-trailing-spaces': 0, 'class-methods-use-this
, "never"], // 关闭要求 require() 出现在顶层模块作用域中 "global-require": 0, // 关闭关闭类方法中必须使用this "class-methods-use-this
箭头函数参数括号,可选 always:(默认)在所有情况下都需要参数;as-needed:当只有一个参数时允许省略参数 'no-undef': 0, // 关闭显式声明全局变量的要求 'class-methods-use-this
$ms = $d.getMilliseconds(); }; // eslint-disable-next-line class-methods-use-this clone() {
强制使用一致的缩进 indent: ['error', 2], // 强制使用骆驼拼写法命名约定 camelcase: 0, // 强制类方法使用 this 'class-methods-use-this
在类的非静态方法中,必须存在对 this 的引用 * @category Best Practices * @reason 太严格了 */ 'class-methods-use-this
领取专属 10元无门槛券
手把手带您无忧上云