Skip to content

Commit

Permalink
Enable id-denylist and id-length in base config
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Aug 19, 2021
1 parent 167d4f1 commit d75f63a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/base/rules-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,26 @@
"getter-return": "error",
"grouped-accessor-pairs": "error",
"guard-for-in": "error",
"id-denylist": [
"error",
"err",
"cb",
"callback",
"req",
"res"
],
"id-length": [
"error",
{
"min": 2,
"properties": "never",
"exceptions": [
"i",
"j",
"k"
]
}
],
"implicit-arrow-linebreak": "off",
"import/default": "error",
"import/export": "error",
Expand Down
12 changes: 12 additions & 0 deletions packages/base/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ module.exports = {
'func-name-matching': 'error',
'grouped-accessor-pairs': 'error',
'guard-for-in': 'error',
'id-denylist': [
'error', // this sets this rule to error, the rest are the forbidden IDs
'err',
'cb',
'callback',
'req',
'res',
],
'id-length': [
'error',
{ min: 2, properties: 'never', exceptionPatterns: ['[i-k]', '[x-z]'] },
],
'lines-between-class-members': 'error',
'max-statements-per-line': [
'error',
Expand Down

0 comments on commit d75f63a

Please sign in to comment.