stylelint
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -1,2 +0,2 @@ | ||
# 3.0.0, 3.0.1 | ||
# 3.0.0-3.0.2 | ||
@@ -3,0 +3,0 @@ * Removed: `nesting-block-opening-brace-space-before` and `nesting-block-opening-brace-newline-before` rules. |
@@ -24,6 +24,10 @@ "use strict"; | ||
var cosmiconfigOptions = {}; | ||
if (options.configFile) { | ||
cosmiconfigOptions.configPath = _path2.default.resolve(process.cwd(), options.configFile); | ||
} | ||
var rootConfigDir = undefined; | ||
return (0, _cosmiconfig2.default)("stylelint", { | ||
configPath: _path2.default.resolve(process.cwd(), options.configFile || "") | ||
}).then(function (result) { | ||
return (0, _cosmiconfig2.default)("stylelint", cosmiconfigOptions).then(function (result) { | ||
rootConfigDir = _path2.default.dirname(result.filepath); | ||
@@ -30,0 +34,0 @@ return augmentConfig(result.config, rootConfigDir); |
@@ -78,3 +78,8 @@ "use strict"; | ||
config.plugins.forEach(function (pluginPath) { | ||
var plugin = require(pluginPath).default; | ||
var pluginImport = require(pluginPath); | ||
// Handle either ES6 or CommonJS modules | ||
var plugin = pluginImport.default || pluginImport; | ||
if (!plugin.ruleName) { | ||
throw (0, _utils.configurationError)("stylelint v3+ requires plugins to expose a ruleName. " + ("The plugin \"" + pluginPath + "\" is not doing this, so will not work ") + "with stylelint v3+. Please file an issue with the plugin to upgrade."); | ||
} | ||
_rules2.default[plugin.ruleName] = plugin.rule; | ||
@@ -81,0 +86,0 @@ }); |
{ | ||
"name": "stylelint", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Modern CSS linter", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -30,6 +30,10 @@ import path from "path" | ||
const cosmiconfigOptions = {} | ||
if (options.configFile) { | ||
cosmiconfigOptions.configPath = path.resolve(process.cwd(), options.configFile) | ||
} | ||
let rootConfigDir | ||
return cosmiconfig("stylelint", { | ||
configPath: path.resolve(process.cwd(), options.configFile || ""), | ||
}).then(result => { | ||
return cosmiconfig("stylelint", cosmiconfigOptions).then(result => { | ||
rootConfigDir = path.dirname(result.filepath) | ||
@@ -36,0 +40,0 @@ return augmentConfig(result.config, rootConfigDir) |
@@ -44,3 +44,12 @@ import postcss from "postcss" | ||
config.plugins.forEach(pluginPath => { | ||
const plugin = require(pluginPath).default | ||
const pluginImport = require(pluginPath) | ||
// Handle either ES6 or CommonJS modules | ||
const plugin = pluginImport.default || pluginImport | ||
if (!plugin.ruleName) { | ||
throw configurationError( | ||
`stylelint v3+ requires plugins to expose a ruleName. ` + | ||
`The plugin "${pluginPath}" is not doing this, so will not work ` + | ||
`with stylelint v3+. Please file an issue with the plugin to upgrade.` | ||
) | ||
} | ||
ruleDefinitions[plugin.ruleName] = plugin.rule | ||
@@ -47,0 +56,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
681519
15191