- π¬π§United Kingdom jonathan1055
For reference the commit from #15 is https://git.drupalcode.org/project/drupalci_testbot/-/commit/5075fb7d421...
core/.prettierignore and core/.prettierrc.json are not used when eslint runs in a contrib project directory, as they are not in a parent path. As a result, "prettier" eslint plugin runs in an unconfigured state, and reports bogus errors, e.g. single quotes should be changed to double quotes in .yml files: error Replace `''` with `""` prettier/prettier
Run CI for a contrib project, or manually: yarn install
dependencies for core, and from a contrib project directory run ../../../core/node_modules/.bin/eslint --resolve-plugins-relative-to=../../../core .
There is already a top-level .eslintrc.json file which extends the core/.eslintrc.json file, but I don't think there's a way for a top-level .prettierrc.json to extend core/.prettierrc.json as well.
It'd be possible for drupal-core to copy the prettier config into its top-level .eslintrc.json, that way eslint would function correctly when run by contrib developers. This means there would be some redundant configuration; also is not officially recommended in case there are any prettier plugins installed that just read .prettierrc.json - see https://github.com/prettier/eslint-plugin-prettier#options
Maybe testbot could symlink core/.prettierrc.json into its parent directory? That way these configs would be in a parent directory of the directory being linted.
Note however that core/.prettierrc.json enforces ES6 javascript via the "trailingComma": "all"
rule. It might be too soon to do that for any contrib projects that want to maintain IE11 support, in which case separate contrib rules with "trailingComma": "es5"
should be used - see also a specific followup about this:
#3314595: Core eslint forces ES6 in contrib projects β
.
Implement a fix and review.
None.
None.
None.
Fixed
Testrunner Codebase
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
For reference the commit from #15 is https://git.drupalcode.org/project/drupalci_testbot/-/commit/5075fb7d421...