first commit
This commit is contained in:
20
node_modules/stylelint-config-standard/LICENSE
generated
vendored
Normal file
20
node_modules/stylelint-config-standard/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 - present stylelint authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
128
node_modules/stylelint-config-standard/README.md
generated
vendored
Normal file
128
node_modules/stylelint-config-standard/README.md
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
# stylelint-config-standard
|
||||
|
||||
[](https://www.npmjs.org/package/stylelint-config-standard) [](https://github.com/stylelint/stylelint-config-standard/actions)
|
||||
|
||||
> The standard shareable config for Stylelint.
|
||||
|
||||
It extends [`stylelint-config-recommended`](https://github.com/stylelint/stylelint-config-recommended) and turns on additional rules to enforce modern conventions found in the [CSS specifications](https://www.w3.org/Style/CSS/current-work).
|
||||
|
||||
To see the rules that this config uses, please read the [config itself](./index.js).
|
||||
|
||||
## Example
|
||||
|
||||
```css
|
||||
@import url("foo.css");
|
||||
@import url("bar.css");
|
||||
|
||||
@custom-media --foo (min-width: 30em);
|
||||
|
||||
/**
|
||||
* Multi-line comment
|
||||
*/
|
||||
|
||||
:root {
|
||||
--brand-red: hsl(5deg 10% 40%);
|
||||
}
|
||||
|
||||
/* Single-line comment */
|
||||
|
||||
.class-foo:not(a, div) {
|
||||
margin: 0;
|
||||
top: calc(100% - 2rem);
|
||||
}
|
||||
|
||||
/* Flush single line comment */
|
||||
@media (width >= 60em) {
|
||||
#id-bar {
|
||||
/* Flush to parent comment */
|
||||
--offset: 0px;
|
||||
|
||||
color: #fff;
|
||||
font-family: Helvetica, "Arial Black", sans-serif;
|
||||
left: calc(var(--offset) + 50%);
|
||||
}
|
||||
|
||||
/* Flush nested single line comment */
|
||||
a::after {
|
||||
display: block;
|
||||
content: "→";
|
||||
background-image: url("x.svg");
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
_Note: the config is tested against this example, as such the example contains plenty of CSS syntax and features._
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install stylelint-config-standard --save-dev
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Set your Stylelint config to:
|
||||
|
||||
```json
|
||||
{
|
||||
"extends": "stylelint-config-standard"
|
||||
}
|
||||
```
|
||||
|
||||
### Extending the config
|
||||
|
||||
Add a `"rules"` key to your config, then add your overrides and additions there.
|
||||
|
||||
You can turn off rules by setting its value to `null`. For example:
|
||||
|
||||
```json
|
||||
{
|
||||
"extends": "stylelint-config-standard",
|
||||
"rules": {
|
||||
"selector-class-pattern": null
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Or lower the severity of a rule to a warning using the `severity` secondary option. For example:
|
||||
|
||||
```json
|
||||
{
|
||||
"extends": "stylelint-config-standard",
|
||||
"rules": {
|
||||
"property-no-vendor-prefix": [
|
||||
true,
|
||||
{
|
||||
"severity": "warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Or to add a rule, For example, the `unit-allowed-list` one:
|
||||
|
||||
```json
|
||||
{
|
||||
"extends": "stylelint-config-standard",
|
||||
"rules": {
|
||||
"unit-allowed-list": ["em", "rem", "s"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
We recommend adding more of [Stylelint's rules](https://stylelint.io/user-guide/rules/) to your config as these rules need to be configured to suit your specific needs.
|
||||
|
||||
## [Changelog](CHANGELOG.md)
|
||||
|
||||
## [License](LICENSE)
|
||||
121
node_modules/stylelint-config-standard/index.js
generated
vendored
Normal file
121
node_modules/stylelint-config-standard/index.js
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
extends: 'stylelint-config-recommended',
|
||||
rules: {
|
||||
'alpha-value-notation': [
|
||||
'percentage',
|
||||
{
|
||||
exceptProperties: [
|
||||
'opacity',
|
||||
'fill-opacity',
|
||||
'flood-opacity',
|
||||
'stop-opacity',
|
||||
'stroke-opacity',
|
||||
],
|
||||
},
|
||||
],
|
||||
'at-rule-empty-line-before': [
|
||||
'always',
|
||||
{
|
||||
except: ['blockless-after-same-name-blockless', 'first-nested'],
|
||||
ignore: ['after-comment'],
|
||||
},
|
||||
],
|
||||
'at-rule-no-vendor-prefix': true,
|
||||
'color-function-notation': 'modern',
|
||||
'color-hex-length': 'short',
|
||||
'comment-empty-line-before': [
|
||||
'always',
|
||||
{
|
||||
except: ['first-nested'],
|
||||
ignore: ['stylelint-commands'],
|
||||
},
|
||||
],
|
||||
'comment-whitespace-inside': 'always',
|
||||
'custom-property-empty-line-before': [
|
||||
'always',
|
||||
{
|
||||
except: ['after-custom-property', 'first-nested'],
|
||||
ignore: ['after-comment', 'inside-single-line-block'],
|
||||
},
|
||||
],
|
||||
'custom-media-pattern': [
|
||||
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
||||
{
|
||||
message: (name) => `Expected custom media query name "${name}" to be kebab-case`,
|
||||
},
|
||||
],
|
||||
'custom-property-pattern': [
|
||||
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
||||
{
|
||||
message: (name) => `Expected custom property name "${name}" to be kebab-case`,
|
||||
},
|
||||
],
|
||||
'declaration-block-no-redundant-longhand-properties': true,
|
||||
'declaration-block-single-line-max-declarations': 1,
|
||||
'declaration-empty-line-before': [
|
||||
'always',
|
||||
{
|
||||
except: ['after-declaration', 'first-nested'],
|
||||
ignore: ['after-comment', 'inside-single-line-block'],
|
||||
},
|
||||
],
|
||||
'font-family-name-quotes': 'always-where-recommended',
|
||||
'function-name-case': 'lower',
|
||||
'function-url-quotes': 'always',
|
||||
'hue-degree-notation': 'angle',
|
||||
'import-notation': 'url',
|
||||
'keyframe-selector-notation': 'percentage-unless-within-keyword-only-block',
|
||||
'keyframes-name-pattern': [
|
||||
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
||||
{
|
||||
message: (name) => `Expected keyframe name "${name}" to be kebab-case`,
|
||||
},
|
||||
],
|
||||
'length-zero-no-unit': [
|
||||
true,
|
||||
{
|
||||
ignore: ['custom-properties'],
|
||||
},
|
||||
],
|
||||
'lightness-notation': 'percentage',
|
||||
'media-feature-name-no-vendor-prefix': true,
|
||||
'media-feature-range-notation': 'context',
|
||||
'number-max-precision': 4,
|
||||
'property-no-vendor-prefix': true,
|
||||
'rule-empty-line-before': [
|
||||
'always-multi-line',
|
||||
{
|
||||
except: ['first-nested'],
|
||||
ignore: ['after-comment'],
|
||||
},
|
||||
],
|
||||
'selector-attribute-quotes': 'always',
|
||||
'selector-class-pattern': [
|
||||
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
||||
{
|
||||
message: (selector) => `Expected class selector "${selector}" to be kebab-case`,
|
||||
},
|
||||
],
|
||||
'selector-id-pattern': [
|
||||
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
||||
{
|
||||
message: (selector) => `Expected id selector "${selector}" to be kebab-case`,
|
||||
},
|
||||
],
|
||||
'selector-no-vendor-prefix': true,
|
||||
'selector-not-notation': 'complex',
|
||||
'selector-pseudo-element-colon-notation': 'double',
|
||||
'selector-type-case': 'lower',
|
||||
'shorthand-property-no-redundant-values': true,
|
||||
'value-keyword-case': 'lower',
|
||||
'value-no-vendor-prefix': [
|
||||
true,
|
||||
{
|
||||
// `-webkit-box` is allowed as standard. See https://www.w3.org/TR/css-overflow-3/#webkit-line-clamp
|
||||
ignoreValues: ['box', 'inline-box'],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
80
node_modules/stylelint-config-standard/package.json
generated
vendored
Normal file
80
node_modules/stylelint-config-standard/package.json
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"name": "stylelint-config-standard",
|
||||
"version": "36.0.1",
|
||||
"description": "Standard shareable config for Stylelint",
|
||||
"keywords": [
|
||||
"stylelint",
|
||||
"stylelint-config",
|
||||
"standard"
|
||||
],
|
||||
"repository": "stylelint/stylelint-config-standard",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/stylelint"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/stylelint"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": "Stylelint",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"format": "prettier . --write",
|
||||
"prepare": "husky",
|
||||
"lint:formatting": "prettier . --check",
|
||||
"lint:js": "eslint . --ignore-path .gitignore",
|
||||
"lint:md": "remark . --quiet --frail --ignore-path .gitignore",
|
||||
"lint": "npm-run-all --parallel lint:*",
|
||||
"release": "np --no-release-draft",
|
||||
"pretest": "npm run lint",
|
||||
"test": "node --test",
|
||||
"watch": "npm test --ignore-scripts -- --watch"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": "eslint --cache --fix",
|
||||
"*.{js,md,yml}": "prettier --write"
|
||||
},
|
||||
"prettier": "@stylelint/prettier-config",
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"stylelint"
|
||||
],
|
||||
"globals": {
|
||||
"module": true,
|
||||
"require": true
|
||||
}
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"@stylelint/remark-preset"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"stylelint-config-recommended": "^14.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@stylelint/prettier-config": "^3.0.0",
|
||||
"@stylelint/remark-preset": "^5.1.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-stylelint": "^21.0.0",
|
||||
"husky": "^9.0.11",
|
||||
"lint-staged": "^15.2.7",
|
||||
"np": "^10.0.6",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^3.3.2",
|
||||
"remark-cli": "^12.0.1",
|
||||
"stylelint": "^16.2.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"stylelint": "^16.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.12.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user