小编pro*_*php的帖子

如何设置ESLint规则来接受snake_case?

总是出错

  `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`
Run Code Online (Sandbox Code Playgroud)

我尝试从页面 https://eslint.org/docs/2.0.0/rules/camelcase 添加到 .eslintrc.js 变体中的规则,但对我没有任何作用..:(

  `rules: {
    camelcase: ['error', {properties: 'always'}],
  },
```
  rules: {
    camelcase: ['error', {allow: ['aa_bb']}],,
  },`
Run Code Online (Sandbox Code Playgroud)

node.js eslint

8
推荐指数
2
解决办法
1万
查看次数

标签 统计

eslint ×1

node.js ×1