@saasmakers/eslint 0.1.1 → 0.1.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.
- package/dist/eslint.config.cjs +266 -0
- package/dist/eslint.config.d.cts +258 -0
- package/dist/eslint.config.d.mts +258 -0
- package/dist/eslint.config.d.ts +258 -0
- package/dist/eslint.config.mjs +258 -0
- package/dist/index.cjs +14215 -2
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +14210 -2
- package/package.json +9 -2
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const antfu = require('@antfu/eslint-config');
|
|
4
|
+
const saasmakers = require('@saasmakers/eslint');
|
|
5
|
+
const packageJson = require('eslint-plugin-package-json');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
8
|
+
|
|
9
|
+
const antfu__default = /*#__PURE__*/_interopDefaultCompat(antfu);
|
|
10
|
+
const saasmakers__default = /*#__PURE__*/_interopDefaultCompat(saasmakers);
|
|
11
|
+
const packageJson__default = /*#__PURE__*/_interopDefaultCompat(packageJson);
|
|
12
|
+
|
|
13
|
+
const eslint_config = antfu__default(
|
|
14
|
+
{
|
|
15
|
+
ignores: [
|
|
16
|
+
"*.md",
|
|
17
|
+
"**/.nuxt",
|
|
18
|
+
"**/.turbo",
|
|
19
|
+
"**/android",
|
|
20
|
+
"**/build",
|
|
21
|
+
"**/dbschema",
|
|
22
|
+
"**/dist",
|
|
23
|
+
"**/dumps/*.json",
|
|
24
|
+
"**/ios",
|
|
25
|
+
"node_modules"
|
|
26
|
+
],
|
|
27
|
+
regexp: false,
|
|
28
|
+
typescript: true,
|
|
29
|
+
unocss: true,
|
|
30
|
+
vue: true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
languageOptions: {
|
|
34
|
+
globals: {
|
|
35
|
+
$FPROM: true,
|
|
36
|
+
$nuxt: true,
|
|
37
|
+
chrome: true,
|
|
38
|
+
gapi: true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
plugins: {
|
|
42
|
+
"package-json": packageJson__default,
|
|
43
|
+
saasmakers: saasmakers__default
|
|
44
|
+
},
|
|
45
|
+
rules: {
|
|
46
|
+
"array-bracket-newline": [
|
|
47
|
+
"error",
|
|
48
|
+
{
|
|
49
|
+
minItems: 3,
|
|
50
|
+
multiline: true
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"brace-style": [
|
|
54
|
+
"error",
|
|
55
|
+
"stroustrup",
|
|
56
|
+
{ allowSingleLine: false }
|
|
57
|
+
],
|
|
58
|
+
"curly": ["error", "all"],
|
|
59
|
+
"id-length": [
|
|
60
|
+
"error",
|
|
61
|
+
{
|
|
62
|
+
exceptions: [
|
|
63
|
+
"_",
|
|
64
|
+
"t",
|
|
65
|
+
"x",
|
|
66
|
+
"y"
|
|
67
|
+
],
|
|
68
|
+
min: 2
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"no-console": "off",
|
|
72
|
+
"no-control-regex": "off",
|
|
73
|
+
"no-labels": "off",
|
|
74
|
+
"no-restricted-globals": "off",
|
|
75
|
+
// Fix
|
|
76
|
+
"no-restricted-syntax": "off",
|
|
77
|
+
"no-throw-literal": "off",
|
|
78
|
+
// Fix
|
|
79
|
+
"no-unmodified-loop-condition": "off",
|
|
80
|
+
// Fix
|
|
81
|
+
"no-use-before-define": "off",
|
|
82
|
+
"no-var": "off",
|
|
83
|
+
"node/prefer-global/buffer": ["error", "always"],
|
|
84
|
+
"node/prefer-global/process": ["error", "always"],
|
|
85
|
+
"object-curly-newline": [
|
|
86
|
+
"error",
|
|
87
|
+
{
|
|
88
|
+
ExportDeclaration: {
|
|
89
|
+
minProperties: 2,
|
|
90
|
+
multiline: true
|
|
91
|
+
},
|
|
92
|
+
ImportDeclaration: "never",
|
|
93
|
+
ObjectExpression: {
|
|
94
|
+
minProperties: 2,
|
|
95
|
+
multiline: true
|
|
96
|
+
},
|
|
97
|
+
ObjectPattern: { multiline: true }
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"object-property-newline": ["error", { allowAllPropertiesOnSameLine: false }],
|
|
101
|
+
"package-json/sort-collections": "error",
|
|
102
|
+
"padding-line-between-statements": [
|
|
103
|
+
"error",
|
|
104
|
+
{
|
|
105
|
+
blankLine: "always",
|
|
106
|
+
next: "*",
|
|
107
|
+
prev: [
|
|
108
|
+
"const",
|
|
109
|
+
"let",
|
|
110
|
+
"var"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
blankLine: "any",
|
|
115
|
+
next: [
|
|
116
|
+
"const",
|
|
117
|
+
"let",
|
|
118
|
+
"var"
|
|
119
|
+
],
|
|
120
|
+
prev: [
|
|
121
|
+
"const",
|
|
122
|
+
"let",
|
|
123
|
+
"var"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
blankLine: "always",
|
|
128
|
+
next: "return",
|
|
129
|
+
prev: "*"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
blankLine: "always",
|
|
133
|
+
next: "let",
|
|
134
|
+
prev: "const"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
blankLine: "always",
|
|
138
|
+
next: "const",
|
|
139
|
+
prev: "let"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"perfectionist/sort-array-includes": ["error", { type: "natural" }],
|
|
143
|
+
"perfectionist/sort-classes": [
|
|
144
|
+
"error",
|
|
145
|
+
{
|
|
146
|
+
groups: [
|
|
147
|
+
"index-signature",
|
|
148
|
+
"static-property",
|
|
149
|
+
"private-property",
|
|
150
|
+
"property",
|
|
151
|
+
"constructor",
|
|
152
|
+
"static-method",
|
|
153
|
+
"private-method",
|
|
154
|
+
"method"
|
|
155
|
+
],
|
|
156
|
+
type: "natural"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"perfectionist/sort-enums": ["error", { type: "natural" }],
|
|
160
|
+
"perfectionist/sort-exports": ["error", { type: "natural" }],
|
|
161
|
+
"perfectionist/sort-interfaces": ["error", { type: "natural" }],
|
|
162
|
+
"perfectionist/sort-maps": ["error", { type: "natural" }],
|
|
163
|
+
"perfectionist/sort-named-exports": ["error", { type: "natural" }],
|
|
164
|
+
"perfectionist/sort-named-imports": ["error", { type: "natural" }],
|
|
165
|
+
"perfectionist/sort-object-types": ["error", { type: "natural" }],
|
|
166
|
+
"perfectionist/sort-objects": [
|
|
167
|
+
"error",
|
|
168
|
+
{
|
|
169
|
+
partitionByNewLine: true,
|
|
170
|
+
type: "natural"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"perfectionist/sort-union-types": ["error", { type: "natural" }],
|
|
174
|
+
"prefer-regex-literals": "off",
|
|
175
|
+
"quotes": [
|
|
176
|
+
"error",
|
|
177
|
+
"single",
|
|
178
|
+
{
|
|
179
|
+
allowTemplateLiterals: false,
|
|
180
|
+
avoidEscape: true
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"saasmakers/ts-multiline-ternary": "error",
|
|
184
|
+
"saasmakers/ts-multiline-union": "error",
|
|
185
|
+
"saasmakers/ts-sort-tests": "error",
|
|
186
|
+
"sort-imports": "off",
|
|
187
|
+
"ts/ban-ts-comment": "off",
|
|
188
|
+
"ts/ban-ts-ignore": "off",
|
|
189
|
+
"ts/ban-types": "off",
|
|
190
|
+
"ts/explicit-member-accessibility": "off",
|
|
191
|
+
"ts/no-explicit-any": "error",
|
|
192
|
+
"ts/no-invalid-this": "off",
|
|
193
|
+
"ts/no-namespace": "off",
|
|
194
|
+
"ts/no-require-imports": "off",
|
|
195
|
+
"ts/no-shadow": "off",
|
|
196
|
+
"ts/no-unused-expressions": "off",
|
|
197
|
+
"ts/no-use-before-define": "off",
|
|
198
|
+
"ts/no-var-requires": "off",
|
|
199
|
+
"unicorn/filename-case": "off",
|
|
200
|
+
"vars-on-top": "off",
|
|
201
|
+
"vue/attributes-order": [
|
|
202
|
+
"error",
|
|
203
|
+
{
|
|
204
|
+
alphabetical: true,
|
|
205
|
+
order: [
|
|
206
|
+
"DEFINITION",
|
|
207
|
+
"LIST_RENDERING",
|
|
208
|
+
"CONDITIONALS",
|
|
209
|
+
"RENDER_MODIFIERS",
|
|
210
|
+
"GLOBAL",
|
|
211
|
+
["UNIQUE", "SLOT"],
|
|
212
|
+
"TWO_WAY_BINDING",
|
|
213
|
+
"OTHER_DIRECTIVES",
|
|
214
|
+
"OTHER_ATTR",
|
|
215
|
+
"EVENTS",
|
|
216
|
+
"CONTENT"
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"vue/component-name-in-template-casing": [
|
|
221
|
+
"error",
|
|
222
|
+
"PascalCase",
|
|
223
|
+
{ registeredComponentsOnly: false }
|
|
224
|
+
],
|
|
225
|
+
"vue/first-attribute-linebreak": [
|
|
226
|
+
"error",
|
|
227
|
+
{
|
|
228
|
+
multiline: "below",
|
|
229
|
+
singleline: "beside"
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
// 'vue/define-macros-order': 'off',
|
|
233
|
+
"vue/max-attributes-per-line": [
|
|
234
|
+
"error",
|
|
235
|
+
{
|
|
236
|
+
multiline: 1,
|
|
237
|
+
singleline: 1
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"vue/multiline-html-element-content-newline": [
|
|
241
|
+
"error",
|
|
242
|
+
{
|
|
243
|
+
allowEmptyLines: false,
|
|
244
|
+
ignores: ["pre", "textarea"],
|
|
245
|
+
ignoreWhenEmpty: true
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"vue/no-side-effects-in-computed-properties": "off",
|
|
249
|
+
"vue/padding-line-between-tags": [
|
|
250
|
+
"error",
|
|
251
|
+
[
|
|
252
|
+
{
|
|
253
|
+
blankLine: "always",
|
|
254
|
+
next: "*",
|
|
255
|
+
prev: "*"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
],
|
|
259
|
+
"vue/return-in-computed-property": "off",
|
|
260
|
+
// This conflicts with another rule that removes empty `return` statements
|
|
261
|
+
"vue/singleline-html-element-content-newline": "off"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
module.exports = eslint_config;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import antfu from '@antfu/eslint-config';
|
|
2
|
+
import saasmakers from '@saasmakers/eslint';
|
|
3
|
+
import packageJson from 'eslint-plugin-package-json';
|
|
4
|
+
|
|
5
|
+
var eslint_config = antfu(
|
|
6
|
+
{
|
|
7
|
+
ignores: [
|
|
8
|
+
"*.md",
|
|
9
|
+
"**/.nuxt",
|
|
10
|
+
"**/.turbo",
|
|
11
|
+
"**/android",
|
|
12
|
+
"**/build",
|
|
13
|
+
"**/dbschema",
|
|
14
|
+
"**/dist",
|
|
15
|
+
"**/dumps/*.json",
|
|
16
|
+
"**/ios",
|
|
17
|
+
"node_modules"
|
|
18
|
+
],
|
|
19
|
+
regexp: false,
|
|
20
|
+
typescript: true,
|
|
21
|
+
unocss: true,
|
|
22
|
+
vue: true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
languageOptions: {
|
|
26
|
+
globals: {
|
|
27
|
+
$FPROM: true,
|
|
28
|
+
$nuxt: true,
|
|
29
|
+
chrome: true,
|
|
30
|
+
gapi: true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
plugins: {
|
|
34
|
+
"package-json": packageJson,
|
|
35
|
+
saasmakers
|
|
36
|
+
},
|
|
37
|
+
rules: {
|
|
38
|
+
"array-bracket-newline": [
|
|
39
|
+
"error",
|
|
40
|
+
{
|
|
41
|
+
minItems: 3,
|
|
42
|
+
multiline: true
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"brace-style": [
|
|
46
|
+
"error",
|
|
47
|
+
"stroustrup",
|
|
48
|
+
{ allowSingleLine: false }
|
|
49
|
+
],
|
|
50
|
+
"curly": ["error", "all"],
|
|
51
|
+
"id-length": [
|
|
52
|
+
"error",
|
|
53
|
+
{
|
|
54
|
+
exceptions: [
|
|
55
|
+
"_",
|
|
56
|
+
"t",
|
|
57
|
+
"x",
|
|
58
|
+
"y"
|
|
59
|
+
],
|
|
60
|
+
min: 2
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"no-console": "off",
|
|
64
|
+
"no-control-regex": "off",
|
|
65
|
+
"no-labels": "off",
|
|
66
|
+
"no-restricted-globals": "off",
|
|
67
|
+
// Fix
|
|
68
|
+
"no-restricted-syntax": "off",
|
|
69
|
+
"no-throw-literal": "off",
|
|
70
|
+
// Fix
|
|
71
|
+
"no-unmodified-loop-condition": "off",
|
|
72
|
+
// Fix
|
|
73
|
+
"no-use-before-define": "off",
|
|
74
|
+
"no-var": "off",
|
|
75
|
+
"node/prefer-global/buffer": ["error", "always"],
|
|
76
|
+
"node/prefer-global/process": ["error", "always"],
|
|
77
|
+
"object-curly-newline": [
|
|
78
|
+
"error",
|
|
79
|
+
{
|
|
80
|
+
ExportDeclaration: {
|
|
81
|
+
minProperties: 2,
|
|
82
|
+
multiline: true
|
|
83
|
+
},
|
|
84
|
+
ImportDeclaration: "never",
|
|
85
|
+
ObjectExpression: {
|
|
86
|
+
minProperties: 2,
|
|
87
|
+
multiline: true
|
|
88
|
+
},
|
|
89
|
+
ObjectPattern: { multiline: true }
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"object-property-newline": ["error", { allowAllPropertiesOnSameLine: false }],
|
|
93
|
+
"package-json/sort-collections": "error",
|
|
94
|
+
"padding-line-between-statements": [
|
|
95
|
+
"error",
|
|
96
|
+
{
|
|
97
|
+
blankLine: "always",
|
|
98
|
+
next: "*",
|
|
99
|
+
prev: [
|
|
100
|
+
"const",
|
|
101
|
+
"let",
|
|
102
|
+
"var"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
blankLine: "any",
|
|
107
|
+
next: [
|
|
108
|
+
"const",
|
|
109
|
+
"let",
|
|
110
|
+
"var"
|
|
111
|
+
],
|
|
112
|
+
prev: [
|
|
113
|
+
"const",
|
|
114
|
+
"let",
|
|
115
|
+
"var"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
blankLine: "always",
|
|
120
|
+
next: "return",
|
|
121
|
+
prev: "*"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
blankLine: "always",
|
|
125
|
+
next: "let",
|
|
126
|
+
prev: "const"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
blankLine: "always",
|
|
130
|
+
next: "const",
|
|
131
|
+
prev: "let"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"perfectionist/sort-array-includes": ["error", { type: "natural" }],
|
|
135
|
+
"perfectionist/sort-classes": [
|
|
136
|
+
"error",
|
|
137
|
+
{
|
|
138
|
+
groups: [
|
|
139
|
+
"index-signature",
|
|
140
|
+
"static-property",
|
|
141
|
+
"private-property",
|
|
142
|
+
"property",
|
|
143
|
+
"constructor",
|
|
144
|
+
"static-method",
|
|
145
|
+
"private-method",
|
|
146
|
+
"method"
|
|
147
|
+
],
|
|
148
|
+
type: "natural"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"perfectionist/sort-enums": ["error", { type: "natural" }],
|
|
152
|
+
"perfectionist/sort-exports": ["error", { type: "natural" }],
|
|
153
|
+
"perfectionist/sort-interfaces": ["error", { type: "natural" }],
|
|
154
|
+
"perfectionist/sort-maps": ["error", { type: "natural" }],
|
|
155
|
+
"perfectionist/sort-named-exports": ["error", { type: "natural" }],
|
|
156
|
+
"perfectionist/sort-named-imports": ["error", { type: "natural" }],
|
|
157
|
+
"perfectionist/sort-object-types": ["error", { type: "natural" }],
|
|
158
|
+
"perfectionist/sort-objects": [
|
|
159
|
+
"error",
|
|
160
|
+
{
|
|
161
|
+
partitionByNewLine: true,
|
|
162
|
+
type: "natural"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"perfectionist/sort-union-types": ["error", { type: "natural" }],
|
|
166
|
+
"prefer-regex-literals": "off",
|
|
167
|
+
"quotes": [
|
|
168
|
+
"error",
|
|
169
|
+
"single",
|
|
170
|
+
{
|
|
171
|
+
allowTemplateLiterals: false,
|
|
172
|
+
avoidEscape: true
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"saasmakers/ts-multiline-ternary": "error",
|
|
176
|
+
"saasmakers/ts-multiline-union": "error",
|
|
177
|
+
"saasmakers/ts-sort-tests": "error",
|
|
178
|
+
"sort-imports": "off",
|
|
179
|
+
"ts/ban-ts-comment": "off",
|
|
180
|
+
"ts/ban-ts-ignore": "off",
|
|
181
|
+
"ts/ban-types": "off",
|
|
182
|
+
"ts/explicit-member-accessibility": "off",
|
|
183
|
+
"ts/no-explicit-any": "error",
|
|
184
|
+
"ts/no-invalid-this": "off",
|
|
185
|
+
"ts/no-namespace": "off",
|
|
186
|
+
"ts/no-require-imports": "off",
|
|
187
|
+
"ts/no-shadow": "off",
|
|
188
|
+
"ts/no-unused-expressions": "off",
|
|
189
|
+
"ts/no-use-before-define": "off",
|
|
190
|
+
"ts/no-var-requires": "off",
|
|
191
|
+
"unicorn/filename-case": "off",
|
|
192
|
+
"vars-on-top": "off",
|
|
193
|
+
"vue/attributes-order": [
|
|
194
|
+
"error",
|
|
195
|
+
{
|
|
196
|
+
alphabetical: true,
|
|
197
|
+
order: [
|
|
198
|
+
"DEFINITION",
|
|
199
|
+
"LIST_RENDERING",
|
|
200
|
+
"CONDITIONALS",
|
|
201
|
+
"RENDER_MODIFIERS",
|
|
202
|
+
"GLOBAL",
|
|
203
|
+
["UNIQUE", "SLOT"],
|
|
204
|
+
"TWO_WAY_BINDING",
|
|
205
|
+
"OTHER_DIRECTIVES",
|
|
206
|
+
"OTHER_ATTR",
|
|
207
|
+
"EVENTS",
|
|
208
|
+
"CONTENT"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"vue/component-name-in-template-casing": [
|
|
213
|
+
"error",
|
|
214
|
+
"PascalCase",
|
|
215
|
+
{ registeredComponentsOnly: false }
|
|
216
|
+
],
|
|
217
|
+
"vue/first-attribute-linebreak": [
|
|
218
|
+
"error",
|
|
219
|
+
{
|
|
220
|
+
multiline: "below",
|
|
221
|
+
singleline: "beside"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
// 'vue/define-macros-order': 'off',
|
|
225
|
+
"vue/max-attributes-per-line": [
|
|
226
|
+
"error",
|
|
227
|
+
{
|
|
228
|
+
multiline: 1,
|
|
229
|
+
singleline: 1
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"vue/multiline-html-element-content-newline": [
|
|
233
|
+
"error",
|
|
234
|
+
{
|
|
235
|
+
allowEmptyLines: false,
|
|
236
|
+
ignores: ["pre", "textarea"],
|
|
237
|
+
ignoreWhenEmpty: true
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"vue/no-side-effects-in-computed-properties": "off",
|
|
241
|
+
"vue/padding-line-between-tags": [
|
|
242
|
+
"error",
|
|
243
|
+
[
|
|
244
|
+
{
|
|
245
|
+
blankLine: "always",
|
|
246
|
+
next: "*",
|
|
247
|
+
prev: "*"
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
],
|
|
251
|
+
"vue/return-in-computed-property": "off",
|
|
252
|
+
// This conflicts with another rule that removes empty `return` statements
|
|
253
|
+
"vue/singleline-html-element-content-newline": "off"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
|
|
258
|
+
export = eslint_config;
|