Eslint on contrib is making incorrect recommendations
Problem/Motivation
It's basically impossible to make js that passes the eslint rules as implemented and adhere to coding standards and not break stuff.
Example: https://git.drupalcode.org/project/content_lock/-/jobs/1106563
Core's eslint rules are confusing configured and on core js we run the and different ruleset and in a different way that contrib does. Core runs core/.eslintrc.passing.json whereas contrib gitlab uses core/.eslintrc.json. This means contrib misses out on core/.eslintrc.jquery.json and it gets warnings like
warning Unexpected unnamed function
for stuff like
(function ($, Drupal, once) {which is exactly how core js looks.
Not sure what to do here but the current state of play is not great. If you copy a core js file to contrib project it is going to fail.
Steps to reproduce
Proposed resolution
Review approach to eslint and maybe run with core-js-passing.