Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Eslint and Prettier in the repository #70

Merged

Conversation

abhayymishraa
Copy link
Contributor

Description

Added ESLint and Prettier configuration to enforce consistent code style and catch potential issues early in development.

this pr solves - #69

Note :

i have implemented but the checking is not strict so for that if we want to strict check we will need to do many changes i am ready to do the changes
Also i have also implemented prettier-plugin-tailwindcss so that the tailwind clasees would be sorted acc to tailwind

Changes Made

  • Added ESLint configuration with React and TypeScript support
  • Added Prettier for code formatting
  • Configured integration between ESLint and Prettier
  • Added necessary dependencies
  • Added npm scripts for linting and formatting

##Added new files

  • .eslintignore
  • .eslintrc.json
  • .prettierignore
  • .prettierrc

Added Scripts

{
   "lint:check": "eslint --max-warnings 0 --config .eslintrc.json .",
   "lint:fix": "eslint --max-warnings 0 --config .eslintrc.json . --fix",
   "format:fix": "prettier --write \"**/*.{ts,tsx,json}\"",
   "format:check": "prettier --check \"**/*.{ts,tsx,json}\"",
   "vite-plugin-eslint"
}


## Dependencies Added
```json
{
 "devDependencies": {
   "eslint": "^8.57.1",
   "eslint-config-prettier": "^9.1.0",
   "eslint-config-react-app": "^7.0.1",
    "prettier": "^3.3.3",
   "prettier-plugin-tailwindcss": "^0.6.8",
   
 }
}

@yashpandey06
Copy link

@abhayymishraa, I think it would be more maintainable if we break these changes into smaller, logically grouped commits. This approach can make it easier for reviewers to follow the changes and verify it .

@Pranav0-0Aggarwal Pranav0-0Aggarwal added the documentation Improvements or additions to documentation label Nov 20, 2024
@Pranav0-0Aggarwal Pranav0-0Aggarwal merged commit 805cdcc into AOSSIE-Org:main Nov 20, 2024
@abhayymishraa
Copy link
Contributor Author

@yashpandey06 yes i know but both prettier and lint will be done at the same time mostly if not it will give conflicts and thats why i have disabled all the strict changes we will change when we cnage some part of the code like we should replace any witht the correct format.

@yashpandey06
Copy link

Make sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants