Как отметил @Gyandeep, нет: http://eslint.org/docs/user-guide/configuring.html#configuring-rules
Я написал сценарий, чтобы сделать его немного менее болезненным для вы:
#!/bin/sh
list=$(curl -silent http://eslint.org/docs/rules/ | grep '(recommended)' | sed -e 's,.*<a .*>\([^<]*\)</a>.*,\1,g' | grep -v 'configuration documentation')
for rule in ${list}; do
echo \"$rule\": 1,
done;
Это будет приводить к:
"comma-dangle": 1,
"no-cond-assign": 1,
"no-console": 1,
"no-constant-condition": 1,
"no-control-regex": 1,
"no-debugger": 1,
"no-dupe-args": 1,
"no-dupe-keys": 1,
"no-duplicate-case": 1,
"no-empty-character-class": 1,
"no-empty": 1,
"no-ex-assign": 1,
"no-extra-boolean-cast": 1,
"no-extra-semi": 1,
"no-func-assign": 1,
"no-inner-declarations": 1,
"no-invalid-regexp": 1,
"no-irregular-whitespace": 1,
"no-negated-in-lhs": 1,
"no-obj-calls": 1,
"no-regex-spaces": 1,
"no-sparse-arrays": 1,
"no-unreachable": 1,
"use-isnan": 1,
"valid-typeof": 1,
"no-fallthrough": 1,
"no-octal": 1,
"no-redeclare": 1,
"no-delete-var": 1,
"no-undef": 1,
"no-unused-vars": 1,
"no-mixed-spaces-and-tabs": 1,
Если вы посмотрите здесь: http://eslint.org/docs/rules/, вы должны будете указать правила, включенные в eslint:recommended
, а затем (recommended)
. Сценарий вытаскивает веб-сайт, geps линии с (recommended)
, а затем использует sed
, чтобы сделать некоторую магию регулярных выражений, которая извлекает правило из тегов привязки.
Не забудьте вынуть последний ,
- я должен оставить что-то для вас сделать;) - и вставить это в .eslintrc
файла между:
"rules": {
...output of script goes here...
}
Если вы не знакомы с bash, не забудьте сделать его исполняемым ... еще проще, просто скопируйте вывод, который я вставил выше! :)
Надеюсь, это поможет.
Nope thats невозможно. Единственный способ - указать каждое правило и предупредить их. – Gyandeep