View Issue Details

IDProjectCategoryView StatusLast Update
3674Composr testing platform / automation goalsGeneral / Uncategorisedpublic2023-02-18 22:33
ReporterSalman Assigned ToChris Graham  
PrioritynormalSeverityfeature 
Status resolvedResolutionfixed 
Summary3674: Add a unit test to run ESLint
DescriptionESLint configuration files were recently added to the repo[1]. We should have a unit test that runs ESLint and outputs any errors.

1: https://github.com/ocproducts/composr/commit/a14e994ba3d1eb5142d33f710214dfc3fc03c22c
TagsRoadmap: Over the horizon
Attach Tags
Time estimation (hours)
Sponsorship open0

Sponsor

Date Added Member Amount Sponsored

Activities

Salman

2018-09-04 08:11

reporter   ~5807

ESLint comes with several built-in formatters to control the appearance of the linting results, we will probably use the HTML formatter: https://eslint.org/docs/user-guide/formatters/#html

Chris Graham

2018-09-05 01:27

administrator   ~5815

I am happy with this under a couple of conditions...

1) It should be '_' prefixed, i.e. a test you're not supposed to run for every patch release and doesn't need to be 100% respected

2) It should not just crash if eslint and whatever dependencies it has are not available. I imagine that needs node or some such, which I don't want core developers to be forced to install. So it needs to do a clean assertion error when eslint is unavailable.

Salman

2018-09-05 06:28

reporter   ~5816

Last edited: 2018-09-05 06:32

Thanks! I am not fully sure if it's worth adding a unit test for this as the ESLint configuration file is picked up by PHPStorm automatically and it shows all errors as syntax errors (which is neat, it helps detect many errors early and makes sure the formatting/spacing is perfect). There is a TextMate bundle for it as well and all major IDEs probably have plugins if not out of the box support.

Sorry for making this suggestion without thinking about it fully...

Salman

2018-09-05 06:38

reporter   ~5817

Oh and it can always be run manually by installing eslint using npm (npm install -g eslint) and `cd` to the composr directory, then `eslint .`;

Guest

2018-09-05 13:00

reporter   ~5818

There shouldn't be any undocumented knowledge or undocumented de facto assumptions about people's environment. So if running ESLint becomes a standardised part of the process, that at least needs documented.

However, I don't think it needs to be for now at least.

Issue History

Date Modified Username Field Change
2018-09-03 20:37 Salman New Issue
2018-09-03 20:37 Salman Status Not Assigned => Assigned
2018-09-03 20:37 Salman Assigned To => user4127
2018-09-04 08:11 Salman Note Added: 0005807
2018-09-05 01:22 Chris Graham Project Composr => Composr testing platform / automation goals
2018-09-05 01:27 Chris Graham Note Added: 0005815
2018-09-05 06:28 Salman Note Added: 0005816
2018-09-05 06:32 Salman Note Edited: 0005816
2018-09-05 06:38 Salman Note Added: 0005817
2018-09-05 13:00 Guest Note Added: 0005818
2022-08-14 23:50 Chris Graham Tag Attached: Roadmap: v12
2022-08-15 16:56 Chris Graham Assigned To user4127 =>
2022-08-15 16:56 Chris Graham Status Assigned => Not Assigned
2023-02-18 22:33 Chris Graham Assigned To => Chris Graham
2023-02-18 22:33 Chris Graham Status Not Assigned => Resolved
2023-02-18 22:33 Chris Graham Resolution open => fixed
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised
2024-03-26 00:58 PDStig Tag Renamed Roadmap: v12 => Roadmap: Over the horizon