@kazupon/eslint-config 0.18.0 → 0.20.0
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.d.ts +14180 -3
- package/dist/index.js +71 -90
- package/package.json +59 -48
- package/dist/config.d.cts +0 -9
- package/dist/config.d.ts +0 -9
- package/dist/configs/comments.d.cts +0 -15
- package/dist/configs/comments.d.ts +0 -15
- package/dist/configs/imports.d.cts +0 -21
- package/dist/configs/imports.d.ts +0 -21
- package/dist/configs/index.d.cts +0 -17
- package/dist/configs/index.d.ts +0 -17
- package/dist/configs/javascript.d.cts +0 -15
- package/dist/configs/javascript.d.ts +0 -15
- package/dist/configs/jsdoc.d.cts +0 -27
- package/dist/configs/jsdoc.d.ts +0 -27
- package/dist/configs/jsonc.d.cts +0 -39
- package/dist/configs/jsonc.d.ts +0 -39
- package/dist/configs/markdown.d.cts +0 -28
- package/dist/configs/markdown.d.ts +0 -28
- package/dist/configs/prettier.d.cts +0 -15
- package/dist/configs/prettier.d.ts +0 -15
- package/dist/configs/promise.d.cts +0 -15
- package/dist/configs/promise.d.ts +0 -15
- package/dist/configs/react.d.cts +0 -26
- package/dist/configs/react.d.ts +0 -26
- package/dist/configs/regexp.d.cts +0 -15
- package/dist/configs/regexp.d.ts +0 -15
- package/dist/configs/svelte.d.cts +0 -21
- package/dist/configs/svelte.d.ts +0 -21
- package/dist/configs/toml.d.cts +0 -15
- package/dist/configs/toml.d.ts +0 -15
- package/dist/configs/typescript.d.cts +0 -38
- package/dist/configs/typescript.d.ts +0 -38
- package/dist/configs/unicorn.d.cts +0 -20
- package/dist/configs/unicorn.d.ts +0 -20
- package/dist/configs/vitest.d.cts +0 -22
- package/dist/configs/vitest.d.ts +0 -22
- package/dist/configs/vue.d.cts +0 -36
- package/dist/configs/vue.d.ts +0 -36
- package/dist/configs/yml.d.cts +0 -22
- package/dist/configs/yml.d.ts +0 -22
- package/dist/globs.d.cts +0 -14
- package/dist/globs.d.ts +0 -14
- package/dist/index.cjs +0 -778
- package/dist/index.d.cts +0 -3
- package/dist/types/gens/comments.d.cts +0 -65
- package/dist/types/gens/comments.d.ts +0 -65
- package/dist/types/gens/eslint.d.cts +0 -23
- package/dist/types/gens/eslint.d.ts +0 -23
- package/dist/types/gens/imports.d.cts +0 -520
- package/dist/types/gens/imports.d.ts +0 -520
- package/dist/types/gens/javascript.d.cts +0 -3163
- package/dist/types/gens/javascript.d.ts +0 -3163
- package/dist/types/gens/jsdoc.d.cts +0 -796
- package/dist/types/gens/jsdoc.d.ts +0 -796
- package/dist/types/gens/jsonc.d.cts +0 -513
- package/dist/types/gens/jsonc.d.ts +0 -513
- package/dist/types/gens/markdown.d.cts +0 -42
- package/dist/types/gens/markdown.d.ts +0 -42
- package/dist/types/gens/prettier.d.cts +0 -2
- package/dist/types/gens/prettier.d.ts +0 -2
- package/dist/types/gens/promise.d.cts +0 -113
- package/dist/types/gens/promise.d.ts +0 -113
- package/dist/types/gens/react.d.cts +0 -1053
- package/dist/types/gens/react.d.ts +0 -1053
- package/dist/types/gens/regexp.d.cts +0 -553
- package/dist/types/gens/regexp.d.ts +0 -553
- package/dist/types/gens/svelte.d.cts +0 -491
- package/dist/types/gens/svelte.d.ts +0 -491
- package/dist/types/gens/toml.d.cts +0 -256
- package/dist/types/gens/toml.d.ts +0 -256
- package/dist/types/gens/typescript.d.cts +0 -1578
- package/dist/types/gens/typescript.d.ts +0 -1578
- package/dist/types/gens/unicorn.d.cts +0 -925
- package/dist/types/gens/unicorn.d.ts +0 -925
- package/dist/types/gens/vitest.d.cts +0 -377
- package/dist/types/gens/vitest.d.ts +0 -377
- package/dist/types/gens/vue.d.cts +0 -2746
- package/dist/types/gens/vue.d.ts +0 -2746
- package/dist/types/gens/yml.d.cts +0 -375
- package/dist/types/gens/yml.d.ts +0 -375
- package/dist/types/index.d.cts +0 -19
- package/dist/types/index.d.ts +0 -19
- package/dist/types/overrides.d.cts +0 -8
- package/dist/types/overrides.d.ts +0 -8
- package/dist/utils.d.cts +0 -18
- package/dist/utils.d.ts +0 -18
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import type { Linter } from 'eslint';
|
|
2
|
-
export interface PromiseRules {
|
|
3
|
-
/**
|
|
4
|
-
* Require returning inside each `then()` to create readable and reusable Promise chains.
|
|
5
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md
|
|
6
|
-
*/
|
|
7
|
-
'promise/always-return'?: Linter.RuleEntry<PromiseAlwaysReturn>;
|
|
8
|
-
/**
|
|
9
|
-
* Disallow creating `new` promises outside of utility libs (use [util.promisify][] instead).
|
|
10
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/avoid-new.md
|
|
11
|
-
*/
|
|
12
|
-
'promise/avoid-new'?: Linter.RuleEntry<[]>;
|
|
13
|
-
/**
|
|
14
|
-
* Enforce the use of `catch()` on un-returned promises.
|
|
15
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md
|
|
16
|
-
*/
|
|
17
|
-
'promise/catch-or-return'?: Linter.RuleEntry<PromiseCatchOrReturn>;
|
|
18
|
-
/**
|
|
19
|
-
* Disallow calling `cb()` inside of a `then()` (use [util.callbackify][] instead).
|
|
20
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-callback-in-promise.md
|
|
21
|
-
*/
|
|
22
|
-
'promise/no-callback-in-promise'?: Linter.RuleEntry<PromiseNoCallbackInPromise>;
|
|
23
|
-
/**
|
|
24
|
-
* Disallow creating new promises with paths that resolve multiple times.
|
|
25
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md
|
|
26
|
-
*/
|
|
27
|
-
'promise/no-multiple-resolved'?: Linter.RuleEntry<[]>;
|
|
28
|
-
/**
|
|
29
|
-
* Require creating a `Promise` constructor before using it in an ES5 environment.
|
|
30
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-native.md
|
|
31
|
-
*/
|
|
32
|
-
'promise/no-native'?: Linter.RuleEntry<[]>;
|
|
33
|
-
/**
|
|
34
|
-
* Disallow nested `then()` or `catch()` statements.
|
|
35
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-nesting.md
|
|
36
|
-
*/
|
|
37
|
-
'promise/no-nesting'?: Linter.RuleEntry<[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Disallow calling `new` on a Promise static method.
|
|
40
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-new-statics.md
|
|
41
|
-
*/
|
|
42
|
-
'promise/no-new-statics'?: Linter.RuleEntry<[]>;
|
|
43
|
-
/**
|
|
44
|
-
* Disallow using promises inside of callbacks.
|
|
45
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-promise-in-callback.md
|
|
46
|
-
*/
|
|
47
|
-
'promise/no-promise-in-callback'?: Linter.RuleEntry<[]>;
|
|
48
|
-
/**
|
|
49
|
-
* Disallow return statements in `finally()`.
|
|
50
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-in-finally.md
|
|
51
|
-
*/
|
|
52
|
-
'promise/no-return-in-finally'?: Linter.RuleEntry<[]>;
|
|
53
|
-
/**
|
|
54
|
-
* Disallow wrapping values in `Promise.resolve` or `Promise.reject` when not needed.
|
|
55
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-wrap.md
|
|
56
|
-
*/
|
|
57
|
-
'promise/no-return-wrap'?: Linter.RuleEntry<PromiseNoReturnWrap>;
|
|
58
|
-
/**
|
|
59
|
-
* Enforce consistent param names and ordering when creating new promises.
|
|
60
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/param-names.md
|
|
61
|
-
*/
|
|
62
|
-
'promise/param-names'?: Linter.RuleEntry<PromiseParamNames>;
|
|
63
|
-
/**
|
|
64
|
-
* Prefer `async`/`await` to the callback pattern.
|
|
65
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-callbacks.md
|
|
66
|
-
*/
|
|
67
|
-
'promise/prefer-await-to-callbacks'?: Linter.RuleEntry<[]>;
|
|
68
|
-
/**
|
|
69
|
-
* Prefer `await` to `then()`/`catch()`/`finally()` for reading Promise values.
|
|
70
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md
|
|
71
|
-
*/
|
|
72
|
-
'promise/prefer-await-to-then'?: Linter.RuleEntry<PromisePreferAwaitToThen>;
|
|
73
|
-
/**
|
|
74
|
-
* Enforces the proper number of arguments are passed to Promise functions.
|
|
75
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md
|
|
76
|
-
*/
|
|
77
|
-
'promise/valid-params'?: Linter.RuleEntry<[]>;
|
|
78
|
-
}
|
|
79
|
-
type PromiseAlwaysReturn = [] | [
|
|
80
|
-
{
|
|
81
|
-
ignoreLastCallback?: boolean;
|
|
82
|
-
}
|
|
83
|
-
];
|
|
84
|
-
type PromiseCatchOrReturn = [] | [
|
|
85
|
-
{
|
|
86
|
-
allowFinally?: boolean;
|
|
87
|
-
allowThen?: boolean;
|
|
88
|
-
terminationMethod?: (string | string[]);
|
|
89
|
-
}
|
|
90
|
-
];
|
|
91
|
-
type PromiseNoCallbackInPromise = [] | [
|
|
92
|
-
{
|
|
93
|
-
exceptions?: string[];
|
|
94
|
-
}
|
|
95
|
-
];
|
|
96
|
-
type PromiseNoReturnWrap = [] | [
|
|
97
|
-
{
|
|
98
|
-
allowReject?: boolean;
|
|
99
|
-
}
|
|
100
|
-
];
|
|
101
|
-
type PromiseParamNames = [] | [
|
|
102
|
-
{
|
|
103
|
-
resolvePattern?: string;
|
|
104
|
-
rejectPattern?: string;
|
|
105
|
-
}
|
|
106
|
-
];
|
|
107
|
-
type PromisePreferAwaitToThen = [] | [
|
|
108
|
-
{
|
|
109
|
-
strict?: boolean;
|
|
110
|
-
[k: string]: unknown | undefined;
|
|
111
|
-
}
|
|
112
|
-
];
|
|
113
|
-
export {};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import type { Linter } from 'eslint';
|
|
2
|
-
export interface PromiseRules {
|
|
3
|
-
/**
|
|
4
|
-
* Require returning inside each `then()` to create readable and reusable Promise chains.
|
|
5
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md
|
|
6
|
-
*/
|
|
7
|
-
'promise/always-return'?: Linter.RuleEntry<PromiseAlwaysReturn>;
|
|
8
|
-
/**
|
|
9
|
-
* Disallow creating `new` promises outside of utility libs (use [util.promisify][] instead).
|
|
10
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/avoid-new.md
|
|
11
|
-
*/
|
|
12
|
-
'promise/avoid-new'?: Linter.RuleEntry<[]>;
|
|
13
|
-
/**
|
|
14
|
-
* Enforce the use of `catch()` on un-returned promises.
|
|
15
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md
|
|
16
|
-
*/
|
|
17
|
-
'promise/catch-or-return'?: Linter.RuleEntry<PromiseCatchOrReturn>;
|
|
18
|
-
/**
|
|
19
|
-
* Disallow calling `cb()` inside of a `then()` (use [util.callbackify][] instead).
|
|
20
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-callback-in-promise.md
|
|
21
|
-
*/
|
|
22
|
-
'promise/no-callback-in-promise'?: Linter.RuleEntry<PromiseNoCallbackInPromise>;
|
|
23
|
-
/**
|
|
24
|
-
* Disallow creating new promises with paths that resolve multiple times.
|
|
25
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md
|
|
26
|
-
*/
|
|
27
|
-
'promise/no-multiple-resolved'?: Linter.RuleEntry<[]>;
|
|
28
|
-
/**
|
|
29
|
-
* Require creating a `Promise` constructor before using it in an ES5 environment.
|
|
30
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-native.md
|
|
31
|
-
*/
|
|
32
|
-
'promise/no-native'?: Linter.RuleEntry<[]>;
|
|
33
|
-
/**
|
|
34
|
-
* Disallow nested `then()` or `catch()` statements.
|
|
35
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-nesting.md
|
|
36
|
-
*/
|
|
37
|
-
'promise/no-nesting'?: Linter.RuleEntry<[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Disallow calling `new` on a Promise static method.
|
|
40
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-new-statics.md
|
|
41
|
-
*/
|
|
42
|
-
'promise/no-new-statics'?: Linter.RuleEntry<[]>;
|
|
43
|
-
/**
|
|
44
|
-
* Disallow using promises inside of callbacks.
|
|
45
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-promise-in-callback.md
|
|
46
|
-
*/
|
|
47
|
-
'promise/no-promise-in-callback'?: Linter.RuleEntry<[]>;
|
|
48
|
-
/**
|
|
49
|
-
* Disallow return statements in `finally()`.
|
|
50
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-in-finally.md
|
|
51
|
-
*/
|
|
52
|
-
'promise/no-return-in-finally'?: Linter.RuleEntry<[]>;
|
|
53
|
-
/**
|
|
54
|
-
* Disallow wrapping values in `Promise.resolve` or `Promise.reject` when not needed.
|
|
55
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-wrap.md
|
|
56
|
-
*/
|
|
57
|
-
'promise/no-return-wrap'?: Linter.RuleEntry<PromiseNoReturnWrap>;
|
|
58
|
-
/**
|
|
59
|
-
* Enforce consistent param names and ordering when creating new promises.
|
|
60
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/param-names.md
|
|
61
|
-
*/
|
|
62
|
-
'promise/param-names'?: Linter.RuleEntry<PromiseParamNames>;
|
|
63
|
-
/**
|
|
64
|
-
* Prefer `async`/`await` to the callback pattern.
|
|
65
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-callbacks.md
|
|
66
|
-
*/
|
|
67
|
-
'promise/prefer-await-to-callbacks'?: Linter.RuleEntry<[]>;
|
|
68
|
-
/**
|
|
69
|
-
* Prefer `await` to `then()`/`catch()`/`finally()` for reading Promise values.
|
|
70
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md
|
|
71
|
-
*/
|
|
72
|
-
'promise/prefer-await-to-then'?: Linter.RuleEntry<PromisePreferAwaitToThen>;
|
|
73
|
-
/**
|
|
74
|
-
* Enforces the proper number of arguments are passed to Promise functions.
|
|
75
|
-
* @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md
|
|
76
|
-
*/
|
|
77
|
-
'promise/valid-params'?: Linter.RuleEntry<[]>;
|
|
78
|
-
}
|
|
79
|
-
type PromiseAlwaysReturn = [] | [
|
|
80
|
-
{
|
|
81
|
-
ignoreLastCallback?: boolean;
|
|
82
|
-
}
|
|
83
|
-
];
|
|
84
|
-
type PromiseCatchOrReturn = [] | [
|
|
85
|
-
{
|
|
86
|
-
allowFinally?: boolean;
|
|
87
|
-
allowThen?: boolean;
|
|
88
|
-
terminationMethod?: (string | string[]);
|
|
89
|
-
}
|
|
90
|
-
];
|
|
91
|
-
type PromiseNoCallbackInPromise = [] | [
|
|
92
|
-
{
|
|
93
|
-
exceptions?: string[];
|
|
94
|
-
}
|
|
95
|
-
];
|
|
96
|
-
type PromiseNoReturnWrap = [] | [
|
|
97
|
-
{
|
|
98
|
-
allowReject?: boolean;
|
|
99
|
-
}
|
|
100
|
-
];
|
|
101
|
-
type PromiseParamNames = [] | [
|
|
102
|
-
{
|
|
103
|
-
resolvePattern?: string;
|
|
104
|
-
rejectPattern?: string;
|
|
105
|
-
}
|
|
106
|
-
];
|
|
107
|
-
type PromisePreferAwaitToThen = [] | [
|
|
108
|
-
{
|
|
109
|
-
strict?: boolean;
|
|
110
|
-
[k: string]: unknown | undefined;
|
|
111
|
-
}
|
|
112
|
-
];
|
|
113
|
-
export {};
|