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
|
|
@ -1,36 +0,0 @@
|
|||
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',
|
||||
},
|
||||
};
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
"env": {
|
||||
"node": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"no-unused-vars": "warn",
|
||||
"no-undef": "error"
|
||||
},
|
||||
"globals": {
|
||||
"cfg": "readonly",
|
||||
"URL_CLAIM": "readonly",
|
||||
"authenticator": "readonly",
|
||||
"prompt": "readonly",
|
||||
"notify": "readonly"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue