Socket
Socket
Sign inDemoInstall

stylelint

Package Overview
Dependencies
Maintainers
3
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylelint - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

CHANGELOG.md

@@ -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 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc