UNPKG

github-pr-automation

Version:

MCP server and CLI for automated GitHub PR management, review resolution, and workflow optimization

90 lines (87 loc) 3.08 kB
import js from '@eslint/js'; import typescript from '@typescript-eslint/eslint-plugin'; import typescriptParser from '@typescript-eslint/parser'; import jsdoc from 'eslint-plugin-jsdoc'; export default [ js.configs.recommended, { files: ['**/*.ts', '**/*.tsx'], languageOptions: { parser: typescriptParser, parserOptions: { ecmaVersion: 2022, sourceType: 'module', project: './tsconfig.json' }, globals: { console: 'readonly', process: 'readonly', Buffer: 'readonly', setTimeout: 'readonly', clearTimeout: 'readonly', setInterval: 'readonly', clearInterval: 'readonly' } }, plugins: { '@typescript-eslint': typescript, 'jsdoc': jsdoc }, rules: { ...typescript.configs.recommended.rules, ...typescript.configs['recommended-requiring-type-checking'].rules, '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/require-await': 'off', 'no-console': ['warn', { allow: ['error', 'warn'] }], // Documentation enforcement rules using JSDoc plugin // Re-enabled with reasonable defaults for good documentation standards 'jsdoc/require-jsdoc': ['warn', { require: { FunctionDeclaration: true, MethodDefinition: true, ClassDeclaration: true, ArrowFunctionExpression: false, FunctionExpression: false } }], 'jsdoc/valid-types': 'warn', 'jsdoc/require-description': 'warn', 'jsdoc/require-param-description': 'warn', 'jsdoc/require-returns-description': 'warn', 'jsdoc/check-param-names': 'warn', 'jsdoc/check-tag-names': 'warn', 'jsdoc/check-types': 'warn', 'jsdoc/no-undefined-types': 'warn', 'jsdoc/require-example': 'off', // Too strict for most code 'jsdoc/require-returns': 'warn' } }, { files: ['tests/**/*.ts'], rules: { // More lenient documentation rules for test files 'jsdoc/require-jsdoc': 'off', 'jsdoc/valid-types': 'off', 'jsdoc/require-description': 'off', 'jsdoc/require-param-description': 'off', 'jsdoc/require-returns-description': 'off', 'jsdoc/check-param-names': 'off', 'jsdoc/check-tag-names': 'off', 'jsdoc/check-types': 'off', 'jsdoc/no-undefined-types': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-return': 'off', 'no-console': 'off', '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }] } }, { ignores: ['dist/', 'node_modules/', 'coverage/', '*.js', '!scripts/*.js'] } ];