@azat-io/stylelint-config 0.1.1 → 1.1.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.
@@ -0,0 +1,2 @@
1
+ declare const _default: import('stylelint-define-config').StylelintConfig;
2
+ export default _default;
package/dist/index.js CHANGED
@@ -1 +1,165 @@
1
- "use strict";const t={extends:["stylelint-config-recess-order"],plugins:["stylelint-gamut","stylelint-plugin-logical-css"],rules:{"alpha-value-notation":"percentage","annotation-no-unknown":!0,"at-rule-empty-line-before":["always",{except:["blockless-after-same-name-blockless","first-nested"]}],"at-rule-no-vendor-prefix":!0,"block-no-empty":!0,"color-function-notation":"modern","color-named":"never","color-no-hex":!0,"comment-empty-line-before":["always",{except:["first-nested"],ignore:["stylelint-commands"]}],"comment-no-empty":!0,"comment-whitespace-inside":"always","custom-media-pattern":["^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",{message:e=>`Expected custom media query name "${e}" to be kebab-case`}],"custom-property-no-missing-var-function":!0,"custom-property-pattern":["^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",{message:e=>`Expected custom property name "${e}" to be kebab-case`}],"declaration-block-no-duplicate-custom-properties":!0,"declaration-block-no-duplicate-properties":[!0,{ignore:["consecutive-duplicates-with-different-syntaxes"]}],"declaration-block-no-redundant-longhand-properties":!0,"declaration-block-no-shorthand-property-overrides":!0,"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","font-family-no-duplicate-names":!0,"font-family-no-missing-generic-family-keyword":!0,"function-calc-no-unspaced-operator":!0,"function-disallowed-list":["rgb","rgba","hsl","hsla"],"function-linear-gradient-no-nonstandard-direction":!0,"function-name-case":"lower","function-no-unknown":!0,"function-url-quotes":"always","hue-degree-notation":"number","import-notation":"url","keyframe-block-no-duplicate-selectors":!0,"keyframe-declaration-no-important":!0,"keyframe-selector-notation":"percentage","keyframes-name-pattern":["^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",{message:e=>`Expected keyframe name "${e}" to be kebab-case`}],"length-zero-no-unit":[!0,{ignore:["custom-properties"]}],"media-feature-name-no-vendor-prefix":!0,"media-feature-name-no-unknown":!0,"media-feature-range-notation":"context","media-query-no-invalid":!0,"named-grid-areas-no-invalid":!0,"no-descending-specificity":!0,"no-duplicate-at-import-rules":!0,"no-duplicate-selectors":!0,"no-invalid-double-slash-comments":!0,"no-invalid-position-at-import-rule":!0,"number-max-precision":4,"property-no-vendor-prefix":!0,"property-no-unknown":!0,"rule-empty-line-before":["always-multi-line",{except:["first-nested"],ignore:["after-comment"]}],"selector-anb-no-unmatchable":!0,"selector-attribute-quotes":"always","selector-class-pattern":["^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",{message:e=>`Expected class selector "${e}" to be kebab-case`}],"selector-id-pattern":["^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",{message:e=>`Expected id selector "${e}" to be kebab-case`}],"selector-no-vendor-prefix":!0,"selector-not-notation":"complex","selector-pseudo-class-no-unknown":[!0,{ignorePseudoClasses:["global"]}],"selector-pseudo-element-no-unknown":!0,"selector-pseudo-element-colon-notation":"double","selector-type-case":"lower","selector-type-no-unknown":[!0,{ignore:["custom-elements"]}],"shorthand-property-no-redundant-values":!0,"string-no-newline":!0,"unit-no-unknown":!0,"value-keyword-case":"lower","value-no-vendor-prefix":!0,"gamut/color-no-out-gamut-range":!0,"plugin/use-logical-properties-and-values":!0,"plugin/use-logical-units":!0}};module.exports=t;
1
+ function t(o) {
2
+ return o;
3
+ }
4
+ var p = t;
5
+ const index = p({
6
+ extends: ["stylelint-config-recess-order"],
7
+ plugins: [
8
+ "stylelint-gamut",
9
+ "stylelint-plugin-defensive-css",
10
+ "stylelint-plugin-logical-css",
11
+ "stylelint-use-nesting"
12
+ ],
13
+ rules: {
14
+ "alpha-value-notation": "percentage",
15
+ "annotation-no-unknown": true,
16
+ "at-rule-descriptor-no-unknown": true,
17
+ "at-rule-descriptor-value-no-unknown": true,
18
+ "at-rule-empty-line-before": [
19
+ "always",
20
+ {
21
+ except: ["blockless-after-same-name-blockless", "first-nested"]
22
+ }
23
+ ],
24
+ "at-rule-no-deprecated": true,
25
+ "at-rule-no-unknown": true,
26
+ "at-rule-no-vendor-prefix": true,
27
+ "at-rule-prelude-no-invalid": true,
28
+ "block-no-empty": true,
29
+ "color-function-notation": "modern",
30
+ "color-named": "never",
31
+ "color-no-hex": true,
32
+ "comment-empty-line-before": [
33
+ "always",
34
+ {
35
+ except: ["first-nested"],
36
+ ignore: ["stylelint-commands"]
37
+ }
38
+ ],
39
+ "comment-no-empty": true,
40
+ "comment-whitespace-inside": "always",
41
+ "custom-media-pattern": [
42
+ "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
43
+ {
44
+ message: (name) => `Expected custom media query name "${name}" to be kebab-case`
45
+ }
46
+ ],
47
+ "custom-property-empty-line-before": "never",
48
+ "custom-property-no-missing-var-function": true,
49
+ "custom-property-pattern": [
50
+ "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
51
+ {
52
+ message: (name) => `Expected custom property name "${name}" to be kebab-case`
53
+ }
54
+ ],
55
+ "declaration-block-no-duplicate-custom-properties": true,
56
+ "declaration-block-no-duplicate-properties": [
57
+ true,
58
+ {
59
+ ignore: ["consecutive-duplicates-with-different-syntaxes"]
60
+ }
61
+ ],
62
+ "declaration-block-no-redundant-longhand-properties": true,
63
+ "declaration-block-no-shorthand-property-overrides": true,
64
+ "declaration-block-single-line-max-declarations": 1,
65
+ "declaration-empty-line-before": "never",
66
+ "declaration-property-value-keyword-no-deprecated": true,
67
+ "declaration-property-value-no-unknown": true,
68
+ "font-family-name-quotes": "always-where-recommended",
69
+ "font-family-no-duplicate-names": true,
70
+ "font-family-no-missing-generic-family-keyword": true,
71
+ "font-weight-notation": "named-where-possible",
72
+ "function-calc-no-unspaced-operator": true,
73
+ "function-disallowed-list": ["rgb", "rgba", "hsl", "hsla"],
74
+ "function-linear-gradient-no-nonstandard-direction": true,
75
+ "function-name-case": "lower",
76
+ "function-no-unknown": true,
77
+ "function-url-quotes": "always",
78
+ "hue-degree-notation": "angle",
79
+ "import-notation": "url",
80
+ "keyframe-block-no-duplicate-selectors": true,
81
+ "keyframe-declaration-no-important": true,
82
+ "keyframe-selector-notation": "percentage",
83
+ "keyframes-name-pattern": [
84
+ "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
85
+ {
86
+ message: (name) => `Expected keyframe name "${name}" to be kebab-case`
87
+ }
88
+ ],
89
+ "length-zero-no-unit": [
90
+ true,
91
+ {
92
+ ignore: ["custom-properties"]
93
+ }
94
+ ],
95
+ "lightness-notation": "percentage",
96
+ "media-feature-name-no-unknown": true,
97
+ "media-feature-name-no-vendor-prefix": true,
98
+ "media-feature-name-value-no-unknown": true,
99
+ "media-feature-range-notation": "context",
100
+ "media-query-no-invalid": true,
101
+ "named-grid-areas-no-invalid": true,
102
+ "no-descending-specificity": true,
103
+ "no-duplicate-at-import-rules": true,
104
+ "no-duplicate-selectors": true,
105
+ "no-invalid-double-slash-comments": true,
106
+ "no-invalid-position-at-import-rule": true,
107
+ "no-unknown-animations": true,
108
+ "no-unknown-custom-media": true,
109
+ "number-max-precision": 4,
110
+ "property-no-unknown": true,
111
+ "property-no-vendor-prefix": true,
112
+ "rule-empty-line-before": [
113
+ "always-multi-line",
114
+ {
115
+ except: ["first-nested"],
116
+ ignore: ["after-comment"]
117
+ }
118
+ ],
119
+ "selector-anb-no-unmatchable": true,
120
+ "selector-attribute-quotes": "always",
121
+ "selector-class-pattern": [
122
+ "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
123
+ {
124
+ message: (selector) => `Expected class selector "${selector}" to be kebab-case`
125
+ }
126
+ ],
127
+ "selector-id-pattern": [
128
+ "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
129
+ {
130
+ message: (selector) => `Expected id selector "${selector}" to be kebab-case`
131
+ }
132
+ ],
133
+ "selector-no-vendor-prefix": true,
134
+ "selector-not-notation": "complex",
135
+ "selector-pseudo-class-no-unknown": [
136
+ true,
137
+ {
138
+ ignorePseudoClasses: ["global"]
139
+ }
140
+ ],
141
+ "selector-pseudo-element-colon-notation": "double",
142
+ "selector-pseudo-element-no-unknown": true,
143
+ "selector-type-case": "lower",
144
+ "selector-type-no-unknown": [
145
+ true,
146
+ {
147
+ ignore: ["custom-elements"]
148
+ }
149
+ ],
150
+ "shorthand-property-no-redundant-values": true,
151
+ "string-no-newline": true,
152
+ "syntax-string-no-invalid": true,
153
+ "unit-no-unknown": true,
154
+ "value-keyword-case": "lower",
155
+ "value-no-vendor-prefix": true,
156
+ "gamut/color-no-out-gamut-range": true,
157
+ "plugin/use-defensive-css": true,
158
+ "plugin/use-logical-properties-and-values": true,
159
+ "plugin/use-logical-units": true,
160
+ "csstools/use-nesting": "always"
161
+ }
162
+ });
163
+ export {
164
+ index as default
165
+ };
@@ -1,4 +1,4 @@
1
- The MIT License (MIT)
1
+ # The MIT License (MIT)
2
2
 
3
3
  Copyright 2023 Azat S. <to@azat.io>
4
4
 
package/package.json CHANGED
@@ -1,10 +1,7 @@
1
1
  {
2
2
  "name": "@azat-io/stylelint-config",
3
+ "version": "1.1.0",
3
4
  "description": "Stylelint shareable config",
4
- "version": "0.1.1",
5
- "repository": "azat-io/stylelint-config",
6
- "author": "Azat S. <to@azat.io>",
7
- "license": "MIT",
8
5
  "keywords": [
9
6
  "stylelint",
10
7
  "stylelint-config",
@@ -12,18 +9,29 @@
12
9
  "code-styles",
13
10
  "linter"
14
11
  ],
15
- "publishConfig": {
16
- "access": "public"
17
- },
12
+ "repository": "azat-io/stylelint-config",
13
+ "license": "MIT",
14
+ "author": "Azat S. <to@azat.io>",
15
+ "type": "module",
16
+ "main": "./dist/index.js",
18
17
  "files": [
19
18
  "./dist"
20
19
  ],
21
- "main": "./dist/index.js",
20
+ "dependencies": {
21
+ "stylelint-config-recess-order": "^7.1.0",
22
+ "stylelint-gamut": "^1.3.4",
23
+ "stylelint-order": "^7.0.0",
24
+ "stylelint-plugin-defensive-css": "^1.0.4",
25
+ "stylelint-plugin-logical-css": "^1.2.3",
26
+ "stylelint-use-nesting": "^6.0.0"
27
+ },
22
28
  "peerDependencies": {
23
- "stylelint": "^15.10.3",
24
- "stylelint-config-recess-order": "^4.3.0",
25
- "stylelint-gamut": "^1.3.3",
26
- "stylelint-order": "^6.0.3",
27
- "stylelint-plugin-logical-css": "^0.13.1"
29
+ "stylelint": "^16.0.0"
30
+ },
31
+ "engines": {
32
+ "node": ">=18.0.0"
33
+ },
34
+ "publishConfig": {
35
+ "access": "public"
28
36
  }
29
37
  }
package/readme.md CHANGED
@@ -1,22 +1,29 @@
1
1
  # Stylelint Config
2
2
 
3
- <img src="https://github-production-user-asset-6210df.s3.amazonaws.com/5698350/262110536-5a5be71e-1ba0-4d14-b819-6e416fb98fbe.svg" alt="Stylelint" align="right" width="150" height="150" />
3
+ <img
4
+ src="https://raw.githubusercontent.com/azat-io/stylelint-config/main/assets/logo.svg"
5
+ alt="Stylelint Config Logo"
6
+ align="right"
7
+ width="160"
8
+ height="160"
9
+ />
4
10
 
5
- ![Version](https://img.shields.io/npm/v/@azat-io/stylelint-config.svg?color=brightgreen)
11
+ [![Version](https://img.shields.io/npm/v/@azat-io/stylelint-config.svg?color=fff&labelColor=000)](https://npmjs.com/package/@azat-io/stylelint-config)
12
+ [![GitHub License](https://img.shields.io/badge/license-MIT-232428.svg?color=fff&labelColor=000)](https://github.com/azat-io/stylelint-config/blob/main/license.md)
6
13
 
7
- Stylelint sharable config.
14
+ A comprehensive and flexible Stylelint configuration that supports diverse CSS frameworks, preprocessors, and styling approaches. Seamlessly enforce clean, consistent styling standards across projects by enabling rules for specific tools and methodologies.
8
15
 
9
- See [docs](https://github.com/azat-io/stylelint-config/blob/main/docs.md) for a list of all rules.
16
+ This config delivers multiple styling setups through a single, intuitive import, ensuring consistency across different project architectures and CSS technologies.
10
17
 
11
18
  ## Installation
12
19
 
13
20
  1. Install package:
14
21
 
15
22
  ```sh
16
- pnpm add --save-dev stylelint @azat-io/stylelint-config stylelint-config-recess-order stylelint-gamut stylelint-plugin-logical-css stylelint-order
23
+ pnpm add --save-dev stylelint @azat-io/stylelint-config
17
24
  ```
18
25
 
19
- 2. Create ESLint configuration file `.stylelintrc`:
26
+ 2. Create Stylelint configuration file `.stylelintrc`:
20
27
 
21
28
  ```json
22
29
  {
@@ -29,11 +36,21 @@ pnpm add --save-dev stylelint @azat-io/stylelint-config stylelint-config-recess-
29
36
  ```js
30
37
  {
31
38
  "scripts": {
32
- "lint": "stylelint **/*.css",
39
+ "test:css": "stylelint \"**/*.css\"",
33
40
  }
34
41
  }
35
42
  ```
36
43
 
44
+ ## Plugins
45
+
46
+ This config uses the following plugins:
47
+
48
+ - [stylelint-gamut](https://github.com/fpetrakov/stylelint-gamut)
49
+ - [stylelint-plugin-defensive-css](https://github.com/yuschick/stylelint-plugin-defensive-css)
50
+ - [stylelint-plugin-logical-css](https://github.com/yuschick/stylelint-plugin-logical-css)
51
+ - [stylelint-order](https://github.com/hudochenkov/stylelint-order)
52
+ - [stylelint-use-nesting](https://github.com/csstools/stylelint-use-nesting)
53
+
37
54
  ## See also
38
55
 
39
56
  - [`@azat-io/eslint-config`](https://github.com/azat-io/eslint-config)