Skip to content

Commit

Permalink
[all]: Customize the ESLint rule "indent"
Browse files Browse the repository at this point in the history
... to enforce the style of "if...else" statements
  • Loading branch information
ThrRip committed Sep 3, 2023
1 parent 87c747d commit b99d6e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'plugin:nuxt/recommended'
],
rules: {
'indent': ['error', 2, { ignoredNodes: ['IfStatement > :matches([alternate])'] }],
'operator-linebreak': ['error', 'after'],
'quote-props': ['error', 'consistent']
}
Expand Down
4 changes: 2 additions & 2 deletions packages/home/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ const viewPlaylistSortingColumn = ref<null | PlaylistColumn>(null)
const viewPlaylistSortingOrder = ref<PlaylistSortingOrder>('ascending')
const viewPlaylistSortingOrderOptions = computed<Array<PlaylistSortingOrder>>(() => {
return viewPlaylistSortingColumn.value === 'payment_amount' ?
['descending', 'ascending'] :
['ascending', 'descending']
['descending', 'ascending'] :
['ascending', 'descending']
})
function viewPlaylistToggleSorting (column: PlaylistColumn) {
// Enable sorting or switch to another column
Expand Down

0 comments on commit b99d6e4

Please sign in to comment.