@move-elevator/stylelint-config-scss 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.stylelintrc.json +39 -0
- package/LICENSE.md +21 -0
- package/README.md +55 -0
- package/package.json +37 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugins": [
|
|
3
|
+
"@stylistic/stylelint-plugin",
|
|
4
|
+
"stylelint-order",
|
|
5
|
+
"stylelint-scss"
|
|
6
|
+
],
|
|
7
|
+
"customSyntax": "postcss-scss",
|
|
8
|
+
"rules": {
|
|
9
|
+
"@stylistic/block-opening-brace-space-before": "always",
|
|
10
|
+
"@stylistic/color-hex-case": "lower",
|
|
11
|
+
"@stylistic/declaration-block-trailing-semicolon": "always",
|
|
12
|
+
"@stylistic/number-leading-zero": "always",
|
|
13
|
+
"@stylistic/string-quotes": "double",
|
|
14
|
+
"@stylistic/unit-case": "lower",
|
|
15
|
+
"block-no-empty": true,
|
|
16
|
+
"color-hex-length": "long",
|
|
17
|
+
"color-named": "never",
|
|
18
|
+
"declaration-block-no-duplicate-properties": true,
|
|
19
|
+
"declaration-block-single-line-max-declarations": 0,
|
|
20
|
+
"max-nesting-depth": [
|
|
21
|
+
4,
|
|
22
|
+
{
|
|
23
|
+
"ignore": [
|
|
24
|
+
"blockless-at-rules"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"no-duplicate-selectors": true,
|
|
29
|
+
"order/properties-alphabetical-order": true,
|
|
30
|
+
"selector-class-pattern": [
|
|
31
|
+
"^([a-z][a-z0-9]*(-[a-z0-9]+)*|[a-z][a-z0-9]*(__[a-z][a-z0-9]+)?(--[a-z][a-z0-9]+)?)$",
|
|
32
|
+
{
|
|
33
|
+
"message": "Class names must be lowercase and follow BEM (for components and layout) or kebab-case (for state classes like .is-active) pattern",
|
|
34
|
+
"resolveNestedSelectors": true
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"selector-pseudo-element-colon-notation": "double"
|
|
38
|
+
}
|
|
39
|
+
}
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 move elevator GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @move-elevator/stylelint-config-scss
|
|
2
|
+
|
|
3
|
+
A shareable Stylelint configuration for SCSS (Sass) projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i -D @move-elevator/stylelint-config-scss
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Peer Dependencies
|
|
12
|
+
|
|
13
|
+
This package requires the following peer dependencies:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm i -D postcss-scss stylelint stylelint-order stylelint-scss @stylistic/stylelint-plugin
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Create a stylelint config file like `.stylelintrc.json` in your project root and extend this configuration:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"extends": "@move-elevator/stylelint-config-scss"
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What's Included
|
|
30
|
+
|
|
31
|
+
This configuration uses `postcss-scss` as the custom syntax and includes the following plugins:
|
|
32
|
+
|
|
33
|
+
- **@stylistic/stylelint-plugin** - Stylistic rules for formatting
|
|
34
|
+
- **stylelint-order** - Property ordering rules
|
|
35
|
+
- **stylelint-scss** - SCSS-specific linting rules
|
|
36
|
+
|
|
37
|
+
### Key Rules
|
|
38
|
+
|
|
39
|
+
| Rule | Setting |
|
|
40
|
+
|-------------------------|---------------------------|
|
|
41
|
+
| Block opening brace | Space before |
|
|
42
|
+
| Color hex case | Lowercase |
|
|
43
|
+
| Color hex length | Long format (`#ffffff`) |
|
|
44
|
+
| Leading zero | Required (`0.5` not `.5`) |
|
|
45
|
+
| Max nesting depth | 4 levels |
|
|
46
|
+
| Named colors | Not allowed |
|
|
47
|
+
| Properties order | Alphabetical |
|
|
48
|
+
| Pseudo-element notation | Double colon (`::before`) |
|
|
49
|
+
| Selector class pattern | BEM or kebab-case |
|
|
50
|
+
| String quotes | Double quotes |
|
|
51
|
+
| Trailing semicolon | Required |
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
[MIT](LICENSE.md)
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@move-elevator/stylelint-config-scss",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Configuration for Stylelint using SCSS (Sass).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "move elevator GmbH",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/move-elevator/stylelint-config-scss.git"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"*.json",
|
|
13
|
+
"*.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"fix:package:normalize": "prettier-package-json --write package.json --use-tabs"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@stylistic/stylelint-plugin": "^4.0.0",
|
|
20
|
+
"postcss-scss": "^4.0.9",
|
|
21
|
+
"stylelint": "^16.26.1",
|
|
22
|
+
"stylelint-order": "^7.0.1",
|
|
23
|
+
"stylelint-scss": "^6.14.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"prettier-package-json": "^2.8.0",
|
|
27
|
+
"semantic-release": "^25.0.2"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"move elevator",
|
|
31
|
+
"scss",
|
|
32
|
+
"stylelint"
|
|
33
|
+
],
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
}
|
|
37
|
+
}
|