Closed Bug 1359011 Opened 3 years ago Closed 3 years ago
[meta] Make the mozilla/recommended eslint configuration the default for the whole tree
59 bytes, text/x-review-board-request
Currently we have a lot of rules and different configurations for ESLint spread over the entire tree. Some of the rules are the same, some are different. This makes it harder for developers to know what is enabled where, and is likely to lead to more inconsistency. Therefore, I'd like to aim towards enabling mozilla/recommended by default for the whole tree, reducing duplicates where the defined rules are the same, being more explicit about what is disabled where, and what extra rules are enabled. Overall I want to reduce the .eslintrc.js overheads, and when new components are added they automatically will pick up the recommended config. Eventually, I'd like to consider getting the rules harmonised across components/directories, ideally ending up with 'one' config (that may not be possible, but it is something to shoot for). Unfortunately our current set-up makes it hard to know where to start, hence the need to cleanup. Some of this work has already started with the sub-bugs of bug 1354521 and various other bugs. Over the next couple of weeks I'll have a dig around and see what we need to do to get this enabled at the top level.
I think it would be best to leave devtools untouched during this effort. devtools is moving out of tree soon, so any rule removals there would just have to be re-done by someone else.
(In reply to Tom Tromey :tromey from comment #1) > I think it would be best to leave devtools untouched during this effort. > devtools is moving out of tree soon, so any rule removals there would just > have to be re-done by someone else. That sounds reasonable. I think worst case, we'd just need to add a couple of extra rules to devtools' list where recommended specifies them and devtools doesn't. Note: devtools could use eslint-plugin-mozilla outside the tree - it works for other repositories now (via npm).
Note: the patch will need bug 1363795 if you're applying it locally. Bug 1363795 is currently on autoland.
Comment on attachment 8869344 [details] Bug 1359011 - Make the mozilla/recommended eslint configuration the default for the whole tree. https://reviewboard.mozilla.org/r/140976/#review144618
Attachment #8869344 - Flags: review?(dtownsend) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/32ba9f887603 Make the mozilla/recommended eslint configuration the default for the whole tree. r=mossop
You need to log in before you can comment on or make changes to this bug.