gecko-dev/tools/lint/mach_commands.py

64 строки
2.2 KiB
Python
Исходник Обычный вид История

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function, unicode_literals
Bug 1271734 - Move all eslint related infrastructure to tools/lint, r=miker This commit simply moves 'testing/eslint' to 'tools/lint/eslint' and the eslint related mach command from 'python/mach_commands.py' to 'tools/lint/mach_commands.py'. It shouldn't have any functional change on running eslint, either through mach or taskcluster. This is in preparation for bug 1258341, to make the diffs there a little easier to read. MozReview-Commit-ID: K03sn9lv9Lv --HG-- rename : testing/eslint/eslint-plugin-mozilla/LICENSE => tools/lint/eslint/eslint-plugin-mozilla/LICENSE rename : testing/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/index.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/index.rst rename : testing/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst rename : testing/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst rename : testing/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst rename : testing/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst rename : testing/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst rename : testing/eslint/eslint-plugin-mozilla/lib/globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/helpers.js => tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js rename : testing/eslint/eslint-plugin-mozilla/lib/index.js => tools/lint/eslint/eslint-plugin-mozilla/lib/index.js rename : testing/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js => tools/lint/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc rename : testing/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js rename : testing/eslint/eslint-plugin-mozilla/moz.build => tools/lint/eslint/eslint-plugin-mozilla/moz.build rename : testing/eslint/eslint-plugin-mozilla/package.json => tools/lint/eslint/eslint-plugin-mozilla/package.json rename : testing/eslint/manifest.tt => tools/lint/eslint/manifest.tt rename : testing/eslint/npm-shrinkwrap.json => tools/lint/eslint/npm-shrinkwrap.json rename : testing/eslint/package.json => tools/lint/eslint/package.json rename : testing/eslint/update => tools/lint/eslint/update extra : rebase_source : bb44b6285acf4625079cb6a3aaca7d9ada778c3a
2016-06-02 22:38:36 +03:00
import argparse
import os
from mozbuild.base import (
MachCommandBase,
)
from mach.decorators import (
CommandArgument,
CommandProvider,
Command,
)
here = os.path.abspath(os.path.dirname(__file__))
def setup_argument_parser():
from mozlint import cli
return cli.MozlintParser()
@CommandProvider
class MachCommands(MachCommandBase):
@Command(
'lint', category='devenv',
description='Run linters.',
parser=setup_argument_parser)
def lint(self, *runargs, **lintargs):
"""Run linters."""
from mozlint import cli
lintargs.setdefault('root', self.topsrcdir)
lintargs['exclude'] = ['obj*', 'tools/lint/test/files']
cli.SEARCH_PATHS.append(here)
self._activate_virtualenv()
return cli.run(*runargs, **lintargs)
Bug 1271734 - Move all eslint related infrastructure to tools/lint, r=miker This commit simply moves 'testing/eslint' to 'tools/lint/eslint' and the eslint related mach command from 'python/mach_commands.py' to 'tools/lint/mach_commands.py'. It shouldn't have any functional change on running eslint, either through mach or taskcluster. This is in preparation for bug 1258341, to make the diffs there a little easier to read. MozReview-Commit-ID: K03sn9lv9Lv --HG-- rename : testing/eslint/eslint-plugin-mozilla/LICENSE => tools/lint/eslint/eslint-plugin-mozilla/LICENSE rename : testing/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/index.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/index.rst rename : testing/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst rename : testing/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst rename : testing/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst rename : testing/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst rename : testing/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst rename : testing/eslint/eslint-plugin-mozilla/lib/globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/helpers.js => tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js rename : testing/eslint/eslint-plugin-mozilla/lib/index.js => tools/lint/eslint/eslint-plugin-mozilla/lib/index.js rename : testing/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js => tools/lint/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc rename : testing/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js rename : testing/eslint/eslint-plugin-mozilla/moz.build => tools/lint/eslint/eslint-plugin-mozilla/moz.build rename : testing/eslint/eslint-plugin-mozilla/package.json => tools/lint/eslint/eslint-plugin-mozilla/package.json rename : testing/eslint/manifest.tt => tools/lint/eslint/manifest.tt rename : testing/eslint/npm-shrinkwrap.json => tools/lint/eslint/npm-shrinkwrap.json rename : testing/eslint/package.json => tools/lint/eslint/package.json rename : testing/eslint/update => tools/lint/eslint/update extra : rebase_source : bb44b6285acf4625079cb6a3aaca7d9ada778c3a
2016-06-02 22:38:36 +03:00
@Command('eslint', category='devenv',
description='Run eslint or help configure eslint for optimal development.')
@CommandArgument('paths', default=None, nargs='*',
help="Paths to file or directories to lint, like "
Bug 1358540 - Change the *.lint files to be *.lint.py to better support editor integration & flake8 linting. r=smacleod MozReview-Commit-ID: 4KK2GZK7xul --HG-- rename : python/mozlint/test/linters/badreturncode.lint => python/mozlint/test/linters/badreturncode.lint.py rename : python/mozlint/test/linters/explicit_path.lint => python/mozlint/test/linters/explicit_path.lint.py rename : python/mozlint/test/linters/external.lint => python/mozlint/test/linters/external.lint.py rename : python/mozlint/test/linters/invalid_exclude.lint => python/mozlint/test/linters/invalid_exclude.lint.py rename : python/mozlint/test/linters/invalid_include.lint => python/mozlint/test/linters/invalid_include.lint.py rename : python/mozlint/test/linters/invalid_type.lint => python/mozlint/test/linters/invalid_type.lint.py rename : python/mozlint/test/linters/missing_attrs.lint => python/mozlint/test/linters/missing_attrs.lint.py rename : python/mozlint/test/linters/missing_definition.lint => python/mozlint/test/linters/missing_definition.lint.py rename : python/mozlint/test/linters/raises.lint => python/mozlint/test/linters/raises.lint.py rename : python/mozlint/test/linters/regex.lint => python/mozlint/test/linters/regex.lint.py rename : python/mozlint/test/linters/string.lint => python/mozlint/test/linters/string.lint.py rename : python/mozlint/test/linters/structured.lint => python/mozlint/test/linters/structured.lint.py rename : tools/lint/eslint.lint => tools/lint/eslint.lint.py rename : tools/lint/flake8.lint => tools/lint/flake8.lint.py rename : tools/lint/wpt.lint => tools/lint/wpt.lint.py rename : tools/lint/wpt_manifest.lint => tools/lint/wpt_manifest.lint.py extra : rebase_source : 97de88e0328e91347192672b848b286df1904ade
2017-04-21 19:31:15 +03:00
"'browser/' Defaults to the "
"current directory if not given.")
Bug 1271734 - Move all eslint related infrastructure to tools/lint, r=miker This commit simply moves 'testing/eslint' to 'tools/lint/eslint' and the eslint related mach command from 'python/mach_commands.py' to 'tools/lint/mach_commands.py'. It shouldn't have any functional change on running eslint, either through mach or taskcluster. This is in preparation for bug 1258341, to make the diffs there a little easier to read. MozReview-Commit-ID: K03sn9lv9Lv --HG-- rename : testing/eslint/eslint-plugin-mozilla/LICENSE => tools/lint/eslint/eslint-plugin-mozilla/LICENSE rename : testing/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/index.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/index.rst rename : testing/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst rename : testing/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst rename : testing/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst rename : testing/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst rename : testing/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst rename : testing/eslint/eslint-plugin-mozilla/lib/globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/helpers.js => tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js rename : testing/eslint/eslint-plugin-mozilla/lib/index.js => tools/lint/eslint/eslint-plugin-mozilla/lib/index.js rename : testing/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js => tools/lint/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc rename : testing/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js rename : testing/eslint/eslint-plugin-mozilla/moz.build => tools/lint/eslint/eslint-plugin-mozilla/moz.build rename : testing/eslint/eslint-plugin-mozilla/package.json => tools/lint/eslint/eslint-plugin-mozilla/package.json rename : testing/eslint/manifest.tt => tools/lint/eslint/manifest.tt rename : testing/eslint/npm-shrinkwrap.json => tools/lint/eslint/npm-shrinkwrap.json rename : testing/eslint/package.json => tools/lint/eslint/package.json rename : testing/eslint/update => tools/lint/eslint/update extra : rebase_source : bb44b6285acf4625079cb6a3aaca7d9ada778c3a
2016-06-02 22:38:36 +03:00
@CommandArgument('-s', '--setup', default=False, action='store_true',
help='Configure eslint for optimal development.')
Bug 1271734 - Move all eslint related infrastructure to tools/lint, r=miker This commit simply moves 'testing/eslint' to 'tools/lint/eslint' and the eslint related mach command from 'python/mach_commands.py' to 'tools/lint/mach_commands.py'. It shouldn't have any functional change on running eslint, either through mach or taskcluster. This is in preparation for bug 1258341, to make the diffs there a little easier to read. MozReview-Commit-ID: K03sn9lv9Lv --HG-- rename : testing/eslint/eslint-plugin-mozilla/LICENSE => tools/lint/eslint/eslint-plugin-mozilla/LICENSE rename : testing/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst rename : testing/eslint/eslint-plugin-mozilla/docs/index.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/index.rst rename : testing/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst rename : testing/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst rename : testing/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst rename : testing/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst rename : testing/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst rename : testing/eslint/eslint-plugin-mozilla/lib/globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/helpers.js => tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js rename : testing/eslint/eslint-plugin-mozilla/lib/index.js => tools/lint/eslint/eslint-plugin-mozilla/lib/index.js rename : testing/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js => tools/lint/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc rename : testing/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js rename : testing/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js rename : testing/eslint/eslint-plugin-mozilla/moz.build => tools/lint/eslint/eslint-plugin-mozilla/moz.build rename : testing/eslint/eslint-plugin-mozilla/package.json => tools/lint/eslint/eslint-plugin-mozilla/package.json rename : testing/eslint/manifest.tt => tools/lint/eslint/manifest.tt rename : testing/eslint/npm-shrinkwrap.json => tools/lint/eslint/npm-shrinkwrap.json rename : testing/eslint/package.json => tools/lint/eslint/package.json rename : testing/eslint/update => tools/lint/eslint/update extra : rebase_source : bb44b6285acf4625079cb6a3aaca7d9ada778c3a
2016-06-02 22:38:36 +03:00
@CommandArgument('-b', '--binary', default=None,
help='Path to eslint binary.')
@CommandArgument('--fix', default=False, action='store_true',
help='Request that eslint automatically fix errors, where possible.')
@CommandArgument('extra_args', nargs=argparse.REMAINDER,
help='Extra args that will be forwarded to eslint.')
def eslint(self, paths, extra_args=[], **kwargs):
self._mach_context.commands.dispatch('lint', self._mach_context,
linters=['eslint'], paths=paths,
argv=extra_args, **kwargs)