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:
Fleny
2024-07-13 13:05:02 -05:00
committed by GitHub
parent 7b3bd76c82
commit 919474069d
132 changed files with 722 additions and 4993 deletions
+1 -1
View File
@@ -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 -1
View File
@@ -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', () => {
+8 -10
View File
@@ -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
View File
@@ -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 -1
View File
@@ -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 -1
View File
@@ -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', () => {