@xip-online-applications/stylelint-config 0.4.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/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [0.4.0](https://github.com/xip-online-applications/frontend/compare/@xip-online-applications/stylelint-config@0.3.0...@xip-online-applications/stylelint-config@0.4.0) (2023-01-30)
7
+
8
+ ### Features
9
+
10
+ - **package:** add files array so source files are not included in published package ([65c9e2c](https://github.com/xip-online-applications/frontend/commit/65c9e2c09a74bb3ca31c2ddb4b79120aa0470ac0))
11
+ - **package:** add license ([138a3a8](https://github.com/xip-online-applications/frontend/commit/138a3a8c5b0ef44e9832e5abf071aa33e734ff21))
12
+
13
+ # [0.3.0](https://github.com/xip-online-applications/frontend/compare/@xip-online-applications/stylelint-config@0.2.0...@xip-online-applications/stylelint-config@0.3.0) (2023-01-27)
14
+
15
+ ### Features
16
+
17
+ - **package:** set Stylelint SCSS rule "scss/declaration-nested-properties" to "never" ([1f6db45](https://github.com/xip-online-applications/frontend/commit/1f6db45e42d7024ae4611640226314ba9a664279))
18
+
19
+ # [0.2.0](https://github.com/xip-online-applications/frontend/compare/@xip-online-applications/stylelint-config@0.1.0...@xip-online-applications/stylelint-config@0.2.0) (2023-01-26)
20
+
21
+ ### Features
22
+
23
+ - add "alpha-value-notation" rule and set it to "number" ([cc17573](https://github.com/xip-online-applications/frontend/commit/cc17573f64842f67c22bbf3607c4bb2d990f5f82))
24
+
25
+ # 0.1.0 (2023-01-13)
26
+
27
+ ### Features
28
+
29
+ - **ci:** add publish workflow ([40cc5ea](https://github.com/xip-online-applications/frontend/commit/40cc5eabfd830088ab3da7597c3ab8b00b030f34))
30
+ - **package:** add stylelint config ([2e93ea6](https://github.com/xip-online-applications/frontend/commit/2e93ea6e5d7156c3114b31c685ba2d82aa975c8f))
31
+ - **package:** add stylelint-config ([6257dc7](https://github.com/xip-online-applications/frontend/commit/6257dc76abe493a9b6f0834edefae1c98dc50960))
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [year] [fullname]
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,39 @@
1
+ # Stylelint Config
2
+
3
+ ## Usage
4
+
5
+ ### Install
6
+
7
+ ```sh
8
+ $ npm i -D @xip-online-applications/stylelint-config
9
+ ```
10
+
11
+ ### Add config
12
+
13
+ Add the config to your `package.json`. Alternatively you can make a seperate config file.
14
+
15
+ ```jsonc
16
+ {
17
+ // ...
18
+ "stylelint": {
19
+ "extends": "@xip-online-applications/stylelint-config"
20
+ }
21
+ }
22
+ ```
23
+
24
+ ### Add script
25
+
26
+ ```jsonc
27
+ {
28
+ // ...
29
+ "scripts": {
30
+ // ...
31
+ "lint:style": "stylelint 'YOUR_SOURCE_FOLDER/**/*.{css,scss}'"
32
+ // ...
33
+ }
34
+ }
35
+ ```
36
+
37
+ ### Prettier
38
+
39
+ This config uses Stylelint Prettier to not conflict with Prettier's config, so make sure you install XIPs Prettier config as well.
package/index.js ADDED
@@ -0,0 +1,89 @@
1
+ module.exports = {
2
+ extends: [
3
+ 'stylelint-config-standard-scss', // https://github.com/stylelint-scss/stylelint-config-standard-scss
4
+ 'stylelint-config-idiomatic-order', // https://github.com/ream88/stylelint-config-idiomatic-order
5
+ 'stylelint-prettier/recommended', // https://github.com/prettier/stylelint-prettier
6
+ ],
7
+ plugins: [
8
+ 'stylelint-declaration-block-no-ignored-properties', // https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties
9
+ 'stylelint-order', // https://github.com/hudochenkov/stylelint-order
10
+ 'stylelint-prettier', // https://github.com/prettier/stylelint-prettier
11
+ ],
12
+ rules: {
13
+ /**
14
+ * Other
15
+ */
16
+ 'alpha-value-notation': 'number', // https://stylelint.io/user-guide/rules/alpha-value-notation/
17
+ 'at-rule-no-unknown': null, // Disabled because of stylelint-scss // https://stylelint.io/user-guide/rules/at-rule-no-unknown/
18
+ 'font-weight-notation': 'named-where-possible', // https://stylelint.io/user-guide/rules/font-weight-notation/
19
+ 'shorthand-property-no-redundant-values': true, // https://stylelint.io/user-guide/rules/shorthand-property-no-redundant-values/
20
+
21
+ /**
22
+ * Quotes
23
+ */
24
+ 'font-family-name-quotes': 'always-where-recommended', // https://stylelint.io/user-guide/rules/font-family-name-quotes/
25
+ 'function-url-quotes': 'always', // https://stylelint.io/user-guide/rules/function-url-quotes/
26
+ 'selector-attribute-quotes': 'always', // https://stylelint.io/user-guide/rules/selector-attribute-quotes/
27
+
28
+ /**
29
+ * Vendor prefixes
30
+ */
31
+ 'at-rule-no-vendor-prefix': true, // https://stylelint.io/user-guide/rules/at-rule-no-vendor-prefix/
32
+ 'media-feature-name-no-vendor-prefix': true, // https://stylelint.io/user-guide/rules/media-feature-name-no-vendor-prefix/
33
+ 'property-no-vendor-prefix': true, // https://stylelint.io/user-guide/rules/property-no-vendor-prefix/
34
+ 'selector-no-vendor-prefix': true, // https://stylelint.io/user-guide/rules/selector-no-vendor-prefix/
35
+ 'value-no-vendor-prefix': true, // https://stylelint.io/user-guide/rules/value-no-vendor-prefix/
36
+
37
+ /**
38
+ * Specificity
39
+ */
40
+ 'max-nesting-depth': 4, // https://stylelint.io/user-guide/rules/max-nesting-depth/
41
+ 'selector-max-specificity': '0,4,2', // https://stylelint.io/user-guide/rules/selector-max-specificity/
42
+
43
+ /**
44
+ * Selector types, units, properties, functions and words in comments
45
+ */
46
+ 'color-named': [
47
+ 'never',
48
+ {
49
+ ignore: ['inside-function'],
50
+ },
51
+ ], // https://stylelint.io/user-guide/rules/color-named/
52
+ 'color-no-hex': true, // https://stylelint.io/user-guide/rules/color-no-hex/
53
+ 'declaration-no-important': true, // https://stylelint.io/user-guide/rules/declaration-no-important/
54
+ 'declaration-property-unit-allowed-list': {
55
+ 'line-height': [''],
56
+ }, // https://stylelint.io/user-guide/rules/declaration-property-unit-allowed-list/
57
+ 'declaration-property-value-disallowed-list': {
58
+ '/^transition/': ['/all/'],
59
+ '/^background/': ['http:', 'https:'],
60
+ '/^border/': ['none'],
61
+ '/.+/': ['initial'],
62
+ }, // https://stylelint.io/user-guide/rules/declaration-property-value-disallowed-list/
63
+ 'selector-max-attribute': 1, // https://stylelint.io/user-guide/rules/selector-max-attribute/
64
+ 'selector-max-class': 3, // https://stylelint.io/user-guide/rules/selector-max-class/
65
+ 'selector-max-compound-selectors': 3, // https://stylelint.io/user-guide/rules/selector-compound-selectors/
66
+ 'selector-max-combinators': 2, // https://stylelint.io/user-guide/rules/selector-max-combinators/
67
+ 'selector-max-id': 0, // https://stylelint.io/user-guide/rules/selector-max-id/
68
+ 'selector-max-pseudo-class': 2, // https://stylelint.io/user-guide/rules/selector-max-pseudo-class/
69
+ 'selector-max-type': 2, // https://stylelint.io/user-guide/rules/selector-max-type/
70
+ 'selector-max-universal': 1, // https://stylelint.io/user-guide/rules/selector-max-universal/
71
+
72
+ /**
73
+ * Plugins
74
+ */
75
+ 'plugin/declaration-block-no-ignored-properties': true, // https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties
76
+ 'scss/at-each-key-value-single-line': true, // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-each-key-value-single-line/README.md
77
+ 'scss/at-extend-no-missing-placeholder': true, // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-extend-no-missing-placeholder/README.md
78
+ 'scss/at-import-no-partial-leading-underscore': true, // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-no-partial-leading-underscore/README.md
79
+ 'scss/at-import-partial-extension': 'never', // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-partial-extension/README.md
80
+ 'scss/at-mixin-argumentless-call-parentheses': 'always', // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-mixin-argumentless-call-parentheses/README.md
81
+ 'scss/at-rule-conditional-no-parentheses': true, // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-rule-conditional-no-parentheses/README.md
82
+ 'scss/at-rule-no-unknown': true, // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-rule-no-unknown/README.md
83
+ 'scss/comment-no-loud': true, // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/comment-no-loud/README.md
84
+ 'scss/declaration-nested-properties': 'never', // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/declaration-nested-properties/README.md
85
+ 'scss/function-color-relative': true, // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-color-relative/README.md
86
+ 'scss/no-duplicate-mixins': true, // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-duplicate-mixins/README.md
87
+ 'scss/selector-no-redundant-nesting-selector': true, // https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/selector-no-redundant-nesting-selector/README.md
88
+ },
89
+ };
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@xip-online-applications/stylelint-config",
3
+ "version": "0.4.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "ssh://git@github.com/xip-online-applications/frontend.git",
7
+ "directory": "packages/stylelint-config"
8
+ },
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "author": "XIP Online Applications <info@x-ip.nl>",
13
+ "main": "./index.js",
14
+ "files": [
15
+ "index.js",
16
+ "README.md",
17
+ "CHANGELOG.md",
18
+ "LICENSE.md"
19
+ ],
20
+ "dependencies": {
21
+ "stylelint-config-idiomatic-order": "latest",
22
+ "stylelint-config-prettier": "latest",
23
+ "stylelint-config-standard-scss": "latest",
24
+ "stylelint-declaration-block-no-ignored-properties": "latest",
25
+ "stylelint-order": "latest",
26
+ "stylelint-prettier": "latest"
27
+ },
28
+ "peerDependencies": {
29
+ "stylelint-config-idiomatic-order": "^9.0.0",
30
+ "stylelint-config-prettier": "^9.0.4",
31
+ "stylelint-config-standard-scss": "^6.1.0",
32
+ "stylelint-declaration-block-no-ignored-properties": "^2.6.0",
33
+ "stylelint-order": "^6.0.1",
34
+ "stylelint-prettier": "^2.0.0"
35
+ },
36
+ "gitHead": "c001745579414ec4ec657543de97518a1ec84595"
37
+ }