Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ES Lint规则或插件,用于标识注释代码_Javascript_Reactjs_Eslint_Eslint Config Airbnb - Fatal编程技术网

Javascript ES Lint规则或插件,用于标识注释代码

Javascript ES Lint规则或插件,用于标识注释代码,javascript,reactjs,eslint,eslint-config-airbnb,Javascript,Reactjs,Eslint,Eslint Config Airbnb,我试图找到ES Lint的规则或插件来识别注释代码,以便删除不必要的代码并清理我的存储库 我想确定多行代码和单行代码: /* import CreateIncentive from './containers/create-incentive'; import AffiliateFilters from './containers/affiliate-filters'; */ //import NotificationsSettings from './containers/notificat

我试图找到ES Lint的规则或插件来识别注释代码,以便删除不必要的代码并清理我的存储库

我想确定多行代码和单行代码:

/* import CreateIncentive from './containers/create-incentive';
import AffiliateFilters from './containers/affiliate-filters'; */

//import NotificationsSettings from './containers/notifications-settings';
我尝试过以下规则,但它没有识别上述类型的代码:

"rules": {
        "no-warning-comments": [1, { "terms": ["todo", "fixme", "xxx"], "location": "anywhere" }],
        "spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }]
    }

也许您可以尝试
无内联注释
ESLint规则


也许您可以尝试使用
无内联注释
ESLint规则


>我找到了考虑声纳编码注释规则的方法。这只是质量配置文件的问题。我已经将默认配置文件设置为sonar way,但它只指定了100条规则

而另一个可用于JAVASCRIPT的配置文件是Sonar way Recommendated,它有148条规则,还包括识别注释代码的规则

因此,将默认配置文件切换到建议的声纳方式具有默认规则来识别多行或单行代码的注释代码


>我找到了考虑声纳编码注释规则的方法。这只是质量配置文件的问题。我已经将默认配置文件设置为sonar way,但它只指定了100条规则

而另一个可用于JAVASCRIPT的配置文件是Sonar way Recommendated,它有148条规则,还包括识别注释代码的规则

因此,将默认配置文件切换到建议的声纳方式具有默认规则来识别多行或单行代码的注释代码


它只会在禁止与代码在同一行的注释时给我警告。它只会在禁止与代码在同一行的注释时给我警告。