forked from ZJONSSON/parquetjs
-
Notifications
You must be signed in to change notification settings - Fork 25
/
eslint.config.mjs
59 lines (57 loc) · 1.74 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import mochaPlugin from 'eslint-plugin-mocha';
import globals from 'globals';
export default tseslint.config(
eslint.configs.recommended,
mochaPlugin.configs.flat.recommended,
...tseslint.configs.strict,
...tseslint.configs.stylistic,
{
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
'@typescript-eslint/prefer-for-of': 'warn',
// Change back to an error (by removing) once we can
'@typescript-eslint/no-explicit-any': 'warn',
// Change back to an error (by removing) once we can
'@typescript-eslint/no-non-null-assertion': 'warn',
// Enable if we remove all cjs files
'@typescript-eslint/no-var-requires': 'off',
'mocha/max-top-level-suites': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
{
languageOptions: {
globals: {
...globals.node,
},
},
},
{
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',
},
}
);