forked from coala/coala-bears
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JSStandardBear.py
28 lines (23 loc) · 907 Bytes
/
JSStandardBear.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from coalib.bearlib.abstractions.Linter import linter
from dependency_management.requirements.NpmRequirement import NpmRequirement
@linter(executable='standard',
output_format='regex',
output_regex=r'\s*[^:]+:(?P<line>\d+):(?P<column>\d+):'
r'\s*(?P<message>.+)')
class JSStandardBear:
"""
One JavaScript Style to Rule Them All.
No decisions to make.
No .eslintrc, .jshintrc, or .jscsrc files to manage.
It just works.
"""
LANGUAGES = {'JavaScript', 'JSX'}
REQUIREMENTS = {NpmRequirement('standard', '10')}
AUTHORS = {'The coala developers'}
AUTHORS_EMAILS = {'[email protected]'}
LICENSE = 'AGPL-3.0'
CAN_DETECT = {'Syntax'}
CAN_FIX = {'Formatting'}
SEE_MORE = 'https://standardjs.com/rules.html'
def create_arguments(self, filename, file, config_file):
return (filename, '--verbose')