@saasmakers/eslint 0.1.8 → 0.1.10
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 +5 -5
- package/dist/eslint.config.d.cts +5 -5
- package/dist/eslint.config.d.mts +5 -5
- package/dist/eslint.config.d.ts +5 -5
- package/dist/eslint.config.mjs +5 -5
- package/dist/index.cjs +7 -7
- package/dist/index.mjs +7 -7
- package/package.json +1 -1
package/dist/eslint.config.cjs
CHANGED
|
@@ -16,6 +16,10 @@ const storybook__default = /*#__PURE__*/_interopDefaultCompat(storybook);
|
|
|
16
16
|
|
|
17
17
|
const eslint_config = antfu__default(
|
|
18
18
|
{
|
|
19
|
+
regexp: false,
|
|
20
|
+
typescript: true,
|
|
21
|
+
unocss: true,
|
|
22
|
+
vue: true,
|
|
19
23
|
ignores: [
|
|
20
24
|
"*.md",
|
|
21
25
|
"**/.nuxt",
|
|
@@ -27,11 +31,7 @@ const eslint_config = antfu__default(
|
|
|
27
31
|
"**/dumps/*.json",
|
|
28
32
|
"**/ios",
|
|
29
33
|
"node_modules"
|
|
30
|
-
]
|
|
31
|
-
regexp: false,
|
|
32
|
-
typescript: true,
|
|
33
|
-
unocss: true,
|
|
34
|
-
vue: true
|
|
34
|
+
]
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
languageOptions: {
|
package/dist/eslint.config.d.cts
CHANGED
|
@@ -5,6 +5,10 @@ import storybook from 'eslint-plugin-storybook';
|
|
|
5
5
|
|
|
6
6
|
var eslint_config = antfu(
|
|
7
7
|
{
|
|
8
|
+
regexp: false,
|
|
9
|
+
typescript: true,
|
|
10
|
+
unocss: true,
|
|
11
|
+
vue: true,
|
|
8
12
|
ignores: [
|
|
9
13
|
"*.md",
|
|
10
14
|
"**/.nuxt",
|
|
@@ -16,11 +20,7 @@ var eslint_config = antfu(
|
|
|
16
20
|
"**/dumps/*.json",
|
|
17
21
|
"**/ios",
|
|
18
22
|
"node_modules"
|
|
19
|
-
]
|
|
20
|
-
regexp: false,
|
|
21
|
-
typescript: true,
|
|
22
|
-
unocss: true,
|
|
23
|
-
vue: true
|
|
23
|
+
]
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
languageOptions: {
|
package/dist/eslint.config.d.mts
CHANGED
|
@@ -5,6 +5,10 @@ import storybook from 'eslint-plugin-storybook';
|
|
|
5
5
|
|
|
6
6
|
var eslint_config = antfu(
|
|
7
7
|
{
|
|
8
|
+
regexp: false,
|
|
9
|
+
typescript: true,
|
|
10
|
+
unocss: true,
|
|
11
|
+
vue: true,
|
|
8
12
|
ignores: [
|
|
9
13
|
"*.md",
|
|
10
14
|
"**/.nuxt",
|
|
@@ -16,11 +20,7 @@ var eslint_config = antfu(
|
|
|
16
20
|
"**/dumps/*.json",
|
|
17
21
|
"**/ios",
|
|
18
22
|
"node_modules"
|
|
19
|
-
]
|
|
20
|
-
regexp: false,
|
|
21
|
-
typescript: true,
|
|
22
|
-
unocss: true,
|
|
23
|
-
vue: true
|
|
23
|
+
]
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
languageOptions: {
|
package/dist/eslint.config.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ import storybook from 'eslint-plugin-storybook';
|
|
|
5
5
|
|
|
6
6
|
var eslint_config = antfu(
|
|
7
7
|
{
|
|
8
|
+
regexp: false,
|
|
9
|
+
typescript: true,
|
|
10
|
+
unocss: true,
|
|
11
|
+
vue: true,
|
|
8
12
|
ignores: [
|
|
9
13
|
"*.md",
|
|
10
14
|
"**/.nuxt",
|
|
@@ -16,11 +20,7 @@ var eslint_config = antfu(
|
|
|
16
20
|
"**/dumps/*.json",
|
|
17
21
|
"**/ios",
|
|
18
22
|
"node_modules"
|
|
19
|
-
]
|
|
20
|
-
regexp: false,
|
|
21
|
-
typescript: true,
|
|
22
|
-
unocss: true,
|
|
23
|
-
vue: true
|
|
23
|
+
]
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
languageOptions: {
|
package/dist/eslint.config.mjs
CHANGED
|
@@ -5,6 +5,10 @@ import storybook from 'eslint-plugin-storybook';
|
|
|
5
5
|
|
|
6
6
|
const eslint_config = antfu(
|
|
7
7
|
{
|
|
8
|
+
regexp: false,
|
|
9
|
+
typescript: true,
|
|
10
|
+
unocss: true,
|
|
11
|
+
vue: true,
|
|
8
12
|
ignores: [
|
|
9
13
|
"*.md",
|
|
10
14
|
"**/.nuxt",
|
|
@@ -16,11 +20,7 @@ const eslint_config = antfu(
|
|
|
16
20
|
"**/dumps/*.json",
|
|
17
21
|
"**/ios",
|
|
18
22
|
"node_modules"
|
|
19
|
-
]
|
|
20
|
-
regexp: false,
|
|
21
|
-
typescript: true,
|
|
22
|
-
unocss: true,
|
|
23
|
-
vue: true
|
|
23
|
+
]
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
languageOptions: {
|
package/dist/index.cjs
CHANGED
|
@@ -26,7 +26,7 @@ const rule$e = {
|
|
|
26
26
|
type: "layout"
|
|
27
27
|
},
|
|
28
28
|
create(context) {
|
|
29
|
-
const maxCharacters = context.options[0]?.maxCharacters
|
|
29
|
+
const maxCharacters = context.options[0]?.maxCharacters ?? 100;
|
|
30
30
|
return {
|
|
31
31
|
ConditionalExpression(node) {
|
|
32
32
|
if (node.type !== utils.AST_NODE_TYPES.ConditionalExpression) {
|
|
@@ -92,8 +92,8 @@ const rule$d = {
|
|
|
92
92
|
type: "layout"
|
|
93
93
|
},
|
|
94
94
|
create(context) {
|
|
95
|
-
const minItems = context.options[0]?.minItems
|
|
96
|
-
const maxLineLength = context.options[0]?.maxLineLength
|
|
95
|
+
const minItems = context.options[0]?.minItems ?? 5;
|
|
96
|
+
const maxLineLength = context.options[0]?.maxLineLength ?? 100;
|
|
97
97
|
function reportAndFix(node, messageId, fixFunction) {
|
|
98
98
|
context.report({
|
|
99
99
|
fix: fixFunction,
|
|
@@ -751,7 +751,7 @@ const rule$5 = {
|
|
|
751
751
|
fix: (fixer) => {
|
|
752
752
|
return fixer.removeRange(comment.range);
|
|
753
753
|
},
|
|
754
|
-
loc: comment.loc
|
|
754
|
+
loc: comment.loc ?? node.loc ?? {
|
|
755
755
|
end: {
|
|
756
756
|
column: 0,
|
|
757
757
|
line: 0
|
|
@@ -817,7 +817,7 @@ const rule$5 = {
|
|
|
817
817
|
const templateContent = templateMatch ? templateMatch[1] : "";
|
|
818
818
|
const scriptMatch = source.match(/<script[^>]*>([\s\S]*?)<\/script>/i);
|
|
819
819
|
const scriptContent = scriptMatch ? scriptMatch[1] : "";
|
|
820
|
-
const propDefinitions = propsText.match(/(\w+):\s*{([^}]+)}/g)
|
|
820
|
+
const propDefinitions = propsText.match(/(\w+):\s*{([^}]+)}/g) ?? [];
|
|
821
821
|
for (const propDef of propDefinitions) {
|
|
822
822
|
const propNameMatch = propDef.match(/^(\w+):\s*{([^}]+)}/);
|
|
823
823
|
if (!propNameMatch) {
|
|
@@ -1059,7 +1059,7 @@ const rule$1 = {
|
|
|
1059
1059
|
while (jsCommentMatch !== null) {
|
|
1060
1060
|
const fullMatch = jsCommentMatch[0];
|
|
1061
1061
|
const matchIndex = templateStartIndex + jsCommentMatch.index;
|
|
1062
|
-
const lineBeforeMatch = templateContent.substring(0, jsCommentMatch.index).split("\n").pop()
|
|
1062
|
+
const lineBeforeMatch = templateContent.substring(0, jsCommentMatch.index).split("\n").pop() ?? "";
|
|
1063
1063
|
const isInAttribute = lineBeforeMatch.includes('="') && !lineBeforeMatch.includes('"');
|
|
1064
1064
|
if (isInAttribute) {
|
|
1065
1065
|
jsCommentMatch = jsCommentRegex.exec(templateContent);
|
|
@@ -1117,7 +1117,7 @@ const rule = {
|
|
|
1117
1117
|
const fullMatch = trueAttributeMatch[0];
|
|
1118
1118
|
const attributeName = trueAttributeMatch[1];
|
|
1119
1119
|
const matchIndex = templateStartIndex + trueAttributeMatch.index;
|
|
1120
|
-
const lineBeforeMatch = templateContent.substring(0, trueAttributeMatch.index).split("\n").pop()
|
|
1120
|
+
const lineBeforeMatch = templateContent.substring(0, trueAttributeMatch.index).split("\n").pop() ?? "";
|
|
1121
1121
|
if (lineBeforeMatch.includes("{{") && !lineBeforeMatch.includes("}}")) {
|
|
1122
1122
|
trueAttributeMatch = trueAttributeRegex.exec(templateContent);
|
|
1123
1123
|
continue;
|
package/dist/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ const rule$e = {
|
|
|
22
22
|
type: "layout"
|
|
23
23
|
},
|
|
24
24
|
create(context) {
|
|
25
|
-
const maxCharacters = context.options[0]?.maxCharacters
|
|
25
|
+
const maxCharacters = context.options[0]?.maxCharacters ?? 100;
|
|
26
26
|
return {
|
|
27
27
|
ConditionalExpression(node) {
|
|
28
28
|
if (node.type !== AST_NODE_TYPES.ConditionalExpression) {
|
|
@@ -88,8 +88,8 @@ const rule$d = {
|
|
|
88
88
|
type: "layout"
|
|
89
89
|
},
|
|
90
90
|
create(context) {
|
|
91
|
-
const minItems = context.options[0]?.minItems
|
|
92
|
-
const maxLineLength = context.options[0]?.maxLineLength
|
|
91
|
+
const minItems = context.options[0]?.minItems ?? 5;
|
|
92
|
+
const maxLineLength = context.options[0]?.maxLineLength ?? 100;
|
|
93
93
|
function reportAndFix(node, messageId, fixFunction) {
|
|
94
94
|
context.report({
|
|
95
95
|
fix: fixFunction,
|
|
@@ -747,7 +747,7 @@ const rule$5 = {
|
|
|
747
747
|
fix: (fixer) => {
|
|
748
748
|
return fixer.removeRange(comment.range);
|
|
749
749
|
},
|
|
750
|
-
loc: comment.loc
|
|
750
|
+
loc: comment.loc ?? node.loc ?? {
|
|
751
751
|
end: {
|
|
752
752
|
column: 0,
|
|
753
753
|
line: 0
|
|
@@ -813,7 +813,7 @@ const rule$5 = {
|
|
|
813
813
|
const templateContent = templateMatch ? templateMatch[1] : "";
|
|
814
814
|
const scriptMatch = source.match(/<script[^>]*>([\s\S]*?)<\/script>/i);
|
|
815
815
|
const scriptContent = scriptMatch ? scriptMatch[1] : "";
|
|
816
|
-
const propDefinitions = propsText.match(/(\w+):\s*{([^}]+)}/g)
|
|
816
|
+
const propDefinitions = propsText.match(/(\w+):\s*{([^}]+)}/g) ?? [];
|
|
817
817
|
for (const propDef of propDefinitions) {
|
|
818
818
|
const propNameMatch = propDef.match(/^(\w+):\s*{([^}]+)}/);
|
|
819
819
|
if (!propNameMatch) {
|
|
@@ -1055,7 +1055,7 @@ const rule$1 = {
|
|
|
1055
1055
|
while (jsCommentMatch !== null) {
|
|
1056
1056
|
const fullMatch = jsCommentMatch[0];
|
|
1057
1057
|
const matchIndex = templateStartIndex + jsCommentMatch.index;
|
|
1058
|
-
const lineBeforeMatch = templateContent.substring(0, jsCommentMatch.index).split("\n").pop()
|
|
1058
|
+
const lineBeforeMatch = templateContent.substring(0, jsCommentMatch.index).split("\n").pop() ?? "";
|
|
1059
1059
|
const isInAttribute = lineBeforeMatch.includes('="') && !lineBeforeMatch.includes('"');
|
|
1060
1060
|
if (isInAttribute) {
|
|
1061
1061
|
jsCommentMatch = jsCommentRegex.exec(templateContent);
|
|
@@ -1113,7 +1113,7 @@ const rule = {
|
|
|
1113
1113
|
const fullMatch = trueAttributeMatch[0];
|
|
1114
1114
|
const attributeName = trueAttributeMatch[1];
|
|
1115
1115
|
const matchIndex = templateStartIndex + trueAttributeMatch.index;
|
|
1116
|
-
const lineBeforeMatch = templateContent.substring(0, trueAttributeMatch.index).split("\n").pop()
|
|
1116
|
+
const lineBeforeMatch = templateContent.substring(0, trueAttributeMatch.index).split("\n").pop() ?? "";
|
|
1117
1117
|
if (lineBeforeMatch.includes("{{") && !lineBeforeMatch.includes("}}")) {
|
|
1118
1118
|
trueAttributeMatch = trueAttributeRegex.exec(templateContent);
|
|
1119
1119
|
continue;
|