Socket
Socket
Sign inDemoInstall

stylelint-config-recommended-less

Package Overview
Dependencies
3
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 2.0.0

29

index.js

@@ -0,9 +1,22 @@

'use strict';
const postcssLess = require('postcss-less');
module.exports = {
extends: ["stylelint-config-recommended"],
plugins: ["stylelint-less"],
rules: {
"at-rule-no-unknown": null,
"less/color-no-invalid-hex": true,
"less/no-duplicate-variables": true
}
};
extends: ['stylelint-config-recommended'],
customSyntax: postcssLess,
plugins: ['stylelint-less'],
rules: {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['plugin'],
},
],
'media-query-no-invalid': null,
'function-no-unknown': null,
'no-invalid-position-at-import-rule': null,
'less/color-no-invalid-hex': true,
'less/no-duplicate-variables': true,
},
};
{
"name": "stylelint-config-recommended-less",
"version": "1.0.4",
"description": "A sharable stylelint config for less",
"main": "index.js",
"dependencies": {
"stylelint": "^14.0",
"stylelint-less": "^1.0.3",
"stylelint-config-recommended": "6.0.0"
},
"author": {
"name": "Sivantarajan",
"url": "https://github.com/ssivanatarajan/"
},
"bugs": {
"url": "https://github.com/ssivanatarajan/stylelint-config-recommended-less/issues"
},
"homepage": "https://github.com/ssivanatarajan/stylelint-config-recommended-less#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/ssivanatarajan/stylelint-config-recommended-less.git"
},
"license": "MIT",
"env": {
"es6": true
},
"keywords": [
"stylelint",
"stylelint-config",
"recommended",
"less"
]
}
"name": "stylelint-config-recommended-less",
"version": "2.0.0",
"description": "The recommended Less config for Stylelint",
"keywords": [
"stylelint",
"stylelint-config",
"recommended",
"less"
],
"homepage": "https://github.com/stylelint-less/stylelint-less#readme",
"bugs": {
"url": "https://github.com/stylelint-less/stylelint-less/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/stylelint-less/stylelint-less.git",
"directory": "packages/stylelint-config-recommended-less"
},
"license": "MIT",
"author": {
"name": "Sivantarajan",
"url": "https://github.com/ssivanatarajan/"
},
"type": "commonjs",
"main": "index.js",
"files": [
"index.js"
],
"dependencies": {
"postcss-less": "^6.0.0",
"stylelint-config-recommended": "^13.0.0",
"stylelint-less": "^2.0.0"
},
"peerDependencies": {
"postcss": "^8.3.3",
"stylelint": "^15.10.2"
},
"peerDependenciesMeta": {
"postcss": {
"optional": true
}
}
}
# stylelint-config-recommended-less
>The recommended shareable Less config for stylelint.
It turns on all the [possible errors](https://github.com/stylelint/stylelint/blob/master/docs/user-guide/rules/list.md#possible-errors) rules within stylelint
The recommended base [Less](https://lesscss.org/) config for [stylelint](https://github.com/stylelint/stylelint).
Use it as is or as a foundation for your own config.
- Uses the [postcss-less](https://github.com/shellscape/postcss-less) custom syntax
- Uses the [stylelint-less](../stylelint-less) plugin
- Extends [stylelint-config-recommended](https://github.com/stylelint/stylelint-config-recommended)
- Configures the rules to be Less specific
## Installation
First install Stylelint and stylelint-less packages
```shell
npm install stylelint-config-recommended-less --save-dev
```
npm install stylelint stylelint-less --save-dev
```
and then install this config
```
npm install stylelint stylelint-config-recommended-less --save-dev
```
## Usage
If you've installed `stylelint-config-recommended-less` locally within your project, just set your `stylelint` config to:
Add the recommended configuration to your `stylelint` config:
```
```json
{
"extends": "stylelint-config-recommended-less"
"extends": ["stylelint-config-recommended-less"]
}
```
If you've globally installed `stylelint-config-recommended-less` using the -g flag, then you'll need to use the absolute path to `stylelint-config-recommended-less` in your config e.g.
```
{
"extends": "/absolute/path/to/stylelint-config-recommended-less"
}
```
## Extending the config
You can add `rules` key to your config there you can override and add new rules
```
{
"extends": "stylelint-config-recommended-less",
"rules": {
"block-no-empty": null,
"unit-whitelist": ["em", "rem", "s"]
}
}
```
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc