refactor: migrate ESLint configuration to flat config and remove redundant rule files
- replace legacy .eslintrc files with flat eslint.config.js - consolidate eslint globals for improved code clarity - enable prefer-const and no-unused-vars off in *.js for flexibility - remove unused import statements and redundant eslint directives from epic-games.js and aliexpress.js - standardize function parameter syntax to arrow with parentheses omitted where safe - add comments marking unused but retained functions for reference
This commit is contained in:
parent
728b0c734b
commit
96df8cb3d4
5 changed files with 85 additions and 53 deletions
45
.eslintrc.cjs
Normal file
45
.eslintrc.cjs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
node: true,
|
||||
es2021: true,
|
||||
es6: true,
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
'no-unused-vars': ['warn', {
|
||||
varsIgnorePattern: '^_',
|
||||
argsIgnorePattern: '^_',
|
||||
}],
|
||||
'no-undef': 'error',
|
||||
'@stylistic/js/comma-dangle': ['error', 'always-multiline'],
|
||||
'@stylistic/js/arrow-parens': ['error', 'as-needed'],
|
||||
},
|
||||
plugins: [
|
||||
'@stylistic/js',
|
||||
],
|
||||
globals: {
|
||||
screenshot: 'readonly',
|
||||
cfg: 'readonly',
|
||||
URL_CLAIM: 'readonly',
|
||||
COOKIES_PATH: 'readonly',
|
||||
BEARER_TOKEN_NAME: 'readonly',
|
||||
notify: 'readonly',
|
||||
authenticator: 'readonly',
|
||||
prompt: 'readonly',
|
||||
html_game_list: 'readonly',
|
||||
datetime: 'readonly',
|
||||
filenamify: 'readonly',
|
||||
handleSIGINT: 'readonly',
|
||||
stealth: 'readonly',
|
||||
jsonDb: 'readonly',
|
||||
delay: 'readonly',
|
||||
dataDir: 'readonly',
|
||||
resolve: 'readonly',
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue