@tcy/eslint-rules 1.0.3 → 1.0.6

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,394 @@
1
+ TN:
2
+ SF:src/array-elements-per-line.js
3
+ FN:12,(anonymous_0)
4
+ FN:14,(anonymous_1)
5
+ FN:47,(anonymous_2)
6
+ FN:48,(anonymous_3)
7
+ FNF:4
8
+ FNH:0
9
+ FNDA:0,(anonymous_0)
10
+ FNDA:0,(anonymous_1)
11
+ FNDA:0,(anonymous_2)
12
+ FNDA:0,(anonymous_3)
13
+ DA:13,0
14
+ DA:15,0
15
+ DA:16,0
16
+ DA:19,0
17
+ DA:20,0
18
+ DA:21,0
19
+ DA:23,0
20
+ DA:24,0
21
+ DA:27,0
22
+ DA:28,0
23
+ DA:32,0
24
+ DA:33,0
25
+ DA:34,0
26
+ DA:35,0
27
+ DA:36,0
28
+ DA:37,0
29
+ DA:38,0
30
+ DA:41,0
31
+ DA:43,0
32
+ DA:48,0
33
+ DA:49,0
34
+ DA:50,0
35
+ DA:51,0
36
+ DA:52,0
37
+ DA:55,0
38
+ LF:25
39
+ LH:0
40
+ BRDA:15,0,0,0
41
+ BRDA:15,0,1,0
42
+ BRDA:21,1,0,0
43
+ BRDA:21,1,1,0
44
+ BRDA:27,2,0,0
45
+ BRDA:27,2,1,0
46
+ BRDA:36,3,0,0
47
+ BRDA:36,3,1,0
48
+ BRDA:36,4,0,0
49
+ BRDA:36,4,1,0
50
+ BRDA:36,4,2,0
51
+ BRDA:41,5,0,0
52
+ BRDA:41,5,1,0
53
+ BRDA:49,6,0,0
54
+ BRDA:49,6,1,0
55
+ BRDA:51,7,0,0
56
+ BRDA:51,7,1,0
57
+ BRF:17
58
+ BRH:0
59
+ end_of_record
60
+ TN:
61
+ SF:src/enforce-tailwind-important.js
62
+ FN:4,(anonymous_0)
63
+ FN:6,(anonymous_1)
64
+ FN:17,(anonymous_2)
65
+ FN:23,reportIfMissing
66
+ FN:24,(anonymous_4)
67
+ FN:32,(anonymous_5)
68
+ FN:37,(anonymous_6)
69
+ FN:46,buildFixedTemplateText
70
+ FN:47,(anonymous_8)
71
+ FN:54,(anonymous_9)
72
+ FN:67,processExpression
73
+ FN:77,(anonymous_11)
74
+ FN:85,(anonymous_12)
75
+ FN:94,(anonymous_13)
76
+ FN:102,(anonymous_14)
77
+ FN:114,(anonymous_15)
78
+ FN:131,(anonymous_16)
79
+ FN:146,(anonymous_17)
80
+ FNF:18
81
+ FNH:1
82
+ FNDA:1,(anonymous_0)
83
+ FNDA:0,(anonymous_1)
84
+ FNDA:0,(anonymous_2)
85
+ FNDA:0,reportIfMissing
86
+ FNDA:0,(anonymous_4)
87
+ FNDA:0,(anonymous_5)
88
+ FNDA:0,(anonymous_6)
89
+ FNDA:0,buildFixedTemplateText
90
+ FNDA:0,(anonymous_8)
91
+ FNDA:0,(anonymous_9)
92
+ FNDA:0,processExpression
93
+ FNDA:0,(anonymous_11)
94
+ FNDA:0,(anonymous_12)
95
+ FNDA:0,(anonymous_13)
96
+ FNDA:0,(anonymous_14)
97
+ FNDA:0,(anonymous_15)
98
+ FNDA:0,(anonymous_16)
99
+ FNDA:0,(anonymous_17)
100
+ DA:4,1
101
+ DA:6,1
102
+ DA:18,0
103
+ DA:24,0
104
+ DA:25,0
105
+ DA:28,0
106
+ DA:29,0
107
+ DA:32,0
108
+ DA:33,0
109
+ DA:38,0
110
+ DA:39,0
111
+ DA:41,0
112
+ DA:47,0
113
+ DA:48,0
114
+ DA:50,0
115
+ DA:51,0
116
+ DA:53,0
117
+ DA:54,0
118
+ DA:55,0
119
+ DA:58,0
120
+ DA:59,0
121
+ DA:60,0
122
+ DA:63,0
123
+ DA:64,0
124
+ DA:68,0
125
+ DA:69,0
126
+ DA:72,0
127
+ DA:74,0
128
+ DA:75,0
129
+ DA:77,0
130
+ DA:78,0
131
+ DA:79,0
132
+ DA:82,0
133
+ DA:83,0
134
+ DA:84,0
135
+ DA:85,0
136
+ DA:86,0
137
+ DA:87,0
138
+ DA:92,0
139
+ DA:94,0
140
+ DA:95,0
141
+ DA:96,0
142
+ DA:99,0
143
+ DA:101,0
144
+ DA:102,0
145
+ DA:107,0
146
+ DA:108,0
147
+ DA:111,0
148
+ DA:115,0
149
+ DA:117,0
150
+ DA:120,0
151
+ DA:123,0
152
+ DA:130,0
153
+ DA:132,0
154
+ DA:133,0
155
+ DA:135,0
156
+ DA:136,0
157
+ DA:138,0
158
+ DA:139,0
159
+ DA:140,0
160
+ DA:141,0
161
+ DA:147,0
162
+ DA:155,0
163
+ LF:63
164
+ LH:2
165
+ BRDA:28,0,0,0
166
+ BRDA:28,0,1,0
167
+ BRDA:32,1,0,0
168
+ BRDA:32,1,1,0
169
+ BRDA:39,2,0,0
170
+ BRDA:39,2,1,0
171
+ BRDA:54,3,0,0
172
+ BRDA:54,3,1,0
173
+ BRDA:58,4,0,0
174
+ BRDA:58,4,1,0
175
+ BRDA:59,5,0,0
176
+ BRDA:59,5,1,0
177
+ BRDA:59,6,0,0
178
+ BRDA:59,6,1,0
179
+ BRDA:68,7,0,0
180
+ BRDA:68,7,1,0
181
+ BRDA:72,8,0,0
182
+ BRDA:72,8,1,0
183
+ BRDA:72,8,2,0
184
+ BRDA:72,8,3,0
185
+ BRDA:72,8,4,0
186
+ BRDA:78,9,0,0
187
+ BRDA:78,9,1,0
188
+ BRDA:82,10,0,0
189
+ BRDA:82,10,1,0
190
+ BRDA:84,11,0,0
191
+ BRDA:84,11,1,0
192
+ BRDA:86,12,0,0
193
+ BRDA:86,12,1,0
194
+ BRDA:86,13,0,0
195
+ BRDA:86,13,1,0
196
+ BRDA:95,14,0,0
197
+ BRDA:95,14,1,0
198
+ BRDA:95,15,0,0
199
+ BRDA:95,15,1,0
200
+ BRDA:107,16,0,0
201
+ BRDA:107,16,1,0
202
+ BRDA:132,17,0,0
203
+ BRDA:132,17,1,0
204
+ BRDA:133,18,0,0
205
+ BRDA:133,18,1,0
206
+ BRDA:136,19,0,0
207
+ BRDA:136,19,1,0
208
+ BRDA:138,20,0,0
209
+ BRDA:138,20,1,0
210
+ BRDA:138,21,0,0
211
+ BRDA:138,21,1,0
212
+ BRDA:140,22,0,0
213
+ BRDA:140,22,1,0
214
+ BRDA:147,23,0,0
215
+ BRDA:147,23,1,0
216
+ BRDA:148,24,0,0
217
+ BRDA:148,24,1,0
218
+ BRDA:148,24,2,0
219
+ BRDA:148,24,3,0
220
+ BRDA:148,24,4,0
221
+ BRDA:148,24,5,0
222
+ BRF:57
223
+ BRH:0
224
+ end_of_record
225
+ TN:
226
+ SF:src/export-specifiers-per-line.js
227
+ FN:10,(anonymous_0)
228
+ FN:12,(anonymous_1)
229
+ FN:42,(anonymous_2)
230
+ FN:54,(anonymous_3)
231
+ FNF:4
232
+ FNH:0
233
+ FNDA:0,(anonymous_0)
234
+ FNDA:0,(anonymous_1)
235
+ FNDA:0,(anonymous_2)
236
+ FNDA:0,(anonymous_3)
237
+ DA:11,0
238
+ DA:13,0
239
+ DA:14,0
240
+ DA:16,0
241
+ DA:19,0
242
+ DA:20,0
243
+ DA:21,0
244
+ DA:22,0
245
+ DA:23,0
246
+ DA:27,0
247
+ DA:31,0
248
+ DA:32,0
249
+ DA:35,0
250
+ DA:36,0
251
+ DA:38,0
252
+ DA:41,0
253
+ DA:42,0
254
+ DA:45,0
255
+ DA:48,0
256
+ DA:49,0
257
+ DA:51,0
258
+ DA:55,0
259
+ DA:57,0
260
+ LF:23
261
+ LH:0
262
+ BRDA:14,0,0,0
263
+ BRDA:14,0,1,0
264
+ BRDA:14,1,0,0
265
+ BRDA:14,1,1,0
266
+ BRDA:21,2,0,0
267
+ BRDA:21,2,1,0
268
+ BRDA:27,3,0,0
269
+ BRDA:27,3,1,0
270
+ BRDA:31,4,0,0
271
+ BRDA:31,4,1,0
272
+ BRDA:45,5,0,0
273
+ BRDA:45,5,1,0
274
+ BRF:12
275
+ BRH:0
276
+ end_of_record
277
+ TN:
278
+ SF:src/import-specifiers-per-line.js
279
+ FN:19,(anonymous_0)
280
+ FN:27,(anonymous_1)
281
+ FN:34,(anonymous_2)
282
+ FN:73,(anonymous_3)
283
+ FN:94,(anonymous_4)
284
+ FNF:5
285
+ FNH:0
286
+ FNDA:0,(anonymous_0)
287
+ FNDA:0,(anonymous_1)
288
+ FNDA:0,(anonymous_2)
289
+ FNDA:0,(anonymous_3)
290
+ FNDA:0,(anonymous_4)
291
+ DA:20,0
292
+ DA:24,0
293
+ DA:26,0
294
+ DA:28,0
295
+ DA:30,0
296
+ DA:32,0
297
+ DA:34,0
298
+ DA:37,0
299
+ DA:39,0
300
+ DA:40,0
301
+ DA:43,0
302
+ DA:44,0
303
+ DA:48,0
304
+ DA:49,0
305
+ DA:50,0
306
+ DA:51,0
307
+ DA:55,0
308
+ DA:56,0
309
+ DA:60,0
310
+ DA:61,0
311
+ DA:63,0
312
+ DA:65,0
313
+ DA:66,0
314
+ DA:68,0
315
+ DA:69,0
316
+ DA:72,0
317
+ DA:73,0
318
+ DA:77,0
319
+ DA:84,0
320
+ DA:85,0
321
+ DA:87,0
322
+ DA:88,0
323
+ DA:91,0
324
+ DA:95,0
325
+ DA:96,0
326
+ LF:35
327
+ LH:0
328
+ BRDA:20,0,0,0
329
+ BRDA:20,0,1,0
330
+ BRDA:39,1,0,0
331
+ BRDA:39,1,1,0
332
+ BRDA:39,2,0,0
333
+ BRDA:39,2,1,0
334
+ BRDA:39,2,2,0
335
+ BRDA:43,3,0,0
336
+ BRDA:43,3,1,0
337
+ BRDA:43,4,0,0
338
+ BRDA:43,4,1,0
339
+ BRDA:49,5,0,0
340
+ BRDA:49,5,1,0
341
+ BRDA:55,6,0,0
342
+ BRDA:55,6,1,0
343
+ BRDA:77,7,0,0
344
+ BRDA:77,7,1,0
345
+ BRDA:79,8,0,0
346
+ BRDA:79,8,1,0
347
+ BRDA:80,9,0,0
348
+ BRDA:80,9,1,0
349
+ BRDA:87,10,0,0
350
+ BRDA:87,10,1,0
351
+ BRF:23
352
+ BRH:0
353
+ end_of_record
354
+ TN:
355
+ SF:src/index.js
356
+ FNF:0
357
+ FNH:0
358
+ LF:0
359
+ LH:0
360
+ BRF:0
361
+ BRH:0
362
+ end_of_record
363
+ TN:
364
+ SF:src/jsx-expression-string-literals.js
365
+ FN:12,(anonymous_0)
366
+ FN:14,(anonymous_1)
367
+ FN:32,(anonymous_2)
368
+ FNF:3
369
+ FNH:0
370
+ FNDA:0,(anonymous_0)
371
+ FNDA:0,(anonymous_1)
372
+ FNDA:0,(anonymous_2)
373
+ DA:13,0
374
+ DA:15,0
375
+ DA:18,0
376
+ DA:20,0
377
+ DA:23,0
378
+ DA:25,0
379
+ DA:27,0
380
+ DA:34,0
381
+ DA:35,0
382
+ LF:9
383
+ LH:0
384
+ BRDA:15,0,0,0
385
+ BRDA:15,0,1,0
386
+ BRDA:18,1,0,0
387
+ BRDA:18,1,1,0
388
+ BRDA:23,2,0,0
389
+ BRDA:23,2,1,0
390
+ BRDA:23,3,0,0
391
+ BRDA:23,3,1,0
392
+ BRF:8
393
+ BRH:0
394
+ end_of_record
@@ -0,0 +1,16 @@
1
+ declare namespace _default {
2
+ namespace meta {
3
+ let type: string;
4
+ namespace docs {
5
+ let description: string;
6
+ let category: string;
7
+ let recommended: boolean;
8
+ }
9
+ let fixable: string;
10
+ let schema: any[];
11
+ }
12
+ function create(context: any): {
13
+ ArrayExpression(node: any): void;
14
+ };
15
+ }
16
+ export default _default;
@@ -0,0 +1,21 @@
1
+ export function isMissingImportant(cls: any): boolean;
2
+ export function addImportant(cls: any): string;
3
+ declare namespace _default {
4
+ namespace meta {
5
+ let type: string;
6
+ namespace docs {
7
+ let description: string;
8
+ let recommended: boolean;
9
+ }
10
+ let fixable: string;
11
+ let schema: any[];
12
+ namespace messages {
13
+ let missingImportant: string;
14
+ }
15
+ }
16
+ function create(context: any): {
17
+ JSXAttribute(node: any): void;
18
+ VariableDeclarator(node: any): void;
19
+ };
20
+ }
21
+ export default _default;
@@ -0,0 +1,14 @@
1
+ declare namespace _default {
2
+ namespace meta {
3
+ let type: string;
4
+ namespace docs {
5
+ let description: string;
6
+ }
7
+ let fixable: string;
8
+ let schema: any[];
9
+ }
10
+ function create(context: any): {
11
+ ExportNamedDeclaration(node: any): void;
12
+ };
13
+ }
14
+ export default _default;
@@ -0,0 +1,27 @@
1
+ declare namespace _default {
2
+ namespace meta {
3
+ let type: string;
4
+ namespace docs {
5
+ let description: string;
6
+ }
7
+ let fixable: string;
8
+ let schema: {
9
+ type: string;
10
+ properties: {
11
+ maxSpecifiers: {
12
+ type: string;
13
+ default: number;
14
+ };
15
+ maxLen: {
16
+ type: string;
17
+ default: number;
18
+ };
19
+ };
20
+ additionalProperties: boolean;
21
+ }[];
22
+ }
23
+ function create(context: any): {
24
+ ImportDeclaration(node: any): void;
25
+ };
26
+ }
27
+ export default _default;
@@ -0,0 +1,90 @@
1
+ declare namespace _default {
2
+ let rules: {
3
+ 'import-specifiers-per-line': {
4
+ meta: {
5
+ type: string;
6
+ docs: {
7
+ description: string;
8
+ };
9
+ fixable: string;
10
+ schema: {
11
+ type: string;
12
+ properties: {
13
+ maxSpecifiers: {
14
+ type: string;
15
+ default: number;
16
+ };
17
+ maxLen: {
18
+ type: string;
19
+ default: number;
20
+ };
21
+ };
22
+ additionalProperties: boolean;
23
+ }[];
24
+ };
25
+ create(context: any): {
26
+ ImportDeclaration(node: any): void;
27
+ };
28
+ };
29
+ 'array-elements-per-line': {
30
+ meta: {
31
+ type: string;
32
+ docs: {
33
+ description: string;
34
+ category: string;
35
+ recommended: boolean;
36
+ };
37
+ fixable: string;
38
+ schema: any[];
39
+ };
40
+ create(context: any): {
41
+ ArrayExpression(node: any): void;
42
+ };
43
+ };
44
+ 'export-specifiers-per-line': {
45
+ meta: {
46
+ type: string;
47
+ docs: {
48
+ description: string;
49
+ };
50
+ fixable: string;
51
+ schema: any[];
52
+ };
53
+ create(context: any): {
54
+ ExportNamedDeclaration(node: any): void;
55
+ };
56
+ };
57
+ 'jsx-expression-string-literals': {
58
+ meta: {
59
+ type: string;
60
+ docs: {
61
+ description: string;
62
+ };
63
+ fixable: string;
64
+ schema: any[];
65
+ };
66
+ create(context: any): {
67
+ JSXAttribute(node: any): void;
68
+ };
69
+ };
70
+ 'enforce-tailwind-important': {
71
+ meta: {
72
+ type: string;
73
+ docs: {
74
+ description: string;
75
+ recommended: boolean;
76
+ };
77
+ fixable: string;
78
+ schema: any[];
79
+ messages: {
80
+ missingImportant: string;
81
+ };
82
+ };
83
+ create(context: any): {
84
+ JSXAttribute(node: any): void;
85
+ VariableDeclarator(node: any): void;
86
+ };
87
+ };
88
+ };
89
+ }
90
+ export default _default;
@@ -0,0 +1,14 @@
1
+ declare namespace _default {
2
+ namespace meta {
3
+ let type: string;
4
+ namespace docs {
5
+ let description: string;
6
+ }
7
+ let fixable: string;
8
+ let schema: any[];
9
+ }
10
+ function create(context: any): {
11
+ JSXAttribute(node: any): void;
12
+ };
13
+ }
14
+ export default _default;
package/jest.config.ts ADDED
@@ -0,0 +1,17 @@
1
+ import type { Config } from 'jest';
2
+
3
+ const config: Config = {
4
+ moduleFileExtensions: ['js'],
5
+ testEnvironment: 'node',
6
+ collectCoverage: true,
7
+ coveragePathIgnorePatterns: [],
8
+ testMatch: ['<rootDir>/tests/**/*.spec.js'],
9
+ collectCoverageFrom: [
10
+ 'src/**/*.js',
11
+ '!dist',
12
+ '!coverage/**',
13
+ '!node_modules/**',
14
+ ],
15
+ };
16
+
17
+ export default config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tcy/eslint-rules",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "```typescript import { plugin as customRules } from 'tcy@eslint-rules/src/index.mjs';",
5
5
  "homepage": "https://github.com/tcastelly/eslint-rules#readme",
6
6
  "bugs": {
@@ -11,8 +11,23 @@
11
11
  "url": "git+https://github.com/tcastelly/eslint-rules.git"
12
12
  },
13
13
  "license": "ISC",
14
- "author": "",
14
+ "author": "Thomas CASTELLY",
15
15
  "type": "module",
16
16
  "main": "src/index.js",
17
- "scripts": {}
17
+ "types": "dist/index.d.ts",
18
+ "scripts": {
19
+ "clean": "rimraf dist",
20
+ "build:decl": "tsc",
21
+ "prepublishOnly": "npm run clean && npm run test && npm run build:decl",
22
+ "test": "jest"
23
+ },
24
+ "devDependencies": {
25
+ "@babel/core": "^7.28.5",
26
+ "@babel/preset-env": "^7.28.5",
27
+ "@types/jest": "^30.0.0",
28
+ "babel-jest": "^30.2.0",
29
+ "jest": "^30.2.0",
30
+ "rimraf": "^6.1.2",
31
+ "typescript": "^5.9.3"
32
+ }
18
33
  }
@@ -0,0 +1,15 @@
1
+ import { isMissingImportant } from '../src/enforce-tailwind-important';
2
+
3
+ describe('GIVEN "enforce-tailwind-important"', () => {
4
+ describe('WHEN "test" important class', () => {
5
+ let isImportantClass = false;
6
+
7
+ beforeEach(() => {
8
+ isImportantClass = isMissingImportant('a-class');
9
+ });
10
+
11
+ it('THEN the class should not be important', () => {
12
+ expect(isImportantClass).toBe(true);
13
+ });
14
+ });
15
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "dist",
4
+ "declaration": true,
5
+ "emitDeclarationOnly": true,
6
+ "module": "ESNext",
7
+ "allowJs": true,
8
+ "checkJs": true,
9
+ "target": "es5",
10
+ "lib": ["es2016", "dom"],
11
+ "noImplicitAny": false,
12
+ "moduleResolution": "node",
13
+ },
14
+ "include": ["src"],
15
+ "exclude": ["dist", "node_modules"]
16
+ }