mozilla / eslint-plugin-no-unsanitized

Custom ESLint rule to disallows unsafe innerHTML, outerHTML, insertAdjacentHTML and alike
Mozilla Public License 2.0
222 stars 33 forks source link

Switch to prettier for formatting; drop obsolete ESLint formatting rules. #238

Closed Standard8 closed 2 months ago

Standard8 commented 2 months ago

Working towards ESLint v9 (#234), the first thing is to drop some redundant rules. This adds prettier, so that we can remove the formatting rules that ESLint has now made obsolete.

I've gone with 4 space indentation for now, as that's what the JS code is using. Though we could do a later change to 2 space (which is what mozilla-central uses) if wanted.

mozfreddyb commented 2 months ago

Oh, this is great. Thank you so much for taking a look at cleaning this repo up. It's really overdue.

I've happily started reviewing the fixes to the markdown and test files, but this is getting quite cumbersome....

I think it would be great if you could help me provide steps you underwent to arrive at this commit? I assume your submission here is actually two steps:

Is that correct? Could you help me with that?

Standard8 commented 2 months ago

Yes, that's correct. I probably should have split those into two commits.

The changes to enable prettier would be in package.json, yarn.lock, prettier.config.mjs, .eslintrc.json and .github/workflows/ci.yml