Skip to content

Commit 967ce3c

Browse files
committed
chore: migrate ESLint configuration from JSON to JS format and update package-lock.json
- Added a new ESLint configuration file (.eslintrc.js) to replace the existing JSON configuration. - Updated the lint script in package.json to reference the new .eslintrc.js file. - Updated package-lock.json to reflect changes in dependencies, including version bumps for several packages and removal of unused ones. - Removed deprecated installation and example files for Binance and Bybit APIs.
1 parent f4460a9 commit 967ce3c

20 files changed

+560
-788
lines changed

.eslintrc.js

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
module.exports = {
2+
root: true,
3+
plugins: ['@typescript-eslint'],
4+
parser: '@typescript-eslint/parser',
5+
overrides: [
6+
{
7+
files: ['*.ts', '*.tsx'], // Your TypeScript files extension
8+
// As mentioned in the comments, you should extend TypeScript plugins here,
9+
// instead of extending them outside the `overrides`.
10+
// If you don't want to extend any rules, you don't need an `extends` attribute.
11+
extends: [
12+
'plugin:@typescript-eslint/recommended',
13+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
14+
],
15+
parserOptions: {
16+
project: ['./tsconfig.json'], // Specify it only for TypeScript files
17+
tsconfigRootDir: __dirname,
18+
projectFolderIgnoreList: ['**/node_modules/**', '**/dist/**', '**/scripts/**'],
19+
},
20+
rules: {
21+
// Enabled: typescript
22+
'no-param-reassign': ['error'],
23+
'@typescript-eslint/await-thenable': 'error',
24+
'@typescript-eslint/dot-notation': 'error',
25+
'@typescript-eslint/no-unused-vars': 'off',
26+
'@typescript-eslint/no-unused-expressions': 'error',
27+
'@typescript-eslint/no-var-requires': 'error',
28+
'@typescript-eslint/prefer-namespace-keyword': 'error',
29+
'@typescript-eslint/no-floating-promises': 'off',
30+
'@typescript-eslint/no-inferrable-types': 'off',
31+
'@typescript-eslint/promise-function-async': 'off',
32+
'@typescript-eslint/no-use-before-define': 'off',
33+
'@typescript-eslint/no-non-null-assertion': 'off',
34+
'@typescript-eslint/ban-types': 'off',
35+
'@typescript-eslint/explicit-module-boundary-types': 'off',
36+
'@typescript-eslint/no-unsafe-member-access': 'warn',
37+
// Enabled: eslint
38+
'default-case': 'error',
39+
'no-return-await': 'error',
40+
eqeqeq: ['error', 'smart'],
41+
'id-denylist': ['error', 'any', 'Undefined', 'undefined'],
42+
'id-match': 'error',
43+
'no-caller': 'error',
44+
'no-cond-assign': 'error',
45+
'no-invalid-this': 'error',
46+
'no-debugger': 'error',
47+
'no-eval': 'error',
48+
'no-new-wrappers': 'error',
49+
'no-redeclare': 'error',
50+
'prefer-const': 'error',
51+
'prefer-object-spread': 'error',
52+
radix: 'error',
53+
'sort-imports': [
54+
'error',
55+
{
56+
ignoreCase: true,
57+
ignoreDeclarationSort: true,
58+
},
59+
],
60+
// Disabled: eslint
61+
'guard-for-in': 'off',
62+
'no-empty': 'off',
63+
'no-magic-numbers': 'off',
64+
'no-null/no-null': 'off',
65+
'no-shadow': 'off',
66+
'no-trailing-spaces': 'off',
67+
'no-underscore-dangle': 'off',
68+
'no-var': 'off',
69+
'no-unused-vars': 'off',
70+
'no-case-declarations': 'off',
71+
'no-constant-condition': 'off',
72+
'no-dupe-class-members': 'off',
73+
},
74+
},
75+
],
76+
};
77+

.eslintrc.json

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)