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.1.3 to 3.1.4

10

CHANGELOG.md

@@ -0,9 +1,13 @@

# 3.1.4
* Fixed: stopped hijacking `--config` property in PostCSS and Node.js APIs. Still using it in the CLI.
# 3.1.3
* Fixed: Bug causing preventing the disabling of rules analyzing the `root` node, including: `max-line-length`, `max-empty-lines`, `no-eol-whitespace`, `no-missing-eof-newline`, and `string-quotes`.
* Fixed: Bug causing `rule-properties-order` to get confused by properties with an unspecified order.
* Fixed: bug preventing the disabling of rules analyzing the `root` node, including: `max-line-length`, `max-empty-lines`, `no-eol-whitespace`, `no-missing-eof-newline`, and `string-quotes`.
* Fixed: bug causing `rule-properties-order` to get confused by properties with an unspecified order.
# 3.1.2
* Fixed: Bug causing an error when `null` was used on rules whose primary options are arrays.
* Fixed: bug causing an error when `null` was used on rules whose primary options are arrays.

@@ -10,0 +14,0 @@ # 3.1.1

@@ -24,3 +24,9 @@ "use strict";

var cosmiconfigOptions = {};
// Turn off argv option to avoid hijacking the all-too-common
// --config argument, when this is used in conjunction with other CLI's
// (e.g. webpack)
var cosmiconfigOptions = {
argv: false
};
if (options.configFile) {

@@ -33,2 +39,3 @@ cosmiconfigOptions.configPath = _path2.default.resolve(process.cwd(), options.configFile);

return (0, _cosmiconfig2.default)("stylelint", cosmiconfigOptions).then(function (result) {
if (!result) throw (0, _utils.configurationError)("No configuration found");
rootConfigDir = _path2.default.dirname(result.filepath);

@@ -35,0 +42,0 @@ return augmentConfig(result.config, rootConfigDir);

@@ -27,3 +27,4 @@ #!/usr/bin/env node

f: "string",
q: false
q: false,
config: false
},

@@ -39,3 +40,3 @@ alias: {

var meowOptions = {
help: ["Usage", " stylelint [input] [options]", "", "By default, finding and loading of your configuration object is done with", "cosmiconfig (https://github.com/davidtheclark/cosmiconfig)", "Starting from the current working directory, it will look for the ", "following possible sources, in this order:", "- a stylelint property in package.json", "- a .stylelintrc file in JSON or YAML format", "- a stylelint.config.js file exporting a JS object", "Alternately, you can specify the path to a configuration file with --config.", "", "Input", " File glob(s) (passed to node-glob).", " You can also pass no input and use stdin, instead.", "", "Options", " --config Path to a JSON configuration file.", " --version Get the currently installed version of stylelint.", " --custom-formatter Path to a JS file exporting a custom formatting function", " -f, --formatter Specify a formatter: \"json\" or \"string\". Default is \"string\".", "-q, --quiet Only register warnings for rules with an \"error\"-level severity", " (ignore \"warning\"-level)", " -s, --syntax Specify a non-standard syntax that should be used to ", " parse source stylesheets. Options: \"scss\""],
help: ["Usage", " stylelint [input] [options]", "", "By default, finding and loading of your configuration object is done with", "cosmiconfig (https://github.com/davidtheclark/cosmiconfig)", "Starting from the current working directory, it will look for the ", "following possible sources, in this order:", "- a stylelint property in package.json", "- a .stylelintrc file in JSON or YAML format", "- a stylelint.config.js file exporting a JS object", "Alternately, you can specify the path to a configuration file with --config.", "", "Input", " File glob(s) (passed to node-glob).", " You can also pass no input and use stdin, instead.", "", "Options", " --config Path to a JSON configuration file.", " --version Get the currently installed version of stylelint.", " --custom-formatter Path to a JS file exporting a custom formatting function", " -f, --formatter Specify a formatter: \"json\" or \"string\". Default is \"string\".", " -q, --quiet Only register warnings for rules with an \"error\"-level severity", " (ignore \"warning\"-level)", " -s, --syntax Specify a non-standard syntax that should be used to ", " parse source stylesheets. Options: \"scss\""],
pkg: "../package.json"

@@ -61,2 +62,6 @@ };

if (cli.flags.config) {
optionsBase.configFile = _path2.default.join(process.cwd(), cli.flags.config);
}
Promise.resolve().then(function () {

@@ -63,0 +68,0 @@ // Add input/code into options

@@ -40,5 +40,5 @@ "use strict";

var configPromise = (0, _buildConfig2.default)(options);
return function (root, result) {
var configPromise = (0, _buildConfig2.default)(options);
return function (root, result) {
// result.stylelint is the namespace for passing stylelint-related

@@ -45,0 +45,0 @@ // configuration and data across sub-plugins via the PostCSS Result

{
"name": "stylelint",
"version": "3.1.3",
"version": "3.1.4",
"description": "Modern CSS linter",

@@ -5,0 +5,0 @@ "keywords": [

@@ -30,3 +30,9 @@ import path from "path"

const cosmiconfigOptions = {}
// Turn off argv option to avoid hijacking the all-too-common
// --config argument, when this is used in conjunction with other CLI's
// (e.g. webpack)
const cosmiconfigOptions = {
argv: false,
}
if (options.configFile) {

@@ -39,2 +45,3 @@ cosmiconfigOptions.configPath = path.resolve(process.cwd(), options.configFile)

return cosmiconfig("stylelint", cosmiconfigOptions).then(result => {
if (!result) throw configurationError("No configuration found")
rootConfigDir = path.dirname(result.filepath)

@@ -41,0 +48,0 @@ return augmentConfig(result.config, rootConfigDir)

@@ -13,2 +13,3 @@ #!/usr/bin/env node

q: false,
config: false,
},

@@ -46,3 +47,3 @@ alias: {

" -f, --formatter Specify a formatter: \"json\" or \"string\". Default is \"string\".",
"-q, --quiet Only register warnings for rules with an \"error\"-level severity",
" -q, --quiet Only register warnings for rules with an \"error\"-level severity",
" (ignore \"warning\"-level)",

@@ -74,2 +75,6 @@ " -s, --syntax Specify a non-standard syntax that should be used to ",

if (cli.flags.config) {
optionsBase.configFile = path.join(process.cwd(), cli.flags.config)
}
Promise.resolve().then(() => {

@@ -76,0 +81,0 @@ // Add input/code into options

@@ -11,5 +11,5 @@ import postcss from "postcss"

export default postcss.plugin("stylelint", (options = {}) => {
const configPromise = buildConfig(options)
return (root, result) => {
const configPromise = buildConfig(options)
return (root, result) => {
// result.stylelint is the namespace for passing stylelint-related

@@ -16,0 +16,0 @@ // configuration and data across sub-plugins via the PostCSS Result

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