Skip to content

Commit

Permalink
Remove eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsmnsyc committed Dec 12, 2023
1 parent 393b2c1 commit bacfe90
Show file tree
Hide file tree
Showing 95 changed files with 4,098 additions and 5,469 deletions.
11 changes: 0 additions & 11 deletions .eslintrc

This file was deleted.

18 changes: 0 additions & 18 deletions benchmark/.eslintrc.cjs

This file was deleted.

10 changes: 3 additions & 7 deletions benchmark/build-src.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import * as esbuild from 'esbuild';

esbuild.buildSync({
entryPoints: [
'./src/index.ts',
],
entryPoints: ['./src/index.ts'],
outfile: './build/index.cjs',
bundle: true,
minify: true,
sourcemap: false,
format: 'cjs',
platform: 'node',
tsconfig: './tsconfig.json',
target: "es2018",
target: 'es2018',
legalComments: 'eof',
external: [
"benny",
],
external: ['benny'],
});
12 changes: 6 additions & 6 deletions benchmark/example.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { serializeAsync } from 'seroval';
import { BlobPlugin } from 'seroval-plugins/web';

const example = new Blob(['Hello, World!'], { type: 'text/plain '});
console.log(await serializeAsync(example, {
plugins: [
BlobPlugin,
],
}));
const example = new Blob(['Hello, World!'], { type: 'text/plain ' });
console.log(
await serializeAsync(example, {
plugins: [BlobPlugin],
}),
);
4 changes: 1 addition & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"devDependencies": {
"@types/node": "^20.8.3",
"esbuild": "^0.19.4",
"eslint": "^8.51.0",
"eslint-config-lxsmnsyc": "^0.6.6",
"tslib": "^2.6.2",
"typescript": "^5.3.2"
},
Expand Down Expand Up @@ -45,4 +43,4 @@
"*": {}
},
"version": "0.15.1"
}
}
45 changes: 21 additions & 24 deletions benchmark/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/* eslint-disable no-void */
/* eslint-disable @typescript-eslint/no-unsafe-argument */
import util from 'util';
import {
suite, add, cycle, complete, save,
} from 'benny';
import { suite, add, cycle, complete, save } from 'benny';

// fixtures
import circularDedupe from './fixtures/circular-dedupe';
Expand Down Expand Up @@ -43,24 +39,24 @@ const tools = [
];

const fixtures = {
// 'circular-dedupe': circularDedupe,
// 'circular-simple': circularSimple,
// 'dedupe-object': dedupeObject,
// 'large-circular-collection': largeCircularCollection,
// 'large-complex-collection': largeComplexCollection,
// 'large-dedupe-collection': largeDedupeCollection,
// 'large-invalid-keys-collection': largeInvalidKeysCollection,
// 'large-simple-collection': largeSimpleCollection,
// 'simple-object': simpleObject,
'circular-dedupe': circularDedupe,
'circular-simple': circularSimple,
'dedupe-object': dedupeObject,
'large-circular-collection': largeCircularCollection,
'large-complex-collection': largeComplexCollection,
'large-dedupe-collection': largeDedupeCollection,
'large-invalid-keys-collection': largeInvalidKeysCollection,
'large-simple-collection': largeSimpleCollection,
'simple-object': simpleObject,
'small-collection': smallCollection,
};

Object.entries(fixtures).forEach(([key, value]) => {
for (const [key, value] of Object.entries(fixtures)) {
const suiteName = key;
const getData = value as () => unknown;

// Skip benchmarks that couldn't properly serialize and hydrate the structure.
const toolsForFixture = tools.map((tool) => {
const toolsForFixture = tools.map(tool => {
let skip = false;
try {
skip = !util.isDeepStrictEqual(
Expand All @@ -76,9 +72,11 @@ Object.entries(fixtures).forEach(([key, value]) => {

void suite(
`${suiteName} to string`,
...toolsForFixture.map(({ name, utils, skip }) => (skip ? add.skip : add)(name, () => {
utils.toString(getData());
})),
...toolsForFixture.map(({ name, utils, skip }) =>
(skip ? add.skip : add)(name, () => {
utils.toString(getData());
}),
),
cycle(),
complete(),
save({
Expand All @@ -99,17 +97,16 @@ Object.entries(fixtures).forEach(([key, value]) => {

void suite(
`${suiteName} from string`,
...toolsForFixture.map(({ name, utils }) => (
...toolsForFixture.map(({ name, utils }) =>
// This does not account for parse time since eval is cached.
// skipped for now because it is not useful until a way to avoid eval cache is found.
add.skip(name, () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const sampleOutput = utils.toString(getData());
return (): void => {
utils.fromString(sampleOutput);
};
})
)),
}),
),
cycle(),
complete(),
save({
Expand All @@ -127,4 +124,4 @@ Object.entries(fixtures).forEach(([key, value]) => {
format: 'csv',
}),
);
});
}
21 changes: 0 additions & 21 deletions benchmark/tsconfig.eslint.json

This file was deleted.

Loading

0 comments on commit bacfe90

Please sign in to comment.