DEV: upgrades dev config (PR #10588)

This commit will do the following:

  • move everything related to eslint/prettier into eslint-config-discourse
  • add a local .prettierrc config
  • applies the new fixes of prettier, nots it’s mostly wrapping single arg anon function into () and adding a space between function and ()
  • fixes two prettier offenses where Int8Array and Sinon where not present in the fike, I suppose eslint couldn’t search in comments before
  • moves bootbox global in discourse-ember
  • I removed tailingComma which is now enforced by prettier, no strong feelings on this

Note, for this commit to work we must first merge and publish new version of eslint-config-discourse https://github.com/discourse/eslint-config-discourse/pull/8

GitHub

Huge diff but :+1:.

I removed trailingComma which is now enforced by prettier, no strong feelings on this

I wouldn’t mind enabling it. Makes some diffs cleaner (adding a line to a list is one line change instead of two :stuck_out_tongue:)

1 Like

I can’t review 690 changes here but a quick glance looks OK.

As for bootbox, that is likely still used by plugins which is why I added it to core. If you assume it’s linted by the eslint-config-discourse then plugin linting might fail.

1 Like

I will make sure to add our eslint config on missing plugins

2 Likes