Some checks failed
CI Pipeline / changes (push) Has been cancelled
CI Pipeline / core (push) Has been cancelled
CI Pipeline / trading-backend (push) Has been cancelled
CI Pipeline / trading-data-service (push) Has been cancelled
CI Pipeline / trading-frontend (push) Has been cancelled
CI Pipeline / erp-core (push) Has been cancelled
CI Pipeline / erp-mecanicas (push) Has been cancelled
CI Pipeline / gamilit-backend (push) Has been cancelled
CI Pipeline / gamilit-frontend (push) Has been cancelled
61 lines
1.5 KiB
JavaScript
61 lines
1.5 KiB
JavaScript
/**
|
|
* ESLint Base Configuration
|
|
* Shared across all TypeScript projects in the workspace
|
|
*
|
|
* Usage in project:
|
|
* ```js
|
|
* // eslint.config.js
|
|
* import baseConfig from '../../../devtools/configs/eslint.config.base.js';
|
|
* export default [...baseConfig];
|
|
* ```
|
|
*/
|
|
|
|
import js from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import prettierConfig from 'eslint-config-prettier';
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
prettierConfig,
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
languageOptions: {
|
|
parser: tseslint.parser,
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
},
|
|
},
|
|
rules: {
|
|
// TypeScript specific
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/no-non-null-assertion': 'warn',
|
|
|
|
// General
|
|
'no-console': ['warn', { allow: ['warn', 'error', 'info'] }],
|
|
'no-debugger': 'error',
|
|
'prefer-const': 'error',
|
|
'no-var': 'error',
|
|
'eqeqeq': ['error', 'always'],
|
|
|
|
// Import ordering (if using import plugin)
|
|
// 'import/order': ['error', { 'newlines-between': 'always' }],
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
'**/node_modules/**',
|
|
'**/dist/**',
|
|
'**/build/**',
|
|
'**/.next/**',
|
|
'**/coverage/**',
|
|
'**/*.js',
|
|
'**/*.d.ts',
|
|
],
|
|
},
|
|
];
|