Skip to content

Commit

Permalink
feat(eslint-config): avoid assigning anonymous function to object key
Browse files Browse the repository at this point in the history
  • Loading branch information
foray1010 committed Mar 11, 2021
1 parent 8d9e663 commit 8747450
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/eslint-config/presets/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ module.exports = {
'simple-import-sort/exports': 'error',
// auto sort import statements
'simple-import-sort/imports': 'error',
// avoid assigning anonymous function to object key which is harder to trace when debug
'object-shorthand': [
'error',
'always',
{
avoidExplicitReturnArrows: true,
},
],
// commonjs must use strict mode
strict: ['error', 'global'],
},
Expand Down

0 comments on commit 8747450

Please sign in to comment.