Skip to content

Commit

Permalink
ci: eslint name 校验规则更宽松
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Jan 8, 2023
1 parent 39fa3f9 commit c7341a7
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,42 +62,38 @@ module.exports = {
{
selector: 'default',
format: ['camelCase'],
leadingUnderscore: 'allow',
leadingUnderscore: 'allowSingleOrDouble',
filter: {
// you can expand this regex to add more allowed names
regex: '^((__v_.*)|([0-9]+)|(__.*))$',
regex: '^((__v_.*)|([0-9]+))$',
match: false,
},
},
{
selector: 'variable',
modifiers: ['const'],
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allow',
filter: {
// you can expand this regex to add more allowed names
regex: '^__.*$',
match: false,
},
leadingUnderscore: 'allowSingleOrDouble',
},
{
selector: ['memberLike'],
format: ['camelCase', 'PascalCase'],
leadingUnderscore: 'allow',
leadingUnderscore: 'allowSingleOrDouble',
filter: {
// you can expand this regex to add more allowed names
regex: '^((__v_.*)|[0-9]+)$',
regex: '^((__v_.*)|([0-9]+))$',
match: false,
},
},
{
selector: 'enumMember',
format: ['UPPER_CASE'],
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allowSingleOrDouble',
},
{
selector: 'typeLike',
selector: ['typeLike', 'enum'],
format: ['PascalCase'],
leadingUnderscore: 'allow',
leadingUnderscore: 'allowSingleOrDouble',
},
{
selector: ['default'],
Expand Down

0 comments on commit c7341a7

Please sign in to comment.