最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

如何设置 ESLint 规则接受 snake

网站源码admin38浏览0评论

如何设置 ESLint 规则接受 snake

如何设置 ESLint 规则接受 snake

总是出错

  `16:3  error  Property name `type_array` must match one of the following formats: camelCase, UPPER_CASE, PascalCase    @typescript-eslint/naming-convention
  16:3  error  Identifier 'type_array' is not in camel case 
16:3  error  Property name `instument_view_id` must match one of the following formats: camelCase, UPPER_CASE, PascalCase`

我尝试页面中的规则 .0.0/rules/camelcase 添加到 .eslintrc.js 变体但对我没有任何作用..:(

  `rules: {
    camelcase: ['error', {properties: 'always'}],
  },
```
  rules: {
    camelcase: ['error', {allow: ['aa_bb']}],,
  },`
回答如下:

ESLint 不支持

snake_case
。如果你想使用
snake_case
,试试这个ESLint插件。

发布评论

评论列表(0)

  1. 暂无评论