@d-zero/stylelint-config 5.0.0-dev.90 → 5.0.0-dev.92

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/base.js ADDED
@@ -0,0 +1,140 @@
1
+ module.exports = {
2
+ extends: ['stylelint-config-standard', 'stylelint-config-recess-order'],
3
+ plugins: ['stylelint-scss', 'stylelint-order'],
4
+ rules: {
5
+ 'order/order': [
6
+ 'dollar-variables',
7
+ 'custom-properties',
8
+ {
9
+ type: 'at-rule',
10
+ name: 'custom-media',
11
+ },
12
+ {
13
+ type: 'at-rule',
14
+ name: 'extend',
15
+ },
16
+ {
17
+ type: 'at-rule',
18
+ name: 'mixin',
19
+ },
20
+ 'declarations',
21
+ {
22
+ type: 'at-rule',
23
+ name: 'supports',
24
+ },
25
+ {
26
+ type: 'at-rule',
27
+ name: 'media',
28
+ hasBlock: true,
29
+ },
30
+ 'rules',
31
+ ],
32
+ 'at-rule-disallowed-list': null,
33
+ 'at-rule-empty-line-before': [
34
+ 'always',
35
+ {
36
+ except: ['blockless-after-same-name-blockless', 'first-nested'],
37
+ ignore: ['after-comment'],
38
+ },
39
+ ],
40
+ 'at-rule-no-vendor-prefix': true,
41
+ 'at-rule-no-unknown': [
42
+ true,
43
+ {
44
+ ignoreAtRules: ['mixin', 'extend', 'for', 'if', 'include', 'use', 'forward'],
45
+ },
46
+ ],
47
+ 'color-hex-length': 'short',
48
+ 'color-named': 'never',
49
+ 'color-no-invalid-hex': true,
50
+ 'comment-empty-line-before': [
51
+ 'always',
52
+ {
53
+ ignore: ['stylelint-commands'],
54
+ },
55
+ ],
56
+ 'comment-no-empty': true,
57
+ 'comment-whitespace-inside': 'always',
58
+ 'comment-word-disallowed-list': ['/^TODO:/'],
59
+ 'custom-property-empty-line-before': 'never',
60
+ 'declaration-block-no-duplicate-properties': true,
61
+ 'declaration-block-no-redundant-longhand-properties': true,
62
+ 'declaration-block-no-shorthand-property-overrides': true,
63
+ 'declaration-block-single-line-max-declarations': 80,
64
+ 'declaration-empty-line-before': 'never',
65
+ 'declaration-no-important': true,
66
+ 'declaration-property-value-disallowed-list': null,
67
+ 'declaration-property-value-allowed-list': null,
68
+ 'font-family-name-quotes': 'always-where-required',
69
+ 'font-family-no-duplicate-names': true,
70
+ 'font-weight-notation': 'named-where-possible',
71
+ 'function-disallowed-list': null,
72
+ 'function-calc-no-unspaced-operator': true,
73
+ 'function-linear-gradient-no-nonstandard-direction': true,
74
+ 'function-name-case': 'lower',
75
+ 'function-no-unknown': [
76
+ true,
77
+ {
78
+ ignoreFunctions: ['a', 'lighten', 'darken', 'resolve'],
79
+ },
80
+ ],
81
+ 'function-url-scheme-allowed-list': null,
82
+ 'function-url-no-scheme-relative': true,
83
+ 'function-url-quotes': 'always',
84
+ 'keyframe-declaration-no-important': true,
85
+ 'length-zero-no-unit': true,
86
+ 'max-nesting-depth': 8,
87
+ 'media-feature-name-no-unknown': true,
88
+ 'media-feature-name-no-vendor-prefix': true,
89
+ 'no-duplicate-selectors': true,
90
+ 'no-descending-specificity': null,
91
+ 'no-empty-source': true,
92
+ 'no-invalid-double-slash-comments': true,
93
+ 'no-unknown-animations': true,
94
+ 'number-max-precision': 4,
95
+ 'property-disallowed-list': null,
96
+ 'property-no-unknown': true,
97
+ 'property-no-vendor-prefix': [
98
+ true,
99
+ {
100
+ severity: 'warning',
101
+ message: 'Autoprefixerを利用するのでベンダープレフィックスは不要です',
102
+ },
103
+ ],
104
+ 'rule-empty-line-before': [
105
+ 'always-multi-line',
106
+ {
107
+ except: ['after-single-line-comment', 'first-nested'],
108
+ ignore: ['after-comment'],
109
+ },
110
+ ],
111
+ 'selector-attribute-operator-disallowed-list': null,
112
+ 'selector-attribute-quotes': 'always',
113
+ 'selector-max-compound-selectors': 8,
114
+ 'selector-max-specificity': '0,10,10',
115
+ 'selector-max-id': 0,
116
+ 'selector-max-universal': 1,
117
+ 'selector-no-vendor-prefix': true,
118
+ 'selector-pseudo-class-disallowed-list': ['link'],
119
+ 'selector-pseudo-element-colon-notation': 'double',
120
+ 'selector-type-case': 'lower',
121
+ 'selector-type-no-unknown': true,
122
+ 'shorthand-property-no-redundant-values': null,
123
+ 'string-no-newline': true,
124
+ 'time-min-milliseconds': 100,
125
+ 'unit-disallowed-list': null,
126
+ 'unit-no-unknown': true,
127
+ 'value-keyword-case': null,
128
+ 'value-no-vendor-prefix': true,
129
+
130
+ // Overwrite stylelint-config-standard
131
+ 'custom-media-pattern': null,
132
+ 'custom-property-pattern': null,
133
+ },
134
+ overrides: [
135
+ {
136
+ files: ['__assets/**/*.scss'],
137
+ customSyntax: 'postcss-scss',
138
+ },
139
+ ],
140
+ };
package/index.js ADDED
@@ -0,0 +1,18 @@
1
+ const base = require('./base');
2
+ const name = require('./name');
3
+ const values = require('./values');
4
+
5
+ module.exports = {
6
+ ...base,
7
+ ignoreFiles: [
8
+ '__assets/**/*.{js,jsx,ts,tsx,html,pug}',
9
+ '__assets/css/_syntax-rules.scss',
10
+ 'htdocs/**/*',
11
+ 'docs/**/*.md',
12
+ ],
13
+ rules: {
14
+ ...base.rules,
15
+ ...name.rules,
16
+ ...values.rules,
17
+ },
18
+ };
package/name.js ADDED
@@ -0,0 +1,17 @@
1
+ module.exports = {
2
+ rules: {
3
+ 'scss/dollar-variable-pattern':
4
+ '^(?:[a-z]{2,}-[a-z0-9-]+|_[a-z][a-z0-9]*(?:-[a-z0-9]+)*)$',
5
+ 'scss/percent-placeholder-pattern': '^[a-z]{2,}(-[a-z0-9-]+)?$',
6
+ 'custom-media-pattern': '[a-z][a-z-]*',
7
+ 'custom-property-pattern': '[a-z][a-z-]*',
8
+ 'selector-class-pattern': [
9
+ '^c-[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)?$',
10
+ {
11
+ resolveNestedSelectors: true,
12
+ },
13
+ ],
14
+ 'selector-id-pattern': '^$',
15
+ 'selector-nested-pattern': '^[^.]+.*',
16
+ },
17
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-zero/stylelint-config",
3
- "version": "5.0.0-dev.90+e25aaa4",
3
+ "version": "5.0.0-dev.92+cac5756",
4
4
  "description": "Configurations of Stylelint",
5
5
  "repository": "https://github.com/d-zero-dev/node-dev-env.git",
6
6
  "author": "D-ZERO Co., Ltd.",
@@ -9,14 +9,20 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "files": [
13
- ".stylelintrc.json"
14
- ],
12
+ "type": "commonjs",
15
13
  "exports": {
16
- ".": "./.stylelintrc.json",
17
- "./base": "./.stylelintrc.base.json"
14
+ ".": "./index.js",
15
+ "./base": "./base.js",
16
+ "./name": "./name.js",
17
+ "./values": "./values.js"
18
18
  },
19
- "main": ".stylelintrc.json",
19
+ "files": [
20
+ "base.js",
21
+ "index.js",
22
+ "name.js",
23
+ "values.js"
24
+ ],
25
+ "main": "index.js",
20
26
  "dependencies": {
21
27
  "stylelint": "16.1.0",
22
28
  "stylelint-config-recess-order": "4.4.0",
@@ -24,5 +30,5 @@
24
30
  "stylelint-order": "6.0.4",
25
31
  "stylelint-scss": "6.0.0"
26
32
  },
27
- "gitHead": "e25aaa4561d8d66f839bf3e007cb6c620ef2d115"
33
+ "gitHead": "cac5756806a90edaa73a57e49f0dcd45495290ab"
28
34
  }
package/values.js ADDED
@@ -0,0 +1,51 @@
1
+ module.exports = {
2
+ rules: {
3
+ 'declaration-property-value-disallowed-list': {
4
+ '/^(?:color|background|background-color|border|border-color|outline|outline-color)$/':
5
+ ['/#[0-9a-f]{3}/', '/(?:rgb|hsl)a?\\(.+?\\)/'],
6
+ content: ['/^\\"\\\\[0-9a-fA-F]{1,6}\\"$/'],
7
+ flex: ['/calc/'],
8
+ '/^(?:max-|min-)?(?:width|height)|^flex/': [
9
+ '/[1-9]*\\.[0-9]+(?:%|vw|vh)/',
10
+ '/(?:^|[^0-9])[0-9](?:%|vw|vh)/',
11
+ '/(?:^|[^0-9])[0-9]{2}(?:%|vw|vh)/',
12
+ '/1[0-9][1-9](?:%|vw|vh)/',
13
+ '/1[1-9][0-9](?:%|vw|vh)/',
14
+ '/[2-9][0-9][0-9](?:%|vw|vh)/',
15
+ '/[0-9]{4,}(?:%|vw|vh)/',
16
+ ],
17
+ },
18
+ 'declaration-property-value-allowed-list': {
19
+ 'font-size': [
20
+ 'inherit',
21
+ '$root-font-size',
22
+ '$base-font-size',
23
+ '1em',
24
+ '/^calc\\((?:\\$[a-z_][a-z0-9_-]*|(?:[0-9]*\\.)?[0-9]+) \\/ (?:\\$[a-z_][a-z0-9_-]*|(?:[0-9]*\\.)?[0-9]+) \\* (?:1em|100vw)\\)$/',
25
+ '/^(?:[0-9]*\\.)?[0-9]+rem/',
26
+ '/^clamp\\(/',
27
+ ],
28
+ },
29
+ 'unit-disallowed-list': [
30
+ 'ex',
31
+ 'ch',
32
+ 'mm',
33
+ 'q',
34
+ 'cm',
35
+ 'in',
36
+ 'pt',
37
+ 'pc',
38
+ 'vm',
39
+ 's',
40
+ 'grad',
41
+ 'rad',
42
+ 'turn',
43
+ ],
44
+ 'value-keyword-case': [
45
+ 'lower',
46
+ {
47
+ ignoreProperties: ['/^\\$font-family-/'],
48
+ },
49
+ ],
50
+ },
51
+ };
package/.stylelintrc.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "extends": ["./stylelintrc.base.json"],
3
- "ignoreFiles": [
4
- "__assets/**/*.{js,jsx,ts,tsx,html,pug}",
5
- "__assets/css/_syntax-rules.scss",
6
- "htdocs/**/*",
7
- "docs/**/*.md"
8
- ],
9
- "rules": {
10
- "scss/dollar-variable-pattern": "^(?:[a-z]{2,}-[a-z0-9-]+|_[a-z][a-z0-9]*(?:-[a-z0-9]+)*)$",
11
- "scss/percent-placeholder-pattern": "^[a-z]{2,}(-[a-z0-9-]+)?$",
12
- "custom-media-pattern": "[a-z][a-z-]*",
13
- "custom-property-pattern": "[a-z][a-z-]*",
14
- "selector-class-pattern": [
15
- "^c-[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)?$",
16
- {
17
- "resolveNestedSelectors": true
18
- }
19
- ],
20
- "selector-id-pattern": "^$",
21
- "selector-nested-pattern": "^[^.]+.*"
22
- }
23
- }