Skip to content

Commit fb98e9b

Browse files
committed
chore: wip
chore: wip
1 parent 943ede0 commit fb98e9b

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

storage/framework/core/alias/tests/alias.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('@stacksjs/alias', () => {
2121

2222
expect(stacksjsAliases.length).toBe(stacksAliases.length)
2323

24-
stacksjsAliases.forEach(([key, value], index) => {
24+
stacksjsAliases.forEach(([key, value]) => {
2525
const stacksKey = `stacks/${key.slice('@stacksjs/'.length)}`
2626
expect(alias[stacksKey]).toBe(value)
2727
})
@@ -36,7 +36,7 @@ describe('@stacksjs/alias', () => {
3636

3737
it('should have consistent naming conventions', () => {
3838
Object.keys(alias).forEach((key) => {
39-
expect(key).toMatch(/^(@stacksjs\/|stacks\/|~\/|framework\/)?([a-z-]+\/?)*(\*)?$/)
39+
expect(key).toMatch(/^(@stacksjs\/|stacks\/|~\/|framework\/)?[a-z-]+(\/[a-z-]+)*(\*)?$/)
4040
})
4141
})
4242

storage/framework/core/cli/src/app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable ts/no-use-before-define, regexp/no-useless-non-capturing-group, regexp/no-trivially-nested-quantifier, regexp/no-useless-quantifier, regexp/prefer-w,regexp/no-useless-escape */
12
import process from 'node:process'
23
// slightly modified version of @clack/prompts
34
// many thanks to bombshell-dev for the original work

storage/framework/core/collections/src/index.ts

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable ts/no-unsafe-function-type,eqeqeq,ts/no-use-before-define,unused-imports/no-unused-vars,no-prototype-builtins, no-console */
12
import process from 'node:process'
23
import { clone, deleteKeys, isArray, isFunction, isObject, nestedValue, values } from './helpers/'
34

@@ -191,7 +192,6 @@ export class Collection<T> {
191192
}
192193

193194
dd(): void {
194-
// eslint-disable-next-line no-console
195195
console.log(JSON.stringify(this.all(), null, 2))
196196
process.exit()
197197
}
@@ -247,9 +247,8 @@ export class Collection<T> {
247247
}
248248

249249
diffUsing(array: any[] | null, callback: (a: any, b: any) => number): Collection<T> {
250-
// eslint-disable-next-line no-console
251250
console.log('Original collection:', this.items)
252-
// eslint-disable-next-line no-console
251+
253252
console.log('Array to compare:', array)
254253

255254
if (array === null) {
@@ -269,32 +268,26 @@ export class Collection<T> {
269268
}
270269

271270
doesntContain(key: string | number | symbol | ((item: T, index: number) => boolean), value?: any): boolean {
272-
// eslint-disable-next-line no-console
273271
console.log('doesntContain called with:', { key, value })
274272

275273
if (typeof key === 'function') {
276-
// eslint-disable-next-line no-console
277274
console.log('Function branch')
278275
return !this.contains(key)
279276
}
280277

281278
if (value !== undefined) {
282-
// eslint-disable-next-line no-console
283279
console.log('Key-value pair branch')
284280
return !this.contains((item) => {
285-
// eslint-disable-next-line no-console
286281
console.log('Comparing:', item[key], 'with', value)
287282
return item[key] === value
288283
})
289284
}
290285

291-
// eslint-disable-next-line no-console
292286
console.log('Single value branch')
293287
return !this.contains(key)
294288
}
295289

296290
dump(): this {
297-
// eslint-disable-next-line no-console
298291
console.log(this.items)
299292
return this
300293
}
@@ -385,30 +378,26 @@ export class Collection<T> {
385378
}
386379

387380
filter(callback?: (item: T, index: number) => boolean): Collection<T> {
388-
// eslint-disable-next-line no-console
389381
console.log('Filter method called with callback:', callback)
390-
// eslint-disable-next-line no-console
382+
391383
console.log('Current items:', this.items)
392384

393385
if (typeof callback !== 'function') {
394-
// eslint-disable-next-line no-console
395386
console.log('No callback provided, removing falsy values')
396387
const filteredItems = this.items.filter((item) => {
397-
// eslint-disable-next-line no-console
398388
console.log('Filtering item:', item)
399389
return Boolean(item)
400390
})
401-
// eslint-disable-next-line no-console
391+
402392
console.log('Filtered items:', filteredItems)
403393
return new Collection(filteredItems)
404394
}
405395

406396
const filteredItems = this.items.filter((item, index) => {
407-
// eslint-disable-next-line no-console
408397
console.log('Filtering item:', item, 'at index:', index)
409398
return callback(item, index)
410399
})
411-
// eslint-disable-next-line no-console
400+
412401
console.log('Filtered items:', filteredItems)
413402
return new Collection(filteredItems)
414403
}

0 commit comments

Comments
 (0)