chore: add more stylistic rules & run formatter
This commit is contained in:
parent
bdec497bc1
commit
4520129f9f
4 changed files with 28 additions and 8 deletions
|
|
@ -26,14 +26,28 @@ export default defineConfig([
|
|||
},
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs}'],
|
||||
plugins: { js, '@stylistic': stylistic},
|
||||
plugins: {
|
||||
js, '@stylistic': stylistic
|
||||
},
|
||||
extends: ['js/recommended'],
|
||||
languageOptions: { globals: globals.browser },
|
||||
languageOptions: {
|
||||
globals: globals.browser
|
||||
},
|
||||
rules: {
|
||||
'@stylistic/indent': ['error', 2],
|
||||
'@stylistic/quotes': ['error', 'single'],
|
||||
'@stylistic/semi': ['error', 'never'],
|
||||
'@stylistic/comma-dangle': ['error', 'never']
|
||||
'@stylistic/comma-dangle': ['error', 'never'] ,
|
||||
'@stylistic/block-spacing': 'error',
|
||||
'@stylistic/array-bracket-spacing': ['error', 'never'],
|
||||
'@stylistic/object-curly-spacing': ['error', 'always'],
|
||||
'@stylistic/key-spacing': ['error', {
|
||||
'beforeColon': false
|
||||
}],
|
||||
'@stylistic/array-bracket-newline': ['error', 'consistent'],
|
||||
'@stylistic/object-curly-newline': ['error', {
|
||||
'consistent': true
|
||||
}]
|
||||
}
|
||||
},
|
||||
globalIgnores(['dist'])
|
||||
|
|
|
|||
|
|
@ -175,7 +175,11 @@ export const Minesweeper = function(appId) {
|
|||
|
||||
const okButton = document.createElement('button')
|
||||
okButton.innerText = 'Okay'
|
||||
const setting = {rows: rowsInput.value, cols: colsInput.value, bombs: bombsInput.value}
|
||||
const setting = {
|
||||
rows: rowsInput.value,
|
||||
cols: colsInput.value,
|
||||
bombs: bombsInput.value
|
||||
}
|
||||
okButton.onmousedown = () => updateSetting('custom-action', setting)
|
||||
|
||||
inputElements.forEach(input => {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import { LoadingService } from '../loading/loading'
|
|||
import { LoggerService } from '../logger/logger'
|
||||
|
||||
import { initializeApp } from 'firebase/app'
|
||||
import { getFirestore, doc, getDocs, getDoc, setDoc, collection, query, orderBy, limit } from 'firebase/firestore/lite'
|
||||
import {
|
||||
getFirestore, doc, getDocs, getDoc, setDoc, collection, query, orderBy, limit
|
||||
} from 'firebase/firestore/lite'
|
||||
|
||||
|
||||
export class LeaderBoardService {
|
||||
|
|
|
|||
Loading…
Reference in a new issue