FLUID-6403: Update eslint-config-fluid to provide check line endings and console logs

Metadata

Source
FLUID-6403
Type
Improvement
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Colin Clark
Reporter
Justin Obara
Created
2019-09-25T12:58:10.882-0400
Updated
2024-07-22T10:35:02.461-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. fluid-eslint-config

Comments

  • Justin Obara commented 2019-10-07T18:08:35.938-0400

    When running gpii-grunt-lint-all we get errors for the JSON files for a console.log. It appears that json-eslint.js wraps the json into a javascript function which also contains a console.log statement. It's likely that the error is coming from this, as the json files themselves do not have console statements.

    https://github.com/GPII/gpii-grunt-lint-all/blob/master/tasks/json-eslint.js#L14

    @@Tony Atkins [RtF] do you know if this is a bug and/or something that we can change in gpii-grunt-lint-all? I'd also be curious to hear thoughts on not checking for console statements. There are a few legitimate cases for them in infusion, which should be easy to escape.

  • Justin Obara commented 2019-10-07T18:34:40.444-0400

    @@Tony Atkins [RtF] on further thought, I believe that is a legitimate bug with gpii-grunt-lint-all because it would prevent anyone from setting the no-console check. I filed it as https://issues.gpii.net/browse/GPII-4176 There is still the question of whether we want the no-console check for eslint-config-fluid, but I believe now that it is a distinct issue.

  • Tony Atkins [RtF] commented 2019-10-08T04:30:32.505-0400

    @@Justin Obara, I have a long-standing pull I put in over a year ago to add the console.log check to the default config. IMO we should discuss and evaluate these in combination, as we want to ensure the check is meaningful, but that it also doesn't cause problems downstream.

    cc: @@Antranig Basman

  • Justin Obara commented 2019-10-08T08:30:36.923-0400

    This partially duplicates FLUID-6331 which was filed to update the console log check.