Skip to content

Commit c0420ee

Browse files
committed
Update linting
1 parent dd06808 commit c0420ee

File tree

4 files changed

+339
-399
lines changed

4 files changed

+339
-399
lines changed

eslint.config.mjs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ export default tseslint.config(
1111
...tseslint.configs.strict,
1212
...tseslint.configs.stylistic,
1313
{
14-
ignores: ['dist/*', 'test/browser/main.js'],
14+
ignores: ['gen-nodejs/*', 'dist/**/*', 'dist/*', 'test/browser/main.js'],
1515
},
1616
{
1717
rules: {
18+
'no-loss-of-precision': 'off',
1819
// TODO: Fix/ignore in tests and remove
1920
'@typescript-eslint/no-loss-of-precision': 'warn',
2021
// TODO: Fix and remove
@@ -44,6 +45,15 @@ export default tseslint.config(
4445
},
4546
},
4647
{
47-
ignores: ['gen-nodejs/*', 'dist/**/*'],
48+
files: ['**/*.test.ts', 'test/**/*', 'examples/**/*'],
49+
rules: {
50+
'@typescript-eslint/no-require-imports': 'off',
51+
'@typescript-eslint/no-unused-expressions': 'off',
52+
'no-loss-of-precision': 'off',
53+
'@typescript-eslint/no-loss-of-precision': 'off',
54+
'@typescript-eslint/no-non-null-assertion': 'off',
55+
'@typescript-eslint/no-explicit-any': 'off',
56+
'@typescript-eslint/no-unused-vars': 'off',
57+
},
4858
}
4959
);

lib/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { PrimitiveType, OriginalType, ParquetType, FieldDefinition, ParquetField
44
import { Options } from './codec/types';
55
import type { Document as BsonDocument } from 'bson';
66
// BSON uses top level awaits, so use require for now
7+
// eslint-disable-next-line @typescript-eslint/no-require-imports
78
const bsonSerialize = require('bson').serialize;
9+
// eslint-disable-next-line @typescript-eslint/no-require-imports
810
const bsonDeserialize = require('bson').deserialize;
911

1012
interface ParquetTypeDataObject {
@@ -552,7 +554,7 @@ function toPrimitive_TIMESTAMP_MICROS(value: Date | string | number | bigint) {
552554
}
553555

554556
return v;
555-
} catch (e) {
557+
} catch (_e) {
556558
throw 'TIMESTAMP_MICROS value is out of bounds: ' + value;
557559
}
558560
}

0 commit comments

Comments
 (0)