@so1ve/eslint-plugin 0.111.1 → 0.112.1
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/index.cjs +9 -9
- package/dist/index.d.ts +8 -12
- package/dist/index.mjs +9 -9
- package/package.json +5 -8
package/dist/index.cjs
CHANGED
|
@@ -31,7 +31,7 @@ const functionStyle = createEslintRule({
|
|
|
31
31
|
type: "problem",
|
|
32
32
|
docs: {
|
|
33
33
|
description: "Enforce function style.",
|
|
34
|
-
recommended: "
|
|
34
|
+
recommended: "stylistic"
|
|
35
35
|
},
|
|
36
36
|
fixable: "code",
|
|
37
37
|
schema: [],
|
|
@@ -99,7 +99,7 @@ const functionStyle = createEslintRule({
|
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
const previousNode = getPreviousNode(node.parent);
|
|
102
|
-
if (previousNode?.type === types.AST_NODE_TYPES.ExportNamedDeclaration && previousNode.declaration
|
|
102
|
+
if (previousNode?.type === types.AST_NODE_TYPES.ExportNamedDeclaration && previousNode.declaration?.type === types.AST_NODE_TYPES.TSDeclareFunction) {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
const statement = getLoneReturnStatement(node);
|
|
@@ -190,7 +190,7 @@ const importDedupe = createEslintRule({
|
|
|
190
190
|
type: "problem",
|
|
191
191
|
docs: {
|
|
192
192
|
description: "Fix duplication in imports.",
|
|
193
|
-
recommended: "
|
|
193
|
+
recommended: "recommended"
|
|
194
194
|
},
|
|
195
195
|
fixable: "code",
|
|
196
196
|
schema: [],
|
|
@@ -243,7 +243,7 @@ const noImportPromisesAs = createEslintRule({
|
|
|
243
243
|
type: "problem",
|
|
244
244
|
docs: {
|
|
245
245
|
description: "Disallow import promises as.",
|
|
246
|
-
recommended: "
|
|
246
|
+
recommended: "stylistic"
|
|
247
247
|
},
|
|
248
248
|
fixable: "code",
|
|
249
249
|
schema: [],
|
|
@@ -296,7 +296,7 @@ const noInlineTypeImport = createEslintRule({
|
|
|
296
296
|
type: "layout",
|
|
297
297
|
docs: {
|
|
298
298
|
description: "Disallow inline type import.",
|
|
299
|
-
recommended: "
|
|
299
|
+
recommended: "stylistic"
|
|
300
300
|
},
|
|
301
301
|
fixable: "code",
|
|
302
302
|
schema: [],
|
|
@@ -373,7 +373,7 @@ const noNegatedComparison = createEslintRule({
|
|
|
373
373
|
type: "problem",
|
|
374
374
|
docs: {
|
|
375
375
|
description: "Disallow negated comparison.",
|
|
376
|
-
recommended: "
|
|
376
|
+
recommended: "stylistic"
|
|
377
377
|
},
|
|
378
378
|
fixable: "code",
|
|
379
379
|
schema: [],
|
|
@@ -412,7 +412,7 @@ const noUselessTemplateString = createEslintRule({
|
|
|
412
412
|
type: "problem",
|
|
413
413
|
docs: {
|
|
414
414
|
description: "No useless template string.",
|
|
415
|
-
recommended: "
|
|
415
|
+
recommended: "stylistic"
|
|
416
416
|
},
|
|
417
417
|
fixable: "code",
|
|
418
418
|
schema: [],
|
|
@@ -450,7 +450,7 @@ const padAfterLastImport = createEslintRule({
|
|
|
450
450
|
type: "problem",
|
|
451
451
|
docs: {
|
|
452
452
|
description: "Pad after the last import.",
|
|
453
|
-
recommended: "
|
|
453
|
+
recommended: "stylistic"
|
|
454
454
|
},
|
|
455
455
|
fixable: "code",
|
|
456
456
|
schema: [],
|
|
@@ -493,7 +493,7 @@ const useAsyncWithAwait = createEslintRule({
|
|
|
493
493
|
type: "problem",
|
|
494
494
|
docs: {
|
|
495
495
|
description: "Enforce using async keyword with await.",
|
|
496
|
-
recommended: "
|
|
496
|
+
recommended: "recommended"
|
|
497
497
|
},
|
|
498
498
|
fixable: "code",
|
|
499
499
|
schema: [],
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import * as _typescript_eslint_utils_dist_ts_eslint_Rule from '@typescript-eslint/utils/dist/ts-eslint/Rule';
|
|
2
|
-
|
|
3
|
-
type MessageIds = "arrow" | "declaration";
|
|
4
|
-
|
|
5
1
|
declare const _default: {
|
|
6
2
|
rules: {
|
|
7
|
-
"function-style":
|
|
8
|
-
"import-dedupe":
|
|
9
|
-
"no-inline-type-import":
|
|
10
|
-
"no-negated-comparison":
|
|
11
|
-
"no-useless-template-string":
|
|
12
|
-
"no-import-promises-as":
|
|
13
|
-
"pad-after-last-import":
|
|
14
|
-
"use-async-with-await":
|
|
3
|
+
"function-style": any;
|
|
4
|
+
"import-dedupe": any;
|
|
5
|
+
"no-inline-type-import": any;
|
|
6
|
+
"no-negated-comparison": any;
|
|
7
|
+
"no-useless-template-string": any;
|
|
8
|
+
"no-import-promises-as": any;
|
|
9
|
+
"pad-after-last-import": any;
|
|
10
|
+
"use-async-with-await": any;
|
|
15
11
|
};
|
|
16
12
|
};
|
|
17
13
|
|
package/dist/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ const functionStyle = createEslintRule({
|
|
|
29
29
|
type: "problem",
|
|
30
30
|
docs: {
|
|
31
31
|
description: "Enforce function style.",
|
|
32
|
-
recommended: "
|
|
32
|
+
recommended: "stylistic"
|
|
33
33
|
},
|
|
34
34
|
fixable: "code",
|
|
35
35
|
schema: [],
|
|
@@ -97,7 +97,7 @@ const functionStyle = createEslintRule({
|
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
const previousNode = getPreviousNode(node.parent);
|
|
100
|
-
if (previousNode?.type === AST_NODE_TYPES.ExportNamedDeclaration && previousNode.declaration
|
|
100
|
+
if (previousNode?.type === AST_NODE_TYPES.ExportNamedDeclaration && previousNode.declaration?.type === AST_NODE_TYPES.TSDeclareFunction) {
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
const statement = getLoneReturnStatement(node);
|
|
@@ -188,7 +188,7 @@ const importDedupe = createEslintRule({
|
|
|
188
188
|
type: "problem",
|
|
189
189
|
docs: {
|
|
190
190
|
description: "Fix duplication in imports.",
|
|
191
|
-
recommended: "
|
|
191
|
+
recommended: "recommended"
|
|
192
192
|
},
|
|
193
193
|
fixable: "code",
|
|
194
194
|
schema: [],
|
|
@@ -241,7 +241,7 @@ const noImportPromisesAs = createEslintRule({
|
|
|
241
241
|
type: "problem",
|
|
242
242
|
docs: {
|
|
243
243
|
description: "Disallow import promises as.",
|
|
244
|
-
recommended: "
|
|
244
|
+
recommended: "stylistic"
|
|
245
245
|
},
|
|
246
246
|
fixable: "code",
|
|
247
247
|
schema: [],
|
|
@@ -294,7 +294,7 @@ const noInlineTypeImport = createEslintRule({
|
|
|
294
294
|
type: "layout",
|
|
295
295
|
docs: {
|
|
296
296
|
description: "Disallow inline type import.",
|
|
297
|
-
recommended: "
|
|
297
|
+
recommended: "stylistic"
|
|
298
298
|
},
|
|
299
299
|
fixable: "code",
|
|
300
300
|
schema: [],
|
|
@@ -371,7 +371,7 @@ const noNegatedComparison = createEslintRule({
|
|
|
371
371
|
type: "problem",
|
|
372
372
|
docs: {
|
|
373
373
|
description: "Disallow negated comparison.",
|
|
374
|
-
recommended: "
|
|
374
|
+
recommended: "stylistic"
|
|
375
375
|
},
|
|
376
376
|
fixable: "code",
|
|
377
377
|
schema: [],
|
|
@@ -410,7 +410,7 @@ const noUselessTemplateString = createEslintRule({
|
|
|
410
410
|
type: "problem",
|
|
411
411
|
docs: {
|
|
412
412
|
description: "No useless template string.",
|
|
413
|
-
recommended: "
|
|
413
|
+
recommended: "stylistic"
|
|
414
414
|
},
|
|
415
415
|
fixable: "code",
|
|
416
416
|
schema: [],
|
|
@@ -448,7 +448,7 @@ const padAfterLastImport = createEslintRule({
|
|
|
448
448
|
type: "problem",
|
|
449
449
|
docs: {
|
|
450
450
|
description: "Pad after the last import.",
|
|
451
|
-
recommended: "
|
|
451
|
+
recommended: "stylistic"
|
|
452
452
|
},
|
|
453
453
|
fixable: "code",
|
|
454
454
|
schema: [],
|
|
@@ -491,7 +491,7 @@ const useAsyncWithAwait = createEslintRule({
|
|
|
491
491
|
type: "problem",
|
|
492
492
|
docs: {
|
|
493
493
|
description: "Enforce using async keyword with await.",
|
|
494
|
-
recommended: "
|
|
494
|
+
recommended: "recommended"
|
|
495
495
|
},
|
|
496
496
|
fixable: "code",
|
|
497
497
|
schema: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@so1ve/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.112.1",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve/)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -26,15 +26,12 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@typescript-eslint/
|
|
30
|
-
"@
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@types/node": "^20.3.2",
|
|
34
|
-
"@typescript-eslint/types": "^5.60.1"
|
|
29
|
+
"@typescript-eslint/types": "^6.0.0",
|
|
30
|
+
"@typescript-eslint/utils": "^6.0.0"
|
|
35
31
|
},
|
|
36
32
|
"scripts": {
|
|
37
|
-
"build": "
|
|
33
|
+
"build": "tsx scripts/build.ts",
|
|
34
|
+
"build:real": "unbuild",
|
|
38
35
|
"stub": "unbuild --stub",
|
|
39
36
|
"test": "vitest"
|
|
40
37
|
}
|