Skip to content

Commit

Permalink
Update linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wilwade committed Oct 7, 2024
1 parent dd06808 commit c0420ee
Show file tree
Hide file tree
Showing 4 changed files with 339 additions and 399 deletions.
14 changes: 12 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ export default tseslint.config(
...tseslint.configs.strict,
...tseslint.configs.stylistic,
{
ignores: ['dist/*', 'test/browser/main.js'],
ignores: ['gen-nodejs/*', 'dist/**/*', 'dist/*', 'test/browser/main.js'],
},
{
rules: {
'no-loss-of-precision': 'off',
// TODO: Fix/ignore in tests and remove
'@typescript-eslint/no-loss-of-precision': 'warn',
// TODO: Fix and remove
Expand Down Expand Up @@ -44,6 +45,15 @@ export default tseslint.config(
},
},
{
ignores: ['gen-nodejs/*', 'dist/**/*'],
files: ['**/*.test.ts', 'test/**/*', 'examples/**/*'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'no-loss-of-precision': 'off',
'@typescript-eslint/no-loss-of-precision': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
}
);
4 changes: 3 additions & 1 deletion lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { PrimitiveType, OriginalType, ParquetType, FieldDefinition, ParquetField
import { Options } from './codec/types';
import type { Document as BsonDocument } from 'bson';
// BSON uses top level awaits, so use require for now
// eslint-disable-next-line @typescript-eslint/no-require-imports
const bsonSerialize = require('bson').serialize;
// eslint-disable-next-line @typescript-eslint/no-require-imports
const bsonDeserialize = require('bson').deserialize;

interface ParquetTypeDataObject {
Expand Down Expand Up @@ -552,7 +554,7 @@ function toPrimitive_TIMESTAMP_MICROS(value: Date | string | number | bigint) {
}

return v;
} catch (e) {
} catch (_e) {
throw 'TIMESTAMP_MICROS value is out of bounds: ' + value;
}
}
Expand Down
Loading

0 comments on commit c0420ee

Please sign in to comment.