PromucFlow_constructor/app/server/appsmith-plugins
Nilansh Bansal fe7ca6b98e
chore: added prettier spotless plugin for json files (#35447)
## Description
This PR adds the spotless formatter and validator for the JSON files
present in the project. If there is any invalid JSON file, the formatter
fails and logs the file and the error LOC to be fixed.
It uses the `prettier JSON` formatted in spotless for the same.
Since Spotless is already added to the pre-commit hook it also makes it
necessary to fix the JSON and then commit the changes.

- The prettier JSON formattor preserves the order of the keys.
- Indendation of 2 spaces has been added in the config

Screenshot of the errors displayed for Invalid JSONs
<img width="1427" alt="image"
src="https://github.com/user-attachments/assets/00bbd61c-7414-4787-b9ac-2f0d392f6f33">

### Last attempt to resolve this issue
The formatted used was `simple JSON` which led to change in order of
JSON keys.
PR: https://github.com/appsmithorg/appsmith/pull/35395
Ref:
https://theappsmith.slack.com/archives/CGBPVEJ5C/p1722929754593669?thread_ts=1722916121.682699&cid=CGBPVEJ5C


Fixes #34969 

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10264348935>
> Commit: 4957b647f3d5e0f9853e7f391411b62ee189547b
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10264348935&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Tue, 06 Aug 2024 12:40:47 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-08-08 09:16:03 +05:30
..
amazons3Plugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
anthropicPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
appsmithAiPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
arangoDBPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
awsLambdaPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
databricksPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
dynamoPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
elasticSearchPlugin Revert "chore: added JSON files linting check" (#35445) 2024-08-06 14:15:23 +05:30
firestorePlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
googleAiPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
googleSheetsPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
graphqlPlugin Revert "chore: added JSON files linting check" (#35445) 2024-08-06 14:15:23 +05:30
jsPlugin chore: Applied Spotless formatter (#25173) 2023-07-07 00:43:11 +05:30
mongoPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
mssqlPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
mysqlPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
openAiPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
oraclePlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
postgresPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
redisPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
redshiftPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
restApiPlugin Revert "chore: added JSON files linting check" (#35445) 2024-08-06 14:15:23 +05:30
saasPlugin fix: graphQL bindings issue resolved (#32760) 2024-04-18 17:36:54 +05:30
smtpPlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
snowflakePlugin chore: added prettier spotless plugin for json files (#35447) 2024-08-08 09:16:03 +05:30
pom.xml test: Add AssertJ for plugins, for better assertions (#31380) 2024-03-04 07:33:45 +05:30