@tcy/eslint-rules 1.4.2 → 1.4.4

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.
Files changed (38) hide show
  1. package/README.md +5 -7
  2. package/coverage/clover.xml +12 -3
  3. package/coverage/coverage-final.json +3 -0
  4. package/coverage/lcov-report/array-elements-per-line.js.html +1 -1
  5. package/coverage/lcov-report/back.js.html +127 -0
  6. package/coverage/lcov-report/client.js.html +142 -0
  7. package/coverage/lcov-report/decorator-type-enforcement.js.html +1 -1
  8. package/coverage/lcov-report/enforce-tailwind-important.js.html +1 -1
  9. package/coverage/lcov-report/export-specifiers-per-line.js.html +1 -1
  10. package/coverage/lcov-report/import-specifiers-per-line.js.html +1 -1
  11. package/coverage/lcov-report/index.html +46 -1
  12. package/coverage/lcov-report/index.js.html +4 -109
  13. package/coverage/lcov-report/jsx-expression-string-literals.js.html +1 -1
  14. package/coverage/lcov-report/plugin.js.html +148 -0
  15. package/coverage/lcov-report/v-model-name-match.js.html +1 -1
  16. package/coverage/lcov-report/vuejs-define-component.js.html +1 -1
  17. package/coverage/lcov-report/vuejs-define-workspace.js.html +1 -1
  18. package/coverage/lcov.info +27 -0
  19. package/decl/back.d.ts +16 -0
  20. package/decl/client.d.ts +21 -0
  21. package/decl/index.d.ts +2 -0
  22. package/decl/plugin.d.ts +147 -0
  23. package/package.json +13 -3
  24. package/src/back.js +14 -0
  25. package/src/client.js +19 -0
  26. package/src/index.js +2 -37
  27. package/src/plugin.js +21 -0
  28. package/tsconfig.json +1 -1
  29. package/dist/index.d.ts +0 -166
  30. /package/{dist → decl}/array-elements-per-line.d.ts +0 -0
  31. /package/{dist → decl}/decorator-type-enforcement.d.ts +0 -0
  32. /package/{dist → decl}/enforce-tailwind-important.d.ts +0 -0
  33. /package/{dist → decl}/export-specifiers-per-line.d.ts +0 -0
  34. /package/{dist → decl}/import-specifiers-per-line.d.ts +0 -0
  35. /package/{dist → decl}/jsx-expression-string-literals.d.ts +0 -0
  36. /package/{dist → decl}/v-model-name-match.d.ts +0 -0
  37. /package/{dist → decl}/vuejs-define-component.d.ts +0 -0
  38. /package/{dist → decl}/vuejs-define-workspace.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tcy/eslint-rules",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
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": {
@@ -14,10 +14,20 @@
14
14
  "author": "Thomas CASTELLY",
15
15
  "type": "module",
16
16
  "main": "src/index.js",
17
- "types": "dist/index.d.ts",
17
+ "types": "decl/index.d.ts",
18
+ "exports": {
19
+ "./client": {
20
+ "types": "./decl/client.d.ts",
21
+ "import": "./src/client.js"
22
+ },
23
+ "./back": {
24
+ "types": "./decl/back.d.ts",
25
+ "import": "./src/back.js"
26
+ }
27
+ },
18
28
  "scripts": {
19
29
  "build:decl": "tsc",
20
- "clean": "rimraf dist",
30
+ "clean": "rimraf decl",
21
31
  "prepublishOnly": "npm run clean && npm run test && npm run build:decl",
22
32
  "test": "jest"
23
33
  },
package/src/back.js ADDED
@@ -0,0 +1,14 @@
1
+ import pluginConfig from './plugin.js'
2
+
3
+ export default {
4
+ plugins: {
5
+ tcy: {
6
+ rules: pluginConfig
7
+ },
8
+ },
9
+ rules: {
10
+ 'tcy/import-specifiers-per-line': ['error', { maxSpecifiers: 4 }],
11
+ 'tcy/export-specifiers-per-line': 'error',
12
+ 'tcy/array-elements-per-line': 'error',
13
+ }
14
+ }
package/src/client.js ADDED
@@ -0,0 +1,19 @@
1
+ import pluginConfig from './plugin.js'
2
+
3
+ export default {
4
+ plugins: {
5
+ tcy: {
6
+ rules: pluginConfig
7
+ },
8
+ },
9
+ rules: {
10
+ 'tcy/import-specifiers-per-line': ['error', { maxSpecifiers: 4 }],
11
+ 'tcy/export-specifiers-per-line': 'error',
12
+ 'tcy/array-elements-per-line': 'error',
13
+ 'tcy/jsx-expression-string-literals': 'error',
14
+ 'tcy/enforce-tailwind-important': 'error',
15
+ 'tcy/v-model-name-match': 'error',
16
+ 'tcy/vuejs-define-component': 'error',
17
+ 'tcy/vuejs-define-workspace': 'error',
18
+ }
19
+ }
package/src/index.js CHANGED
@@ -1,37 +1,2 @@
1
- import importSpecifiersPerLineRule from './import-specifiers-per-line.js';
2
- import arrayElementsPerLineRule from './array-elements-per-line.js';
3
- import exportSpecifiersPerLineRule from './export-specifiers-per-line.js';
4
- import jsxExpressionStringLiterals from './jsx-expression-string-literals.js';
5
- import enforceTailwindImportant from './enforce-tailwind-important.js';
6
- import vModelNameMatch from './v-model-name-match.js';
7
- import decoratorTypeEnforcement from './decorator-type-enforcement.js'
8
- import vuejsDefineComponent from './vuejs-define-component.js'
9
- import vuejsDefineWorkspace from './vuejs-define-workspace.js'
10
-
11
- export default {
12
- plugins: {
13
- tcy: {
14
- rules: {
15
- 'import-specifiers-per-line': importSpecifiersPerLineRule,
16
- 'array-elements-per-line': arrayElementsPerLineRule,
17
- 'export-specifiers-per-line': exportSpecifiersPerLineRule,
18
- 'jsx-expression-string-literals': jsxExpressionStringLiterals,
19
- 'enforce-tailwind-important': enforceTailwindImportant,
20
- 'v-model-name-match': vModelNameMatch,
21
- 'decorator-type-enforcement': decoratorTypeEnforcement,
22
- 'vuejs-define-component': vuejsDefineComponent,
23
- 'vuejs-define-workspace': vuejsDefineWorkspace,
24
- }
25
- }
26
- },
27
- rules: {
28
- 'tcy/import-specifiers-per-line': ['error', { maxSpecifiers: 4 }],
29
- 'tcy/export-specifiers-per-line': 'error',
30
- 'tcy/array-elements-per-line': 'error',
31
- 'tcy/jsx-expression-string-literals': 'error',
32
- 'tcy/enforce-tailwind-important': 'error',
33
- 'tcy/v-model-name-match': 'error',
34
- 'tcy/vuejs-define-component': 'error',
35
- 'tcy/vuejs-define-workspace': 'error',
36
- },
37
- };
1
+ export * as client from './client.js'
2
+ export * as back from './back.js'
package/src/plugin.js ADDED
@@ -0,0 +1,21 @@
1
+ import importSpecifiersPerLineRule from './import-specifiers-per-line.js';
2
+ import arrayElementsPerLineRule from './array-elements-per-line.js';
3
+ import exportSpecifiersPerLineRule from './export-specifiers-per-line.js';
4
+ import jsxExpressionStringLiterals from './jsx-expression-string-literals.js';
5
+ import enforceTailwindImportant from './enforce-tailwind-important.js';
6
+ import vModelNameMatch from './v-model-name-match.js';
7
+ import decoratorTypeEnforcement from './decorator-type-enforcement.js'
8
+ import vuejsDefineComponent from './vuejs-define-component.js'
9
+ import vuejsDefineWorkspace from './vuejs-define-workspace.js'
10
+
11
+ export default {
12
+ 'import-specifiers-per-line': importSpecifiersPerLineRule,
13
+ 'array-elements-per-line': arrayElementsPerLineRule,
14
+ 'export-specifiers-per-line': exportSpecifiersPerLineRule,
15
+ 'jsx-expression-string-literals': jsxExpressionStringLiterals,
16
+ 'enforce-tailwind-important': enforceTailwindImportant,
17
+ 'v-model-name-match': vModelNameMatch,
18
+ 'decorator-type-enforcement': decoratorTypeEnforcement,
19
+ 'vuejs-define-component': vuejsDefineComponent,
20
+ 'vuejs-define-workspace': vuejsDefineWorkspace,
21
+ }
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "types": ["node"],
4
- "outDir": "dist",
4
+ "outDir": "decl",
5
5
  "rootDir": "src",
6
6
  "declaration": true,
7
7
  "emitDeclarationOnly": true,
package/dist/index.d.ts DELETED
@@ -1,166 +0,0 @@
1
- declare namespace _default {
2
- export namespace plugins {
3
- namespace tcy {
4
- let rules: {
5
- 'import-specifiers-per-line': {
6
- meta: {
7
- type: string;
8
- docs: {
9
- description: string;
10
- };
11
- fixable: string;
12
- schema: {
13
- type: string;
14
- properties: {
15
- maxSpecifiers: {
16
- type: string;
17
- default: number;
18
- };
19
- maxLen: {
20
- type: string;
21
- default: number;
22
- };
23
- };
24
- additionalProperties: boolean;
25
- }[];
26
- };
27
- create(context: any): {
28
- ImportDeclaration(node: any): void;
29
- };
30
- };
31
- 'array-elements-per-line': {
32
- meta: {
33
- type: string;
34
- docs: {
35
- description: string;
36
- category: string;
37
- recommended: boolean;
38
- };
39
- fixable: string;
40
- schema: never[];
41
- };
42
- create(context: any): {
43
- ArrayExpression(node: any): void;
44
- };
45
- };
46
- 'export-specifiers-per-line': {
47
- meta: {
48
- type: string;
49
- docs: {
50
- description: string;
51
- };
52
- fixable: string;
53
- schema: never[];
54
- };
55
- create(context: any): {
56
- ExportNamedDeclaration(node: any): void;
57
- };
58
- };
59
- 'jsx-expression-string-literals': {
60
- meta: {
61
- type: string;
62
- docs: {
63
- description: string;
64
- };
65
- fixable: string;
66
- schema: never[];
67
- };
68
- create(context: any): {
69
- JSXAttribute(node: any): void;
70
- };
71
- };
72
- 'enforce-tailwind-important': {
73
- meta: {
74
- type: string;
75
- docs: {
76
- description: string;
77
- recommended: boolean;
78
- };
79
- fixable: string;
80
- schema: never[];
81
- messages: {
82
- missingImportant: string;
83
- };
84
- };
85
- create(context: any): {
86
- JSXAttribute(node: any): void;
87
- VariableDeclarator(node: any): void;
88
- };
89
- };
90
- 'v-model-name-match': {
91
- meta: {
92
- type: string;
93
- docs: {
94
- description: string;
95
- recommended: boolean;
96
- };
97
- schema: never[];
98
- messages: {
99
- mismatch: string;
100
- };
101
- };
102
- create(context: any): {
103
- JSXOpeningElement(node: any): void;
104
- };
105
- };
106
- 'decorator-type-enforcement': {
107
- meta: {
108
- type: string;
109
- docs: {
110
- description: string;
111
- category: string;
112
- recommended: boolean;
113
- };
114
- fixable: string;
115
- schema: never[];
116
- };
117
- create(context: any): {
118
- PropertyDefinition(node: any): void;
119
- };
120
- };
121
- 'vuejs-define-component': {
122
- meta: {
123
- type: string;
124
- docs: {
125
- description: string;
126
- recommended: boolean;
127
- };
128
- schema: never[];
129
- };
130
- create(context: any): {
131
- ExportDefaultDeclaration(node: any): void;
132
- };
133
- };
134
- 'vuejs-define-workspace': {
135
- meta: {
136
- type: string;
137
- docs: {
138
- description: string;
139
- recommended: boolean;
140
- };
141
- schema: never[];
142
- };
143
- create(context: any): {
144
- ExportDefaultDeclaration?: undefined;
145
- } | {
146
- ExportDefaultDeclaration(node: any): void;
147
- };
148
- };
149
- };
150
- }
151
- }
152
- let rules_1: {
153
- 'tcy/import-specifiers-per-line': (string | {
154
- maxSpecifiers: number;
155
- })[];
156
- 'tcy/export-specifiers-per-line': string;
157
- 'tcy/array-elements-per-line': string;
158
- 'tcy/jsx-expression-string-literals': string;
159
- 'tcy/enforce-tailwind-important': string;
160
- 'tcy/v-model-name-match': string;
161
- 'tcy/vuejs-define-component': string;
162
- 'tcy/vuejs-define-workspace': string;
163
- };
164
- export { rules_1 as rules };
165
- }
166
- export default _default;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes