mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 20:54:14 +00:00
Cleanup after the JS→TS migration:
- All consumers that imported @/models/{inbound,outbound,dbinbound}.js
now drop the .js extension (TS module resolution lands on the .ts
file automatically)
- eslint.config.js: remove the **/*.js block since the only remaining
JS file under src/ is endpoints.js (build-script consumed only) and
js.configs.recommended already covers it correctly
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
import js from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
import globals from 'globals';
|
|
|
|
export default [
|
|
{ ignores: ['node_modules/**', '../web/dist/**'] },
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended.map((config) => ({
|
|
...config,
|
|
files: ['**/*.{ts,tsx}'],
|
|
})),
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
plugins: {
|
|
'react-hooks': reactHooks,
|
|
},
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
'@typescript-eslint/no-unused-vars': ['warn', {
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_',
|
|
}],
|
|
'no-empty': ['error', { allowEmptyCatch: true }],
|
|
'react-hooks/set-state-in-effect': 'off',
|
|
'react-hooks/purity': 'off',
|
|
'react-hooks/react-compiler': 'off',
|
|
'react-hooks/preserve-manual-memoization': 'off',
|
|
'react-hooks/immutability': 'off',
|
|
'react-hooks/refs': 'off',
|
|
},
|
|
},
|
|
];
|