Skip to content

Commit

Permalink
style: add object-shorthand rule, apply fixes
Browse files Browse the repository at this point in the history
This rule ensures
```js
const obj = {
  foo: 'bar',
  baz,
}
```

Instead of allowing
```js
const obj = {
  foo: 'bar',
  baz: baz,
}
```
  • Loading branch information
devonzara committed Apr 1, 2023
1 parent ed5bb9a commit 974be28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
// Brace/parenthesis spacing rules
'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'always', { objectsInObjects: false }],
'object-shorthand': ['error', 'always', { avoidQuotes: true }],
'space-in-parens': ['error', 'never'],

// Newline padding rules
Expand Down
2 changes: 1 addition & 1 deletion server/lib/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Database {
username: env.DB_USER,
password: env.DB_PASSWORD,
host: env.DB_HOST,
database: database,
database,
...commonOptions,
});
}
Expand Down

0 comments on commit 974be28

Please sign in to comment.