Description
RepoReady currently lacks automated code linting and formatting tools. Adding ESLint and Prettier will ensure consistent code style across the project and make it easier for new contributors to maintain code quality standards.
Current State
- ❌ No ESLint configuration
- ❌ No Prettier configuration
- ❌ No linting scripts in package.json
- ✅ TypeScript is configured (good foundation)
- ✅ Project structure is clean and organized
Acceptance Criteria
ESLint Setup
Prettier Setup
Integration
Implementation Suggestions
Recommended ESLint Configuration
// .eslintrc.js
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'@typescript-eslint/recommended',
'prettier'
],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
env: {
node: true,
es6: true,
},
rules: {
// Add project-specific rules here
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': 'error'
},
};
Recommended Prettier Configuration
// .prettierrc
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false
}
Package.json Scripts
"scripts": {
"lint": "eslint src --ext .ts,.tsx",
"lint:fix": "eslint src --ext .ts,.tsx --fix",
"format": "prettier --write \"src/**/*.{ts,tsx,json,md}\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx,json,md}\""
}
Files to Create/Modify
.eslintrc.js (new)
.prettierrc (new)
.prettierignore (new)
package.json (add dependencies and scripts)
.vscode/settings.json (optional, for better developer experience)
Dependencies to Add
npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
npm install --save-dev prettier eslint-config-prettier eslint-plugin-prettier
Benefits
- 🔧 Consistent code formatting across the project
- 🐛 Catch potential bugs and issues early
- 👥 Easier for new contributors to follow coding standards
- ⚡ Automated formatting saves time during development
- 📝 Better code readability and maintainability
Resources
Estimated Effort
Easy to Medium - Straightforward setup with some configuration decisions.
Perfect for contributors who want to improve developer experience and code quality! 🔧
Description
RepoReady currently lacks automated code linting and formatting tools. Adding ESLint and Prettier will ensure consistent code style across the project and make it easier for new contributors to maintain code quality standards.
Current State
Acceptance Criteria
ESLint Setup
@typescript-eslint/parser,@typescript-eslint/eslint-plugin).eslintrc.jsor.eslintrc.jsonconfigurationlintandlint:fixscripts to package.jsonPrettier Setup
.prettierrcconfiguration file.prettierignorefileformatandformat:checkscripts to package.jsonIntegration
Implementation Suggestions
Recommended ESLint Configuration
Recommended Prettier Configuration
Package.json Scripts
Files to Create/Modify
.eslintrc.js(new).prettierrc(new).prettierignore(new)package.json(add dependencies and scripts).vscode/settings.json(optional, for better developer experience)Dependencies to Add
Benefits
Resources
Estimated Effort
Easy to Medium - Straightforward setup with some configuration decisions.
Perfect for contributors who want to improve developer experience and code quality! 🔧