@taiga-ui/stylelint-config 0.11.0 → 0.12.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.12.2](https://github.com/taiga-family/linters/compare/@taiga-ui/stylelint-config@0.12.1...@taiga-ui/stylelint-config@0.12.2) (2023-12-09)
7
+
8
+ ### Bug Fixes
9
+
10
+ - remove taiga.js ([0ac7645](https://github.com/taiga-family/linters/commit/0ac7645641e51c2dea544ed07cece84dd8373062))
11
+
12
+ # Change Log
13
+
14
+ All notable changes to this project will be documented in this file. See
15
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
16
+
17
+ ## [0.12.1](https://github.com/taiga-family/linters/compare/@taiga-ui/stylelint-config@0.12.0...@taiga-ui/stylelint-config@0.12.1) (2023-12-09)
18
+
19
+ ### Bug Fixes
20
+
21
+ - taiga.js ([fb25bbf](https://github.com/taiga-family/linters/commit/fb25bbf5f939b6b87fb45ac372af59d059365937))
22
+
23
+ # Change Log
24
+
25
+ All notable changes to this project will be documented in this file. See
26
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
27
+
28
+ # [0.12.0](https://github.com/taiga-family/linters/compare/@taiga-ui/stylelint-config@0.11.0...@taiga-ui/stylelint-config@0.12.0) (2023-12-09)
29
+
30
+ ### Bug Fixes
31
+
32
+ - README.md ([aac3853](https://github.com/taiga-family/linters/commit/aac38530501a00136dbe812e0087ca37a9dd76a2))
33
+
34
+ ### Features
35
+
36
+ - **stylelint-config:** support stylelint 16
37
+ ([d7184d3](https://github.com/taiga-family/linters/commit/d7184d3930caceb1f21b2e65ee8151f4fdfc8dc8))
38
+
39
+ # Change Log
40
+
41
+ All notable changes to this project will be documented in this file. See
42
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
43
+
6
44
  # [0.11.0](https://github.com/taiga-family/linters/compare/@taiga-ui/stylelint-config@0.10.1...@taiga-ui/stylelint-config@0.11.0) (2023-12-07)
7
45
 
8
46
  ### Features
package/README.md CHANGED
@@ -10,47 +10,13 @@ Common Stylelint configuration for taiga-ui projects
10
10
  npm i --save-dev @taiga-ui/stylelint-config
11
11
  ```
12
12
 
13
- 1. Create `stylelint.config.js` at project root
13
+ 2. Create `stylelint.config.js` at project root
14
14
 
15
15
  ```json5
16
16
  {
17
- extends: ['@taiga-ui/stylelint-config'],
17
+ extends: ['@taiga-ui/stylelint-config/taiga'],
18
18
  }
19
19
  ```
20
20
 
21
21
  More information about available at
22
22
  [stylelint documentation](https://github.com/stylelint/stylelint/blob/main/docs/user-guide/configure.md)
23
-
24
- ### Available presets
25
-
26
- - **less** - includes prettier config
27
-
28
- ```json5
29
- {
30
- extends: ['@taiga-ui/stylelint-config/less'],
31
- }
32
- ```
33
-
34
- - **angular** - includes prettier config
35
-
36
- ```json5
37
- {
38
- extends: ['@taiga-ui/stylelint-config/angular'],
39
- }
40
- ```
41
-
42
- - **angular-less** - combine angular and less configs
43
-
44
- ```json5
45
- {
46
- extends: ['@taiga-ui/stylelint-config/angular-less'],
47
- }
48
- ```
49
-
50
- - **taiga** - combine angular, less, taiga configs
51
-
52
- ```json5
53
- {
54
- extends: ['@taiga-ui/stylelint-config/taiga'],
55
- }
56
- ```
package/index.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/stylelintrc.json",
3
+ "plugins": ["stylelint-order", "stylelint-no-px"],
4
+ "allowEmptyInput": true,
5
+ "defaultSeverity": "error",
6
+ "customSyntax": "postcss-less",
7
+ "rules": {
8
+ "selector-max-specificity": null,
9
+ "alpha-value-notation": "number",
10
+ "color-function-notation": "legacy",
11
+ "meowtec/no-px": [
12
+ true,
13
+ {
14
+ "ignore": [
15
+ "-5px",
16
+ "-4px",
17
+ "-3px",
18
+ "-2px",
19
+ "-1px",
20
+ "0px",
21
+ "1px",
22
+ "2px",
23
+ "3px",
24
+ "4px",
25
+ "5px",
26
+ "0.1px",
27
+ "0.2px",
28
+ "0.3px",
29
+ "0.4px",
30
+ "0.5px",
31
+ "0.6px",
32
+ "0.7px",
33
+ "0.8px",
34
+ "0.9px"
35
+ ]
36
+ }
37
+ ],
38
+ "order/order": [
39
+ {
40
+ "type": "at-rule",
41
+ "name": "import"
42
+ },
43
+ "custom-properties",
44
+ "dollar-variables",
45
+ "declarations",
46
+ "rules",
47
+ "at-rules"
48
+ ],
49
+ "order/properties-order": [
50
+ [
51
+ "all",
52
+ "content",
53
+ "position",
54
+ {
55
+ "order": "flexible",
56
+ "properties": ["top", "left", "right", "bottom"]
57
+ },
58
+ "z-index",
59
+ "display"
60
+ ],
61
+ {
62
+ "unspecified": "bottom"
63
+ }
64
+ ],
65
+ "selector-pseudo-element-no-unknown": [
66
+ true,
67
+ {
68
+ "ignorePseudoElements": ["ng-deep"]
69
+ }
70
+ ],
71
+ "selector-type-no-unknown": [
72
+ true,
73
+ {
74
+ "ignore": ["custom-elements"],
75
+ "ignoreTypes": ["/^/deep/"]
76
+ }
77
+ ],
78
+ "unit-allowed-list": ["px", "rem", "em", "deg", "s", "ms", "dpcm", "turn", "ch", "%"]
79
+ }
80
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/stylelint-config",
3
- "version": "0.11.0",
3
+ "version": "0.12.2",
4
4
  "description": "Taiga UI stylelint config",
5
5
  "keywords": [
6
6
  "stylelint",
@@ -11,21 +11,20 @@
11
11
  "url": "https://github.com/taiga-family/linters.git"
12
12
  },
13
13
  "license": "Apache-2.0",
14
- "main": "stylelint.config.js",
14
+ "main": "index.json",
15
15
  "dependencies": {
16
16
  "postcss": "8.4.32",
17
17
  "postcss-less": "6.0.0",
18
- "stylelint-config-standard": "34.0.0",
18
+ "stylelint-config-standard": "35.0.0",
19
19
  "stylelint-no-px": "1.0.1",
20
- "stylelint-order": "6.0.3"
20
+ "stylelint-order": "6.0.4"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "postcss": "8.4.32",
24
24
  "postcss-less": "6.0.0",
25
- "stylelint": "*",
26
- "stylelint-config-standard": "34.0.0",
25
+ "stylelint-config-standard": "35.0.0",
27
26
  "stylelint-no-px": "1.0.1",
28
- "stylelint-order": "6.0.3"
27
+ "stylelint-order": "6.0.4"
29
28
  },
30
29
  "publishConfig": {
31
30
  "access": "public"
package/project.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "stylelint-config",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "projects/stylelint-config",
5
+ "projectType": "library",
6
+ "prefix": "tui",
7
+ "targets": {
8
+ "publish": {
9
+ "executor": "nx:run-commands",
10
+ "options": {
11
+ "command": "npm publish ./projects/stylelint-config --access=public --ignore-scripts || echo \"already published\""
12
+ }
13
+ }
14
+ }
15
+ }
package/angular-less.js DELETED
@@ -1,12 +0,0 @@
1
- const angularConfig = require('./angular');
2
- const lessConfig = require('./less');
3
-
4
- module.exports = {
5
- ...angularConfig,
6
- customSyntax: lessConfig.customSyntax,
7
- rules: {
8
- ...angularConfig.rules,
9
- ...lessConfig.rules,
10
- 'no-invalid-position-at-import-rule': null,
11
- },
12
- };
package/angular.js DELETED
@@ -1,81 +0,0 @@
1
- module.exports = {
2
- plugins: ['stylelint-order', 'stylelint-no-px'],
3
- extends: ['./stylelint.config.js'],
4
- rules: {
5
- 'alpha-value-notation': 'number',
6
- 'color-function-notation': 'legacy',
7
- 'meowtec/no-px': [
8
- true,
9
- {
10
- ignore: [
11
- // for cases with borders,
12
- // box-shadows and other special cases
13
- '-5px',
14
- '-4px',
15
- '-3px',
16
- '-2px',
17
- '-1px',
18
- '0px',
19
- '1px',
20
- '2px',
21
- '3px',
22
- '4px',
23
- '5px',
24
- // for css hacks
25
- '0.1px',
26
- '0.2px',
27
- '0.3px',
28
- '0.4px',
29
- '0.5px',
30
- '0.6px',
31
- '0.7px',
32
- '0.8px',
33
- '0.9px',
34
- ],
35
- },
36
- ],
37
- 'order/order': [
38
- 'less-mixins',
39
- 'custom-properties',
40
- 'dollar-variables',
41
- 'declarations',
42
- 'rules',
43
- 'at-rules',
44
- ],
45
- 'order/properties-order': [
46
- [
47
- 'all',
48
- 'content',
49
- 'position',
50
- {
51
- order: 'flexible',
52
- properties: ['top', 'left', 'right', 'bottom'],
53
- },
54
- 'z-index',
55
- 'display',
56
- ],
57
- {
58
- unspecified: 'bottom',
59
- },
60
- ],
61
- 'selector-max-specificity': [
62
- '0,5,0',
63
- {
64
- ignoreSelectors: [':host-context', ':first-child'],
65
- },
66
- ],
67
- 'selector-pseudo-element-no-unknown': [
68
- true,
69
- {
70
- ignorePseudoElements: ['ng-deep'],
71
- },
72
- ],
73
- 'selector-type-no-unknown': [
74
- true,
75
- {
76
- ignore: ['custom-elements'],
77
- ignoreTypes: ['/^/deep/'],
78
- },
79
- ],
80
- },
81
- };
package/less.js DELETED
@@ -1,64 +0,0 @@
1
- // cspell:disable
2
- module.exports = {
3
- extends: ['./stylelint.config.js'],
4
- customSyntax: 'postcss-less', // support less parser out-of-the-box
5
- rules: {
6
- 'function-no-unknown': [
7
- true,
8
- {
9
- ignoreFunctions: [
10
- // all less functions
11
- 'if',
12
- 'boolean',
13
- 'escape',
14
- 'e',
15
- '%',
16
- 'replace',
17
- 'length',
18
- 'extract',
19
- 'range',
20
- 'each',
21
- 'ceil',
22
- 'floor',
23
- 'percentage',
24
- 'round',
25
- 'sqrt',
26
- 'abs',
27
- 'sin',
28
- 'asin',
29
- 'cos',
30
- 'acos',
31
- 'tan',
32
- 'atan',
33
- 'pi',
34
- 'pow',
35
- 'mod',
36
- 'min',
37
- 'max',
38
- 'isnumber',
39
- 'isstring',
40
- 'iscolor',
41
- 'iskeyword',
42
- 'isurl',
43
- 'ispixel',
44
- 'isem',
45
- 'ispercentage',
46
- 'isunit',
47
- 'isruleset',
48
- 'isdefined',
49
- 'color',
50
- 'image-size',
51
- 'image-width',
52
- 'image-height',
53
- 'convert',
54
- 'data-uri',
55
- 'default',
56
- 'unit',
57
- 'get-unit',
58
- 'svg-gradient',
59
- 'fade',
60
- ],
61
- },
62
- ],
63
- },
64
- };
package/off.js DELETED
@@ -1,86 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- 'at-rule-name-case': null,
4
- 'at-rule-name-space-after': null,
5
- 'at-rule-no-unknown': null,
6
- 'at-rule-semicolon-newline-after': null,
7
- 'block-closing-brace-empty-line-before': null,
8
- 'block-closing-brace-newline-after': null,
9
- 'block-closing-brace-newline-before': null,
10
- 'block-closing-brace-space-before': null,
11
- 'block-opening-brace-newline-after': null,
12
- 'block-opening-brace-space-after': null,
13
- 'block-opening-brace-space-before': null,
14
- 'color-hex-case': null,
15
- 'color-named': null,
16
- 'declaration-bang-space-after': null,
17
- 'declaration-bang-space-before': null,
18
- 'declaration-block-no-redundant-longhand-properties': null,
19
- 'declaration-block-semicolon-newline-after': null,
20
- 'declaration-block-semicolon-space-after': null,
21
- 'declaration-block-semicolon-space-before': null,
22
- 'declaration-block-trailing-semicolon': null,
23
- 'declaration-colon-newline-after': null,
24
- 'declaration-colon-space-after': null,
25
- 'declaration-colon-space-before': null,
26
- 'function-comma-newline-after': null,
27
- 'function-comma-space-after': null,
28
- 'function-comma-space-before': null,
29
- 'function-max-empty-lines': null,
30
- 'function-parentheses-newline-inside': null,
31
- 'function-parentheses-space-inside': null,
32
- 'function-url-quotes': null,
33
- 'function-whitespace-after': null,
34
- 'import-notation': null,
35
- indentation: null,
36
- 'keyframe-selector-notation': null,
37
- 'keyframes-name-pattern': null,
38
- 'max-empty-lines': null,
39
- 'max-line-length': null,
40
- 'media-feature-colon-space-after': null,
41
- 'media-feature-colon-space-before': null,
42
- 'media-feature-name-case': null,
43
- 'media-feature-name-no-vendor-prefix': null,
44
- 'media-feature-parentheses-space-inside': null,
45
- 'media-feature-range-notation': null,
46
- 'media-feature-range-operator-space-after': null,
47
- 'media-feature-range-operator-space-before': null,
48
- 'media-query-list-comma-newline-after': null,
49
- 'media-query-list-comma-space-after': null,
50
- 'media-query-list-comma-space-before': null,
51
- 'media-query-no-invalid': null,
52
- 'no-descending-specificity': null,
53
- 'no-empty-first-line': null,
54
- 'no-eol-whitespace': null,
55
- 'no-extra-semicolons': null,
56
- 'no-missing-end-of-source-newline': null,
57
- 'number-leading-zero': null,
58
- 'number-max-precision': null,
59
- 'number-no-trailing-zeros': null,
60
- 'order/order': null,
61
- 'property-case': null,
62
- 'property-no-vendor-prefix': null,
63
- 'selector-attribute-brackets-space-inside': null,
64
- 'selector-attribute-operator-space-after': null,
65
- 'selector-attribute-operator-space-before': null,
66
- 'selector-class-pattern': null,
67
- 'selector-combinator-space-after': null,
68
- 'selector-combinator-space-before': null,
69
- 'selector-descendant-combinator-no-non-space': null,
70
- 'selector-list-comma-newline-after': null,
71
- 'selector-list-comma-space-before': null,
72
- 'selector-max-empty-lines': null,
73
- 'selector-max-specificity': null,
74
- 'selector-not-notation': null,
75
- 'selector-pseudo-class-case': null,
76
- 'selector-pseudo-class-parentheses-space-inside': null,
77
- 'selector-pseudo-element-case': null,
78
- 'string-quotes': null,
79
- 'unit-case': null,
80
- 'value-keyword-case': null,
81
- 'value-list-comma-newline-after': null,
82
- 'value-list-comma-space-after': null,
83
- 'value-list-comma-space-before': null,
84
- 'value-list-max-empty-lines': null,
85
- },
86
- };
@@ -1,88 +0,0 @@
1
- module.exports = {
2
- extends: 'stylelint-config-standard',
3
- plugins: ['stylelint-order'],
4
- rules: {
5
- 'color-named': 'never',
6
- 'declaration-empty-line-before': 'never',
7
- indentation: [
8
- 4,
9
- {
10
- indentInsideParens: 'once-at-root-twice-in-block',
11
- severity: 'error',
12
- },
13
- ],
14
- 'max-line-length': [
15
- 80,
16
- {
17
- ignore: ['non-comments'],
18
- },
19
- ],
20
- 'no-duplicate-selectors': true,
21
- 'number-leading-zero': 'never',
22
- 'order/order': [
23
- 'at-variables',
24
- 'less-mixins',
25
- 'declarations',
26
- {
27
- selector: '^&\\s\\+\\s\\S',
28
- type: 'rule',
29
- },
30
- {
31
- selector: '^&:\\w',
32
- type: 'rule',
33
- },
34
- {
35
- selector: '^&\\[\\w+\\]',
36
- type: 'rule',
37
- },
38
- {
39
- selector: '^&_[^\\W_]',
40
- type: 'rule',
41
- },
42
- {
43
- selector: '^&__\\w',
44
- type: 'rule',
45
- },
46
- 'rules',
47
- {
48
- hasBlock: true,
49
- name: 'media',
50
- type: 'at-rule',
51
- },
52
- ],
53
- 'order/properties-order': [
54
- [
55
- 'all',
56
- 'content',
57
- 'position',
58
- {
59
- order: 'flexible',
60
- properties: ['top', 'left', 'right', 'bottom'],
61
- },
62
- 'z-index',
63
- 'display',
64
- ],
65
- {
66
- unspecified: 'bottom',
67
- },
68
- ],
69
- 'rule-empty-line-before': [
70
- 'always',
71
- {
72
- except: ['first-nested'],
73
- ignore: ['after-comment'],
74
- },
75
- ],
76
- 'selector-attribute-quotes': 'always',
77
- 'selector-max-specificity': '0,5,0',
78
- 'selector-pseudo-element-colon-notation': 'single',
79
- 'selector-type-no-unknown': [
80
- true,
81
- {
82
- ignoreTypes: ['/^/deep/'],
83
- },
84
- ],
85
- 'value-keyword-case': 'lower',
86
- 'value-no-vendor-prefix': true,
87
- },
88
- };
package/taiga.js DELETED
@@ -1,26 +0,0 @@
1
- const angularLess = require('./angular-less');
2
- const offConfig = require('./off');
3
-
4
- module.exports = {
5
- ...angularLess,
6
- customSyntax: angularLess.customSyntax,
7
- rules: {
8
- ...angularLess.rules,
9
- ...offConfig.rules,
10
- 'selector-class-pattern':
11
- '^(_.*)|(t-.*)|(ProseMirror.*)|(tui-.*)|(ng-.*)|(hljs.*)$',
12
- 'unit-allowed-list': [
13
- 'px',
14
- 'rem',
15
- 'em',
16
- 'deg',
17
- 's',
18
- 'ms',
19
- 'dpcm',
20
- 'turn',
21
- 'ch',
22
- '%',
23
- // 'vw/vh' have a big problem in Safari, when developers set viewport=width~1280px in Application
24
- ],
25
- },
26
- };