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

chores(FR-342): Add ESLint Configuration for JSON Schema Validation #3008

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

yomybaby
Copy link
Member

@yomybaby yomybaby commented Jan 8, 2025

resolves #3007

This pull request introduces changes to enhance ESLint configuration and add JSON schema validation for i18n files. The most important changes include updates to the .eslintrc.json file to support JSON files, additions to package.json for new dependencies, and modifications to pnpm-lock.yaml to reflect these updates.

ESLint Configuration Enhancements:

  • .eslintrc.json: Added support for json-schema-validator plugin and jsonc-eslint-parser to handle JSON files. [1] [2]

Dependency Additions:

  • package.json: Added eslint-plugin-json-schema-validator and jsonc-eslint-parser to dependencies. [1] [2]

Lock File Updates:

JSON Schema for i18n Files:

Linting Command Update:

@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization labels Jan 8, 2025
@github-actions github-actions bot added the size:XL 500~ LoC label Jan 8, 2025
@yomybaby yomybaby changed the title chores: Add ESLint Configuration for JSON Schema Validation [FR-342] chores: Add ESLint Configuration for JSON Schema Validation Jan 8, 2025
Copy link
Member Author

yomybaby commented Jan 8, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

github-actions bot commented Jan 8, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.97% 398/8001
🔴 Branches 4.29% 237/5522
🔴 Functions 2.98% 78/2615
🔴 Lines 4.89% 383/7828

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 0de11e4

@yomybaby yomybaby force-pushed the chores/eslint-configuration-for-json-schema branch from 8ecfbb1 to 9d5fabe Compare January 9, 2025 04:55
@yomybaby yomybaby marked this pull request as ready for review January 9, 2025 14:56
@yomybaby yomybaby marked this pull request as draft January 9, 2025 14:57
@yomybaby yomybaby marked this pull request as ready for review January 9, 2025 14:58
@yomybaby yomybaby marked this pull request as draft January 9, 2025 15:19
@yomybaby yomybaby marked this pull request as ready for review January 9, 2025 15:19
@yomybaby yomybaby marked this pull request as draft January 9, 2025 15:44
@yomybaby yomybaby marked this pull request as ready for review January 10, 2025 07:58
resources/i18n/en.json Show resolved Hide resolved
resources/i18n/en.json Show resolved Hide resolved
resources/i18n/en.json Show resolved Hide resolved
resources/i18n/en.json Show resolved Hide resolved
resources/i18n/en.json Show resolved Hide resolved
resources/i18n/en.json Show resolved Hide resolved
resources/i18n/en.json Show resolved Hide resolved
resources/i18n/en.json Show resolved Hide resolved
resources/i18n/en.json Show resolved Hide resolved
resources/i18n/en.json Show resolved Hide resolved
@yomybaby yomybaby removed the request for review from ironAiken2 January 13, 2025 02:05
@yomybaby yomybaby requested a review from agatha197 January 13, 2025 03:07
Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

graphite-app bot commented Jan 13, 2025

Merge activity

…3008)

resolves #3007

This pull request introduces changes to enhance ESLint configuration and add JSON schema validation for i18n files. The most important changes include updates to the `.eslintrc.json` file to support JSON files, additions to `package.json` for new dependencies, and modifications to `pnpm-lock.yaml` to reflect these updates.

### ESLint Configuration Enhancements:
* [`.eslintrc.json`](diffhunk://#diff-6884918dc8291219be508e05e28965b958c734def85324f3b53858ea4702090fL21-R31): Added support for `json-schema-validator` plugin and `jsonc-eslint-parser` to handle JSON files. [[1]](diffhunk://#diff-6884918dc8291219be508e05e28965b958c734def85324f3b53858ea4702090fL21-R31) [[2]](diffhunk://#diff-6884918dc8291219be508e05e28965b958c734def85324f3b53858ea4702090fR62-R71)

### Dependency Additions:
* [`package.json`](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R145): Added `eslint-plugin-json-schema-validator` and `jsonc-eslint-parser` to dependencies. [[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R145) [[2]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R155)

### Lock File Updates:
* [`pnpm-lock.yaml`](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR328-R330): Updated to include new dependencies and their versions, such as `eslint-plugin-json-schema-validator`, `jsonc-eslint-parser`, and related utilities. [[1]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR328-R330) [[2]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR358-R360) [[3]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR6773-R6778) [[4]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR6804-R6814) [[5]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR6867-R6872) [[6]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR8622-R8624) [[7]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR8656-R8659) [[8]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR9300-R9303) [[9]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR13025-R13028) [[10]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbL18557-R18615) [[11]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR18666-R18669) [[12]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbL18659-R18711) [[13]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR21121-R21125) [[14]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR21169-R21174) [[15]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR21233-R21251) [[16]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbL21402-R21485) [[17]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR23721-R23724) [[18]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR23753-R23759) [[19]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR24590-R24593) [[20]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbL27644-R27741) [[21]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbL27655-R27752) [[22]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR27887-R27890) [[23]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbL28053-R28154) [[24]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbL28415-R28518) [[25]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbL28544-R28645) [[26]](diffhunk://#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR29112-R29117)

### JSON Schema for i18n Files:
* [`resources/i18n.schema.json`](diffhunk://#diff-342e8679a2075e67940a1a5b6ba3739ab196d58725885360cb2ecd423f106e9bR1-R23): Added a new JSON schema to validate i18n files.
* [`resources/i18n/de.json`](diffhunk://#diff-9e4def5f36ad2056d444a02f134fb777ad68017ca9e80cd87c8d594a2b3debe9R2): Linked the new JSON schema to the German i18n file.

### Linting Command Update:
* [`react/package.json`](diffhunk://#diff-5a3f058f37c9436d08fa97bd30209f67c9a1a61d041b0ce27e48613dfb3a1a10L70-R70): Updated the `lint` script to include i18n JSON files.
@agatha197 agatha197 force-pushed the chores/eslint-configuration-for-json-schema branch from 5263053 to 0de11e4 Compare January 13, 2025 03:10
@graphite-app graphite-app bot merged commit 0de11e4 into main Jan 13, 2025
6 checks passed
@graphite-app graphite-app bot deleted the chores/eslint-configuration-for-json-schema branch January 13, 2025 03:11
@yomybaby yomybaby changed the title [FR-342] chores: Add ESLint Configuration for JSON Schema Validation chores(FR-342): Add ESLint Configuration for JSON Schema Validation Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:i18n Localization area:ux UI / UX issue. size:XL 500~ LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ESLint Configuration for JSON Schema Validation
3 participants