mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
14685fa5e9
This replaces the eslintvalidate hooks with an error message prompting the user to upgrade to tools/lint/hooks.py. The reasons for deprecating eslintvalidate are twofold: 1) It only runs eslint, so developers might miss errors from other linters. 2) It isn't as well maintained, and I've started to see reports of problems in the wild. It doesn't make sense to maintain two sets of hooks that do the same thing. MozReview-Commit-ID: CseeVIof2om --HG-- extra : rebase_source : e859c368d14cd1bf7e7d85f0de5bbb89e88402d9
31 lines
669 B
Python
Executable File
31 lines
669 B
Python
Executable File
#!/usr/bin/python
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
import sys
|
|
|
|
OBSOLETE = """
|
|
ERROR: the eslintvalidate hook is obsolete. This commit went
|
|
through, but ESlint didn't run. You can lint your changes
|
|
after the fact by running:
|
|
|
|
$ mach lint --outgoing
|
|
|
|
Please remove this hook and upgrade by following these
|
|
instructions:
|
|
https://firefox-source-docs.mozilla.org/tools/lint/usage.html#using-a-vcs-hook
|
|
""".lstrip()
|
|
|
|
|
|
def output(message):
|
|
print >> sys.stderr, message
|
|
|
|
|
|
def eslint():
|
|
output(OBSOLETE)
|
|
return False
|
|
|
|
|
|
if __name__ == '__main__':
|
|
eslint()
|