Closed Bug 1361976 Opened 7 years ago Closed 7 years ago

ESLint hooks should ensure that the ESLint setup is up to date

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file)

Some things, e.g. globals, are contained within eslint-plugin-mozilla. We therefore want to make sure it is as up to date as possible so that we get the latest config.

Additionally, now we have hooks, developers may not be running ./mach eslint as much and hence this will ensure it is more likely to be kept updated.
Comment on attachment 8865467 [details]
Bug 1361976 - ESLint hooks should ensure that the ESLint setup is up to date.

https://reviewboard.mozilla.org/r/137120/#review142788

I'm not totally sold on putting this into the hooks but I guess we can see how it works out.

::: tools/lint/eslint/setup_helper.py:39
(Diff revision 1)
>  VERSION_RE = re.compile(r"^\d+\.\d+\.\d+$")
>  CARET_VERSION_RANGE_RE = re.compile(r"^\^((\d+)\.\d+\.\d+)$")
>  
> +# These two should be kept in sync.
>  EXTENSIONS = ['.js', '.jsm', '.jsx', '.xml', '.html', '.xhtml']
> +EXTENSIONS_RE = re.compile(r'.+\.(?:js|jsm|jsx|xml|html|xhtml)$')

Surely we can do this automatically.
Comment on attachment 8865467 [details]
Bug 1361976 - ESLint hooks should ensure that the ESLint setup is up to date.

https://reviewboard.mozilla.org/r/137122/#review142786

::: tools/lint/eslint/setup_helper.py:39
(Diff revision 1)
>  VERSION_RE = re.compile(r"^\d+\.\d+\.\d+$")
>  CARET_VERSION_RANGE_RE = re.compile(r"^\^((\d+)\.\d+\.\d+)$")
>  
> +# These two should be kept in sync.
>  EXTENSIONS = ['.js', '.jsm', '.jsx', '.xml', '.html', '.xhtml']
> +EXTENSIONS_RE = re.compile(r'.+\.(?:js|jsm|jsx|xml|html|xhtml)$')

Surely we can do that automatically?
Attachment #8865467 - Flags: review?(dtownsend) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ac59d773e2c2
ESLint hooks should ensure that the ESLint setup is up to date. r=mossop
Looks like I somehow got the patches messed up :-( Mozreview was also not giving decent interdiffs (and still isn't). However, I've got the right thing now which will hopefully work this time.
Flags: needinfo?(standard8)
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/23e285c5aa70
ESLint hooks should ensure that the ESLint setup is up to date. r=mossop
https://hg.mozilla.org/mozilla-central/rev/23e285c5aa70
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Product: Testing → Firefox Build System
Version: Version 3 → 3 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: