Skip to content

Conversation

senzg
Copy link
Contributor

@senzg senzg commented Jun 4, 2025

Ticket Link:

https://skyscanner.atlassian.net/browse/CLOV-289?atlOrigin=eyJpIjoiMjQwMGViYjU5OWI5NGVlN2E4ZjI5NmViN2FhMjVjNDQiLCJwIjoiaiJ9

Problem:

  • gulp-jsonlint is too old and doesn't support new versions anymore
  • gulp-jsonlint cannot be updated ,but transitive dependency underscore 1.6.0 is introduced
  • transitive dependency underscore 1.6.0 is in danger

Solution:

  • Replace gulp-jsonlint with eslint

Why not gulp-eslint:

  • It has been out of maintenance for 6 years

Remember to include the following changes:

  • README.md
  • Tests
  • Storybook examples created/updated for changes to tokens and icons

@senzg senzg added bug Something isn't working minor minor labels Jun 4, 2025
@GCpigsic GCpigsic requested a review from Copilot June 4, 2025 09:16
Copilot

This comment was marked as outdated.

@senzg senzg changed the title [CLOV289][Fix Alert]Replace gulp-jsonlint with jsonlint [CLOV289][Fix Alert]Replace gulp-jsonlint with eslint Jun 5, 2025
@senzg senzg requested a review from Copilot June 5, 2025 17:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request removes the outdated gulp-jsonlint dependency and replaces it with ESLint for JSON linting. Key changes include:

  • Updating gulpfiles for Web, iOS, and Android to replace gulp-jsonlint with exec-based ESLint calls.
  • Adjusting JSON files to remove trailing commas for valid JSON.
  • Modifying package.json and ESLint configuration to support JSON linting.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/bpk-foundations-web/gulpfile.mjs Replaced gulp-jsonlint with ESLint-based linting task.
packages/bpk-foundations-ios/gulpfile.mjs Replaced gulp-jsonlint with ESLint-based linting task.
packages/bpk-foundations-android/gulpfile.mjs Replaced gulp-jsonlint with ESLint-based linting task.
packages/bpk-foundations-common/base/colors/*.json Removed trailing commas for JSON validity.
package.json Updated lint scripts and dependencies to include JSON linting.
.eslintrc.json Added JSON file override rules for ESLint.
Comments suppressed due to low confidence (1)

package.json:30

  • Ensure the updated lint script for JSON files integrates seamlessly with the existing linting workflows and tooling.
    "lint": "npm run lint:js && npm run lint:scss && npm run lint:json",

Copy link
Contributor

@GCpigsic GCpigsic left a comment

Choose a reason for hiding this comment

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

LGTM

@senzg senzg merged commit 7474228 into main Jun 10, 2025
4 checks passed
@senzg senzg deleted the deprecate-gulp-jsonlint branch June 10, 2025 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants