Javascript ES Lint规则或插件,用于标识注释代码
我试图找到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
/* 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条规则,还包括识别注释代码的规则 因此,将默认配置文件切换到建议的声纳方式具有默认规则来识别多行或单行代码的注释代码它只会在禁止与代码在同一行的注释时给我警告。它只会在禁止与代码在同一行的注释时给我警告。