Assign stylelint
to global, not lint
This commit is contained in:
parent
5b2cd77035
commit
cbe6decb03
|
@ -71,14 +71,14 @@
|
|||
|
||||
CodeMirror.registerHelper('lint', 'stylelint', text => {
|
||||
const found = [];
|
||||
window.stylelint = require('stylelint').lint;
|
||||
window.stylelint = require('stylelint');
|
||||
if (window.stylelint) {
|
||||
return BG.chromeLocal.getValue('editorStylelintRules').then((rules = stylelintDefaultConfig.rules) => {
|
||||
// stylelintDefaultConfig stored in stylelint-config.js & loaded by edit/lint.js
|
||||
if (Object.keys(rules).length === 0) {
|
||||
rules = stylelintDefaultConfig.rules;
|
||||
}
|
||||
return stylelint({
|
||||
return stylelint.lint({
|
||||
code: text,
|
||||
config: {
|
||||
syntax: stylelintDefaultConfig.syntax,
|
||||
|
|
Loading…
Reference in New Issue
Block a user