@tcy/eslint-rules 1.4.2 → 1.4.3

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