stylelint-config-recommended-less
Advanced tools
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"] | ||
} | ||
} | ||
``` | ||
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
20
3241
5
25
+ Addedpostcss-less@^6.0.0
+ Addedpostcss-less@6.0.0(transitive)
+ Addedstylelint-config-recommended@13.0.0(transitive)
+ Addedstylelint-less@2.0.0(transitive)
- Removedstylelint@^14.0
- Removed@csstools/selector-specificity@2.2.0(transitive)
- Removed@types/parse-json@4.0.2(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedcamelcase-keys@6.2.2(transitive)
- Removedcosmiconfig@7.1.0(transitive)
- Removedfile-entry-cache@6.0.1(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedhosted-git-info@2.8.9(transitive)
- Removedindent-string@4.0.0(transitive)
- Removedknown-css-properties@0.26.0(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedmeow@9.0.0(transitive)
- Removednormalize-package-data@2.5.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpostcss-media-query-parser@0.2.3(transitive)
- Removedquick-lru@4.0.1(transitive)
- Removedread-pkg@5.2.0(transitive)
- Removedread-pkg-up@7.0.1(transitive)
- Removedredent@3.0.0(transitive)
- Removedresolve@1.22.8(transitive)
- Removedsemver@5.7.2(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstrip-indent@3.0.0(transitive)
- Removedstylelint@14.16.1(transitive)
- Removedstylelint-config-recommended@6.0.0(transitive)
- Removedstylelint-less@1.0.8(transitive)
- Removedsupports-hyperlinks@2.3.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedtrim-newlines@3.0.1(transitive)
- Removedtype-fest@0.18.10.6.00.8.1(transitive)
- Removedv8-compile-cache@2.4.0(transitive)
- Removedwrite-file-atomic@4.0.2(transitive)
- Removedyaml@1.10.2(transitive)
Updatedstylelint-less@^2.0.0