feat: add Prettier and ESLint configuration for code formatting and linting

- Create .prettierrc for Prettier configuration
- Add eslint.config.js for ESLint setup with TypeScript support
- Update package.json to include linting and formatting scripts
- Refactor generate.ts and generate.js for improved readability and error handling
- Enhance QUICKSTART.md and README.md with formatting and clarity improvements
This commit is contained in:
didavila
2026-03-23 17:23:06 +01:00
parent cd00eb39ca
commit cebadbfbcc
7 changed files with 422 additions and 192 deletions

30
eslint.config.js Normal file
View File

@@ -0,0 +1,30 @@
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
module.exports = tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
eslintPluginPrettierRecommended,
{
languageOptions: {
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname
}
},
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_', 'varsIgnorePattern': '^_', 'caughtErrorsIgnorePattern': '^_' }]
}
},
{
ignores: ['dist/', 'node_modules/', 'eslint.config.js']
}
);