@plumeria/eslint-plugin 0.1.0 → 0.2.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.
@@ -149,63 +149,63 @@ const colorNames = [
149
149
  'whitesmoke',
150
150
  'yellow',
151
151
  'yellowgreen',
152
- ].join('|')
152
+ ].join('|');
153
153
 
154
154
  // Numeric patterns (including negative numbers, decimals, and percentages)
155
- const numberPattern = '-?\\d+(?:\\.\\d+)?%?'
155
+ const numberPattern = '-?\\d+(?:\\.\\d+)?%?';
156
156
 
157
157
  // Percentage value pattern
158
- const percentagePattern = `${numberPattern}%`
158
+ const percentagePattern = `${numberPattern}%`;
159
159
 
160
160
  // Pattern containing angle units
161
- const angleUnit = '(?:deg|grad|rad|turn)?'
162
- const anglePattern = `${numberPattern}${angleUnit}`
161
+ const angleUnit = '(?:deg|grad|rad|turn)?';
162
+ const anglePattern = `${numberPattern}${angleUnit}`;
163
163
 
164
164
  // Alpha value (transparency) pattern
165
- const alphaPattern = `(?:\\s/\\s${numberPattern}%?)?`
165
+ const alphaPattern = `(?:\\s/\\s${numberPattern}%?)?`;
166
166
 
167
167
  // Pattern for separating values (comma or space)
168
- const separator = '(?:\\s?,\\s?|\\s{1})'
168
+ const separator = '(?:\\s?,\\s?|\\s{1})';
169
169
 
170
170
  // Hex color code pattern
171
- const hexPattern = '#(?:[0-9a-fA-F]{3,8})'
171
+ const hexPattern = '#(?:[0-9a-fA-F]{3,8})';
172
172
 
173
173
  // RGB function pattern
174
- const rgbFunctionName = 'rgb(?:a)?'
175
- const rgbCommaParameters = `\\(\\s*${numberPattern}(?:\\s*,\\s*${numberPattern}){2}(?:\\s*,\\s*${numberPattern}%?)?\\s*\\)`
176
- const rgbSpaceParameters = `\\(\\s*${numberPattern}(?:\\s+${numberPattern}){2}${alphaPattern}\\s*\\)`
177
- const rgbPattern = `${rgbFunctionName}(?:${rgbCommaParameters}|${rgbSpaceParameters})`
174
+ const rgbFunctionName = 'rgb(?:a)?';
175
+ const rgbCommaParameters = `\\(\\s*${numberPattern}(?:\\s*,\\s*${numberPattern}){2}(?:\\s*,\\s*${numberPattern}%?)?\\s*\\)`;
176
+ const rgbSpaceParameters = `\\(\\s*${numberPattern}(?:\\s+${numberPattern}){2}${alphaPattern}\\s*\\)`;
177
+ const rgbPattern = `${rgbFunctionName}(?:${rgbCommaParameters}|${rgbSpaceParameters})`;
178
178
 
179
179
  // HSL function pattern
180
- const hslFunctionName = 'hsl(?:a)?'
181
- const hslCommaParameters = `\\(\\s*${anglePattern}(?:\\s*,\\s*${percentagePattern}){2}(?:\\s*,\\s*${numberPattern}%?)?\\s*\\)`
182
- const hslSpaceParameters = `\\(\\s*${anglePattern}(?:\\s+${percentagePattern}){2}${alphaPattern}\\s*\\)`
183
- const hslPattern = `${hslFunctionName}(?:${hslCommaParameters}|${hslSpaceParameters})`
180
+ const hslFunctionName = 'hsl(?:a)?';
181
+ const hslCommaParameters = `\\(\\s*${anglePattern}(?:\\s*,\\s*${percentagePattern}){2}(?:\\s*,\\s*${numberPattern}%?)?\\s*\\)`;
182
+ const hslSpaceParameters = `\\(\\s*${anglePattern}(?:\\s+${percentagePattern}){2}${alphaPattern}\\s*\\)`;
183
+ const hslPattern = `${hslFunctionName}(?:${hslCommaParameters}|${hslSpaceParameters})`;
184
184
 
185
185
  // HWB function pattern
186
- const hwbFunctionName = 'hwb'
187
- const hwbCommaParameters = `\\(\\s*${anglePattern}(?:\\s*,\\s*${percentagePattern}){2}(?:\\s*,\\s*${numberPattern}%?)?\\s*\\)`
188
- const hwbSpaceParameters = `\\(\\s*${anglePattern}(?:\\s+${percentagePattern}){2}${alphaPattern}\\s*\\)`
189
- const hwbPattern = `${hwbFunctionName}(?:${hwbCommaParameters}|${hwbSpaceParameters})`
186
+ const hwbFunctionName = 'hwb';
187
+ const hwbCommaParameters = `\\(\\s*${anglePattern}(?:\\s*,\\s*${percentagePattern}){2}(?:\\s*,\\s*${numberPattern}%?)?\\s*\\)`;
188
+ const hwbSpaceParameters = `\\(\\s*${anglePattern}(?:\\s+${percentagePattern}){2}${alphaPattern}\\s*\\)`;
189
+ const hwbPattern = `${hwbFunctionName}(?:${hwbCommaParameters}|${hwbSpaceParameters})`;
190
190
 
191
191
  // LAB/OKLAB function pattern
192
- const labFunctionName = '(?:lab|oklab)'
193
- const labParameters = `\\(\\s*${percentagePattern}(?:\\s+${numberPattern}){2}${alphaPattern}\\s*\\)`
194
- const labPattern = `${labFunctionName}${labParameters}`
192
+ const labFunctionName = '(?:lab|oklab)';
193
+ const labParameters = `\\(\\s*${percentagePattern}(?:\\s+${numberPattern}){2}${alphaPattern}\\s*\\)`;
194
+ const labPattern = `${labFunctionName}${labParameters}`;
195
195
 
196
196
  // LCH/OKLCH function pattern
197
- const lchFunctionName = '(?:lch|oklch)'
198
- const lchParameters = `\\(\\s*${percentagePattern}(?:\\s+${numberPattern}){2}${alphaPattern}\\s*\\)`
199
- const lchPattern = `${lchFunctionName}${lchParameters}`
197
+ const lchFunctionName = '(?:lch|oklch)';
198
+ const lchParameters = `\\(\\s*${percentagePattern}(?:\\s+${numberPattern}){2}${alphaPattern}\\s*\\)`;
199
+ const lchPattern = `${lchFunctionName}${lchParameters}`;
200
200
 
201
201
  // color function pattern
202
- const colorFunctionName = 'color'
202
+ const colorFunctionName = 'color';
203
203
  const colorSpaces =
204
- '(?:srgb|srgb-linear|display-p3|a98-rgb|prophoto-rgb|rec2020|rec2100-pq|rec2100-hlg|rec2100-linear|jzazbz|ictcp|xyz|xyz-d50|xyz-d65)'
205
- const colorParameters = `\\(\\s*${colorSpaces}(?:${separator}${numberPattern}){3}${alphaPattern}\\s*\\)`
206
- const colorFunctionPattern = `${colorFunctionName}${colorParameters}`
204
+ '(?:srgb|srgb-linear|display-p3|a98-rgb|prophoto-rgb|rec2020|rec2100-pq|rec2100-hlg|rec2100-linear|jzazbz|ictcp|xyz|xyz-d50|xyz-d65)';
205
+ const colorParameters = `\\(\\s*${colorSpaces}(?:${separator}${numberPattern}){3}${alphaPattern}\\s*\\)`;
206
+ const colorFunctionPattern = `${colorFunctionName}${colorParameters}`;
207
207
 
208
208
  // overall pattern of color values
209
- const colorValue = `(?:${hexPattern}|${rgbPattern}|${hslPattern}|${hwbPattern}|${labPattern}|${lchPattern}|${colorFunctionPattern}|${colorNames})`
209
+ const colorValue = `(?:${hexPattern}|${rgbPattern}|${hslPattern}|${hwbPattern}|${labPattern}|${lchPattern}|${colorFunctionPattern}|${colorNames})`;
210
210
 
211
- module.exports = { colorValue }
211
+ module.exports = { colorValue };
package/lib/util/place.js CHANGED
@@ -12,7 +12,13 @@ function getOverflowPositions() {
12
12
  }
13
13
 
14
14
  function getContentDistributions() {
15
- return ['space-between', 'space-around', 'space-evenly', 'stretch', varString];
15
+ return [
16
+ 'space-between',
17
+ 'space-around',
18
+ 'space-evenly',
19
+ 'stretch',
20
+ varString,
21
+ ];
16
22
  }
17
23
 
18
24
  function getContentPositions() {
@@ -79,7 +85,16 @@ function generatePlaceContentPattern() {
79
85
  }
80
86
 
81
87
  function getPositions() {
82
- return ['center', 'start', 'end', 'self-start', 'self-end', 'flex-start', 'flex-end', varString];
88
+ return [
89
+ 'center',
90
+ 'start',
91
+ 'end',
92
+ 'self-start',
93
+ 'self-end',
94
+ 'flex-start',
95
+ 'flex-end',
96
+ varString,
97
+ ];
83
98
  }
84
99
 
85
100
  function getAlignItems() {
@@ -552,6 +552,6 @@ const propertyGroups = [
552
552
  'orphans',
553
553
  ],
554
554
  },
555
- ]
555
+ ];
556
556
 
557
- module.exports = propertyGroups
557
+ module.exports = propertyGroups;
@@ -9,9 +9,9 @@ const fontSizeSubValues = [
9
9
  'math',
10
10
  'smaller',
11
11
  'larger',
12
- ]
13
- const lengthSubValues = ['max-content', 'min-content', 'fit-content']
14
- const widthKeywords = ['thin', 'medium', 'thick']
12
+ ];
13
+ const lengthSubValues = ['max-content', 'min-content', 'fit-content'];
14
+ const widthKeywords = ['thin', 'medium', 'thick'];
15
15
  const alignKeywords = [
16
16
  'start',
17
17
  'end',
@@ -20,7 +20,7 @@ const alignKeywords = [
20
20
  'center',
21
21
  'justify',
22
22
  'match-parent',
23
- ]
23
+ ];
24
24
  const breakBeforeAfterValues = [
25
25
  'auto',
26
26
  'avoid',
@@ -36,7 +36,7 @@ const breakBeforeAfterValues = [
36
36
  'column',
37
37
  'avoid-region',
38
38
  'region',
39
- ]
39
+ ];
40
40
  const lineStyle = [
41
41
  'none',
42
42
  'hidden',
@@ -48,8 +48,8 @@ const lineStyle = [
48
48
  'ridge',
49
49
  'inset',
50
50
  'outset',
51
- ]
52
- const overflowKeyword = ['visible', 'hidden', 'clip', 'scroll', 'auto']
51
+ ];
52
+ const overflowKeyword = ['visible', 'hidden', 'clip', 'scroll', 'auto'];
53
53
  const overflowAlignment = [
54
54
  'safe start',
55
55
  'safe end',
@@ -61,7 +61,7 @@ const overflowAlignment = [
61
61
  'unsafe center',
62
62
  'unsafe flex-start',
63
63
  'unsafe flex-end',
64
- ]
64
+ ];
65
65
 
66
66
  const validData = {
67
67
  all: [], // 1
@@ -1047,6 +1047,6 @@ const validData = {
1047
1047
  'sideways-lr',
1048
1048
  ], // 396
1049
1049
  zoom: ['normal', 'reset'], // 397
1050
- }
1050
+ };
1051
1051
 
1052
- module.exports = validData
1052
+ module.exports = validData;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plumeria/eslint-plugin",
3
- "version": "0.1.0",
4
- "description": "Near Zero-runtime CSS-in-JS for efficient design systems.",
3
+ "version": "0.2.0",
4
+ "description": "Zero-runtime CSS in JS - Compile at build-time. No runtime overhead.",
5
5
  "repository": "github:zss-in-js/plumeria",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -22,5 +22,8 @@
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"
25
+ },
26
+ "scripts": {
27
+ "build": "echo 'No build necessary'"
25
28
  }
26
- }
29
+ }