@saasmakers/eslint 0.1.1 → 0.1.2

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,264 @@
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-sort-tests": "error",
184
+ "sort-imports": "off",
185
+ "ts/ban-ts-comment": "off",
186
+ "ts/ban-ts-ignore": "off",
187
+ "ts/ban-types": "off",
188
+ "ts/explicit-member-accessibility": "off",
189
+ "ts/no-explicit-any": "error",
190
+ "ts/no-invalid-this": "off",
191
+ "ts/no-namespace": "off",
192
+ "ts/no-require-imports": "off",
193
+ "ts/no-shadow": "off",
194
+ "ts/no-unused-expressions": "off",
195
+ "ts/no-use-before-define": "off",
196
+ "ts/no-var-requires": "off",
197
+ "unicorn/filename-case": "off",
198
+ "vars-on-top": "off",
199
+ "vue/attributes-order": [
200
+ "error",
201
+ {
202
+ alphabetical: true,
203
+ order: [
204
+ "DEFINITION",
205
+ "LIST_RENDERING",
206
+ "CONDITIONALS",
207
+ "RENDER_MODIFIERS",
208
+ "GLOBAL",
209
+ ["UNIQUE", "SLOT"],
210
+ "TWO_WAY_BINDING",
211
+ "OTHER_DIRECTIVES",
212
+ "OTHER_ATTR",
213
+ "EVENTS",
214
+ "CONTENT"
215
+ ]
216
+ }
217
+ ],
218
+ "vue/component-name-in-template-casing": [
219
+ "error",
220
+ "PascalCase",
221
+ { registeredComponentsOnly: false }
222
+ ],
223
+ "vue/first-attribute-linebreak": [
224
+ "error",
225
+ {
226
+ multiline: "below",
227
+ singleline: "beside"
228
+ }
229
+ ],
230
+ // 'vue/define-macros-order': 'off',
231
+ "vue/max-attributes-per-line": [
232
+ "error",
233
+ {
234
+ multiline: 1,
235
+ singleline: 1
236
+ }
237
+ ],
238
+ "vue/multiline-html-element-content-newline": [
239
+ "error",
240
+ {
241
+ allowEmptyLines: false,
242
+ ignores: ["pre", "textarea"],
243
+ ignoreWhenEmpty: true
244
+ }
245
+ ],
246
+ "vue/no-side-effects-in-computed-properties": "off",
247
+ "vue/padding-line-between-tags": [
248
+ "error",
249
+ [
250
+ {
251
+ blankLine: "always",
252
+ next: "*",
253
+ prev: "*"
254
+ }
255
+ ]
256
+ ],
257
+ "vue/return-in-computed-property": "off",
258
+ // This conflicts with another rule that removes empty `return` statements
259
+ "vue/singleline-html-element-content-newline": "off"
260
+ }
261
+ }
262
+ );
263
+
264
+ module.exports = eslint_config;
@@ -0,0 +1,256 @@
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-sort-tests": "error",
176
+ "sort-imports": "off",
177
+ "ts/ban-ts-comment": "off",
178
+ "ts/ban-ts-ignore": "off",
179
+ "ts/ban-types": "off",
180
+ "ts/explicit-member-accessibility": "off",
181
+ "ts/no-explicit-any": "error",
182
+ "ts/no-invalid-this": "off",
183
+ "ts/no-namespace": "off",
184
+ "ts/no-require-imports": "off",
185
+ "ts/no-shadow": "off",
186
+ "ts/no-unused-expressions": "off",
187
+ "ts/no-use-before-define": "off",
188
+ "ts/no-var-requires": "off",
189
+ "unicorn/filename-case": "off",
190
+ "vars-on-top": "off",
191
+ "vue/attributes-order": [
192
+ "error",
193
+ {
194
+ alphabetical: true,
195
+ order: [
196
+ "DEFINITION",
197
+ "LIST_RENDERING",
198
+ "CONDITIONALS",
199
+ "RENDER_MODIFIERS",
200
+ "GLOBAL",
201
+ ["UNIQUE", "SLOT"],
202
+ "TWO_WAY_BINDING",
203
+ "OTHER_DIRECTIVES",
204
+ "OTHER_ATTR",
205
+ "EVENTS",
206
+ "CONTENT"
207
+ ]
208
+ }
209
+ ],
210
+ "vue/component-name-in-template-casing": [
211
+ "error",
212
+ "PascalCase",
213
+ { registeredComponentsOnly: false }
214
+ ],
215
+ "vue/first-attribute-linebreak": [
216
+ "error",
217
+ {
218
+ multiline: "below",
219
+ singleline: "beside"
220
+ }
221
+ ],
222
+ // 'vue/define-macros-order': 'off',
223
+ "vue/max-attributes-per-line": [
224
+ "error",
225
+ {
226
+ multiline: 1,
227
+ singleline: 1
228
+ }
229
+ ],
230
+ "vue/multiline-html-element-content-newline": [
231
+ "error",
232
+ {
233
+ allowEmptyLines: false,
234
+ ignores: ["pre", "textarea"],
235
+ ignoreWhenEmpty: true
236
+ }
237
+ ],
238
+ "vue/no-side-effects-in-computed-properties": "off",
239
+ "vue/padding-line-between-tags": [
240
+ "error",
241
+ [
242
+ {
243
+ blankLine: "always",
244
+ next: "*",
245
+ prev: "*"
246
+ }
247
+ ]
248
+ ],
249
+ "vue/return-in-computed-property": "off",
250
+ // This conflicts with another rule that removes empty `return` statements
251
+ "vue/singleline-html-element-content-newline": "off"
252
+ }
253
+ }
254
+ );
255
+
256
+ export = eslint_config;
@@ -0,0 +1,256 @@
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-sort-tests": "error",
176
+ "sort-imports": "off",
177
+ "ts/ban-ts-comment": "off",
178
+ "ts/ban-ts-ignore": "off",
179
+ "ts/ban-types": "off",
180
+ "ts/explicit-member-accessibility": "off",
181
+ "ts/no-explicit-any": "error",
182
+ "ts/no-invalid-this": "off",
183
+ "ts/no-namespace": "off",
184
+ "ts/no-require-imports": "off",
185
+ "ts/no-shadow": "off",
186
+ "ts/no-unused-expressions": "off",
187
+ "ts/no-use-before-define": "off",
188
+ "ts/no-var-requires": "off",
189
+ "unicorn/filename-case": "off",
190
+ "vars-on-top": "off",
191
+ "vue/attributes-order": [
192
+ "error",
193
+ {
194
+ alphabetical: true,
195
+ order: [
196
+ "DEFINITION",
197
+ "LIST_RENDERING",
198
+ "CONDITIONALS",
199
+ "RENDER_MODIFIERS",
200
+ "GLOBAL",
201
+ ["UNIQUE", "SLOT"],
202
+ "TWO_WAY_BINDING",
203
+ "OTHER_DIRECTIVES",
204
+ "OTHER_ATTR",
205
+ "EVENTS",
206
+ "CONTENT"
207
+ ]
208
+ }
209
+ ],
210
+ "vue/component-name-in-template-casing": [
211
+ "error",
212
+ "PascalCase",
213
+ { registeredComponentsOnly: false }
214
+ ],
215
+ "vue/first-attribute-linebreak": [
216
+ "error",
217
+ {
218
+ multiline: "below",
219
+ singleline: "beside"
220
+ }
221
+ ],
222
+ // 'vue/define-macros-order': 'off',
223
+ "vue/max-attributes-per-line": [
224
+ "error",
225
+ {
226
+ multiline: 1,
227
+ singleline: 1
228
+ }
229
+ ],
230
+ "vue/multiline-html-element-content-newline": [
231
+ "error",
232
+ {
233
+ allowEmptyLines: false,
234
+ ignores: ["pre", "textarea"],
235
+ ignoreWhenEmpty: true
236
+ }
237
+ ],
238
+ "vue/no-side-effects-in-computed-properties": "off",
239
+ "vue/padding-line-between-tags": [
240
+ "error",
241
+ [
242
+ {
243
+ blankLine: "always",
244
+ next: "*",
245
+ prev: "*"
246
+ }
247
+ ]
248
+ ],
249
+ "vue/return-in-computed-property": "off",
250
+ // This conflicts with another rule that removes empty `return` statements
251
+ "vue/singleline-html-element-content-newline": "off"
252
+ }
253
+ }
254
+ );
255
+
256
+ export { eslint_config as default };
@@ -0,0 +1,256 @@
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-sort-tests": "error",
176
+ "sort-imports": "off",
177
+ "ts/ban-ts-comment": "off",
178
+ "ts/ban-ts-ignore": "off",
179
+ "ts/ban-types": "off",
180
+ "ts/explicit-member-accessibility": "off",
181
+ "ts/no-explicit-any": "error",
182
+ "ts/no-invalid-this": "off",
183
+ "ts/no-namespace": "off",
184
+ "ts/no-require-imports": "off",
185
+ "ts/no-shadow": "off",
186
+ "ts/no-unused-expressions": "off",
187
+ "ts/no-use-before-define": "off",
188
+ "ts/no-var-requires": "off",
189
+ "unicorn/filename-case": "off",
190
+ "vars-on-top": "off",
191
+ "vue/attributes-order": [
192
+ "error",
193
+ {
194
+ alphabetical: true,
195
+ order: [
196
+ "DEFINITION",
197
+ "LIST_RENDERING",
198
+ "CONDITIONALS",
199
+ "RENDER_MODIFIERS",
200
+ "GLOBAL",
201
+ ["UNIQUE", "SLOT"],
202
+ "TWO_WAY_BINDING",
203
+ "OTHER_DIRECTIVES",
204
+ "OTHER_ATTR",
205
+ "EVENTS",
206
+ "CONTENT"
207
+ ]
208
+ }
209
+ ],
210
+ "vue/component-name-in-template-casing": [
211
+ "error",
212
+ "PascalCase",
213
+ { registeredComponentsOnly: false }
214
+ ],
215
+ "vue/first-attribute-linebreak": [
216
+ "error",
217
+ {
218
+ multiline: "below",
219
+ singleline: "beside"
220
+ }
221
+ ],
222
+ // 'vue/define-macros-order': 'off',
223
+ "vue/max-attributes-per-line": [
224
+ "error",
225
+ {
226
+ multiline: 1,
227
+ singleline: 1
228
+ }
229
+ ],
230
+ "vue/multiline-html-element-content-newline": [
231
+ "error",
232
+ {
233
+ allowEmptyLines: false,
234
+ ignores: ["pre", "textarea"],
235
+ ignoreWhenEmpty: true
236
+ }
237
+ ],
238
+ "vue/no-side-effects-in-computed-properties": "off",
239
+ "vue/padding-line-between-tags": [
240
+ "error",
241
+ [
242
+ {
243
+ blankLine: "always",
244
+ next: "*",
245
+ prev: "*"
246
+ }
247
+ ]
248
+ ],
249
+ "vue/return-in-computed-property": "off",
250
+ // This conflicts with another rule that removes empty `return` statements
251
+ "vue/singleline-html-element-content-newline": "off"
252
+ }
253
+ }
254
+ );
255
+
256
+ export = eslint_config;
@@ -0,0 +1,256 @@
1
+ import antfu from '@antfu/eslint-config';
2
+ import saasmakers from '@saasmakers/eslint';
3
+ import packageJson from 'eslint-plugin-package-json';
4
+
5
+ const 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-sort-tests": "error",
176
+ "sort-imports": "off",
177
+ "ts/ban-ts-comment": "off",
178
+ "ts/ban-ts-ignore": "off",
179
+ "ts/ban-types": "off",
180
+ "ts/explicit-member-accessibility": "off",
181
+ "ts/no-explicit-any": "error",
182
+ "ts/no-invalid-this": "off",
183
+ "ts/no-namespace": "off",
184
+ "ts/no-require-imports": "off",
185
+ "ts/no-shadow": "off",
186
+ "ts/no-unused-expressions": "off",
187
+ "ts/no-use-before-define": "off",
188
+ "ts/no-var-requires": "off",
189
+ "unicorn/filename-case": "off",
190
+ "vars-on-top": "off",
191
+ "vue/attributes-order": [
192
+ "error",
193
+ {
194
+ alphabetical: true,
195
+ order: [
196
+ "DEFINITION",
197
+ "LIST_RENDERING",
198
+ "CONDITIONALS",
199
+ "RENDER_MODIFIERS",
200
+ "GLOBAL",
201
+ ["UNIQUE", "SLOT"],
202
+ "TWO_WAY_BINDING",
203
+ "OTHER_DIRECTIVES",
204
+ "OTHER_ATTR",
205
+ "EVENTS",
206
+ "CONTENT"
207
+ ]
208
+ }
209
+ ],
210
+ "vue/component-name-in-template-casing": [
211
+ "error",
212
+ "PascalCase",
213
+ { registeredComponentsOnly: false }
214
+ ],
215
+ "vue/first-attribute-linebreak": [
216
+ "error",
217
+ {
218
+ multiline: "below",
219
+ singleline: "beside"
220
+ }
221
+ ],
222
+ // 'vue/define-macros-order': 'off',
223
+ "vue/max-attributes-per-line": [
224
+ "error",
225
+ {
226
+ multiline: 1,
227
+ singleline: 1
228
+ }
229
+ ],
230
+ "vue/multiline-html-element-content-newline": [
231
+ "error",
232
+ {
233
+ allowEmptyLines: false,
234
+ ignores: ["pre", "textarea"],
235
+ ignoreWhenEmpty: true
236
+ }
237
+ ],
238
+ "vue/no-side-effects-in-computed-properties": "off",
239
+ "vue/padding-line-between-tags": [
240
+ "error",
241
+ [
242
+ {
243
+ blankLine: "always",
244
+ next: "*",
245
+ prev: "*"
246
+ }
247
+ ]
248
+ ],
249
+ "vue/return-in-computed-property": "off",
250
+ // This conflicts with another rule that removes empty `return` statements
251
+ "vue/singleline-html-element-content-newline": "off"
252
+ }
253
+ }
254
+ );
255
+
256
+ export { eslint_config as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@saasmakers/eslint",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "private": false,
6
6
  "description": "Shared ESLint config for SaaS Makers projects",
7
7
  "license": "MIT",
@@ -15,7 +15,8 @@
15
15
  "types": "./dist/index.d.ts",
16
16
  "import": "./dist/index.mjs",
17
17
  "require": "./dist/index.cjs"
18
- }
18
+ },
19
+ "./eslint.config.mjs": "./dist/eslint.config.mjs"
19
20
  },
20
21
  "main": "dist/index.cjs",
21
22
  "types": "dist/index.d.ts",
@@ -28,8 +29,14 @@
28
29
  "peerDependencies": {
29
30
  "eslint": "^9.0.0"
30
31
  },
32
+ "dependencies": {
33
+ "@antfu/eslint-config": "6.2.0",
34
+ "@unocss/eslint-config": "66.5.10-beta.1",
35
+ "eslint-plugin-package-json": "0.85.0"
36
+ },
31
37
  "devDependencies": {
32
38
  "@types/estree": "1.0.8",
39
+ "eslint": "9.39.1",
33
40
  "typescript": "5.9.3",
34
41
  "@saasmakers/config": "0.1.19"
35
42
  },