mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
chore: Migrate ESLint and prettier to Biome (#3634)
* Migrate eslint and prettier to biomejs This does NOT include examples/bigbot as it has its own formatter * Update to biome 1.8.0 * Readd dotenv dev dependency to rest During a merge it got lost
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { expect } from 'chai'
|
||||
import { describe, it } from 'mocha'
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { decode, encode } from '../src/base64.js'
|
||||
|
||||
describe('base64.ts', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect } from 'chai'
|
||||
import { describe, it } from 'mocha'
|
||||
import { camelize, snakelize, snakeToCamelCase } from '../src/casing.js'
|
||||
import { camelize, snakeToCamelCase, snakelize } from '../src/casing.js'
|
||||
|
||||
describe('casting.ts', () => {
|
||||
describe('camelize function', () => {
|
||||
|
||||
@@ -108,24 +108,24 @@ describe('collection.ts', () => {
|
||||
|
||||
describe('.find() method', () => {
|
||||
it('will find value by value', () => {
|
||||
expect(collection.find((v, k) => v === 'tri')).to.be.equal('tri')
|
||||
expect(collection.find((v, k) => v === 'skillz')).to.be.undefined
|
||||
expect(collection.find((v) => v === 'tri')).to.be.equal('tri')
|
||||
expect(collection.find((v) => v === 'skillz')).to.be.undefined
|
||||
})
|
||||
|
||||
it('will find value by key', () => {
|
||||
expect(collection.find((v, k) => k === 'proficient')).to.be.equal('yui')
|
||||
expect(collection.find((v, k) => k === 'skillz')).to.be.undefined
|
||||
expect(collection.find((_v, k) => k === 'proficient')).to.be.equal('yui')
|
||||
expect(collection.find((_v, k) => k === 'skillz')).to.be.undefined
|
||||
})
|
||||
})
|
||||
|
||||
describe('.filter() method', () => {
|
||||
it('will filter by key', () => {
|
||||
expect(collection.filter((v, k) => v === 'yui').array()).to.deep.equal(['yui'])
|
||||
expect(collection.filter((v, k) => v === 'skillz').array()).to.deep.equal([])
|
||||
expect(collection.filter((v) => v === 'yui').array()).to.deep.equal(['yui'])
|
||||
expect(collection.filter((v) => v === 'skillz').array()).to.deep.equal([])
|
||||
})
|
||||
it('will filter by key', () => {
|
||||
expect(collection.filter((v, k) => k === 'best').array()).to.deep.equal(['tri'])
|
||||
expect(collection.filter((v, k) => k === 'skillz').array()).to.deep.equal([])
|
||||
expect(collection.filter((_v, k) => k === 'best').array()).to.deep.equal(['tri'])
|
||||
expect(collection.filter((_v, k) => k === 'skillz').array()).to.deep.equal([])
|
||||
})
|
||||
})
|
||||
|
||||
@@ -201,7 +201,6 @@ describe('collection.ts', () => {
|
||||
|
||||
describe('.changeSweeperFilter() method', () => {
|
||||
it('will call startSweeper with new interval', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
const newFilter = () => true
|
||||
collection.startSweeper({ filter: () => false, interval: 1000 })
|
||||
collection.changeSweeperFilter(newFilter)
|
||||
@@ -209,7 +208,6 @@ describe('collection.ts', () => {
|
||||
})
|
||||
|
||||
it('will not startsweeper if not started', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
const newFilter = () => true
|
||||
collection.changeSweeperFilter(newFilter)
|
||||
expect(collection.sweeper).to.undefined
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { expect } from 'chai'
|
||||
import { describe, it } from 'mocha'
|
||||
import { iconBigintToHash, iconHashToBigInt } from '../src/hash.js'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect } from 'chai'
|
||||
import { describe, it } from 'mocha'
|
||||
import { LogDepth, LogLevels, createLogger } from '../src/logger.js'
|
||||
import { expect } from 'chai'
|
||||
|
||||
describe('Logger', () => {
|
||||
it('create logger with default options', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { expect } from 'chai'
|
||||
import { describe, it } from 'mocha'
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { getBotIdFromToken, removeTokenPrefix } from '../src/token.js'
|
||||
|
||||
describe('token.ts', () => {
|
||||
|
||||
Reference in New Issue
Block a user