xenopomp-essentials 0.1.3-rc.3 → 0.1.3-rc.4
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/eslint/index.d.mts +37 -0
- package/eslint/index.d.ts +37 -0
- package/eslint/index.mjs +1 -0
- package/index.d.mts +2 -7
- package/index.d.ts +2 -7
- package/package.json +2 -3
- package/shared/xenopomp-essentials.BFV6RP1V.d.mts +7 -0
- package/shared/xenopomp-essentials.BFV6RP1V.d.ts +7 -0
- package/eslint/defaults/index.ts +0 -1
- package/eslint/defaults/ririd.ts +0 -33
- package/eslint/index.ts +0 -97
- package/eslint/types/index.ts +0 -1
- package/eslint/types/ririd.ts +0 -8
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import ririd from '@ririd/eslint-config';
|
|
2
|
+
import { D as Defined } from '../shared/xenopomp-essentials.BFV6RP1V.mjs';
|
|
3
|
+
|
|
4
|
+
type RiridParams = Parameters<typeof ririd>;
|
|
5
|
+
type RiridOptions = Defined<RiridParams[0]>;
|
|
6
|
+
type UserConfig = Defined<RiridParams[1]>;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* XenoPOMP`s default ESLint config. Uses @ririd/eslint-config
|
|
10
|
+
* under the hood.
|
|
11
|
+
*
|
|
12
|
+
* @param options
|
|
13
|
+
* @param userConfigs
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { xenopomp } from 'xenopomp-essentials';
|
|
17
|
+
*
|
|
18
|
+
* export default xenopomp(
|
|
19
|
+
* // Setup Ririd options
|
|
20
|
+
* {
|
|
21
|
+
* react: false,
|
|
22
|
+
* },
|
|
23
|
+
*
|
|
24
|
+
* // Setup custom user configs
|
|
25
|
+
* {
|
|
26
|
+
* name: 'Custom config #1',
|
|
27
|
+
* rules: {
|
|
28
|
+
* 'some/rule-name': 'warn',
|
|
29
|
+
* },
|
|
30
|
+
* // ...
|
|
31
|
+
* },
|
|
32
|
+
* // ...
|
|
33
|
+
* );
|
|
34
|
+
*/
|
|
35
|
+
declare function xenopomp(options?: RiridOptions, ...userConfigs: UserConfig[]): Promise<UserConfigItem[]>;
|
|
36
|
+
|
|
37
|
+
export { xenopomp as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import ririd from '@ririd/eslint-config';
|
|
2
|
+
import { D as Defined } from '../shared/xenopomp-essentials.BFV6RP1V.js';
|
|
3
|
+
|
|
4
|
+
type RiridParams = Parameters<typeof ririd>;
|
|
5
|
+
type RiridOptions = Defined<RiridParams[0]>;
|
|
6
|
+
type UserConfig = Defined<RiridParams[1]>;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* XenoPOMP`s default ESLint config. Uses @ririd/eslint-config
|
|
10
|
+
* under the hood.
|
|
11
|
+
*
|
|
12
|
+
* @param options
|
|
13
|
+
* @param userConfigs
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { xenopomp } from 'xenopomp-essentials';
|
|
17
|
+
*
|
|
18
|
+
* export default xenopomp(
|
|
19
|
+
* // Setup Ririd options
|
|
20
|
+
* {
|
|
21
|
+
* react: false,
|
|
22
|
+
* },
|
|
23
|
+
*
|
|
24
|
+
* // Setup custom user configs
|
|
25
|
+
* {
|
|
26
|
+
* name: 'Custom config #1',
|
|
27
|
+
* rules: {
|
|
28
|
+
* 'some/rule-name': 'warn',
|
|
29
|
+
* },
|
|
30
|
+
* // ...
|
|
31
|
+
* },
|
|
32
|
+
* // ...
|
|
33
|
+
* );
|
|
34
|
+
*/
|
|
35
|
+
declare function xenopomp(options?: RiridOptions, ...userConfigs: UserConfig[]): Promise<UserConfigItem[]>;
|
|
36
|
+
|
|
37
|
+
export { xenopomp as default };
|
package/eslint/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import s from"@ririd/eslint-config";import{deepmerge as r}from"deepmerge-ts";import e from"globals";const n={next:!0,react:!0,jsonc:!1,yaml:!1,stylistic:{semi:!0,quotes:"single"},typescript:{overrides:{"ts/consistent-type-definitions":["error","interface"],"ts/interface-name-prefix":"off","ts/explicit-function-return-type":"off","ts/explicit-module-boundary-types":"off","ts/no-explicit-any":"off"}},rules:{"import/order":"off","react/react-in-jsx-scope":"off","react/prop-types":"off","antfu/top-level-function":"off","perfectionist/sort-imports":"off","perfectionist/sort-named-imports":"off","perfectionist/sort-named-exports":"off","antfu/consistent-chaining":"off","perfectionist/sort-exports":"off","style/no-multiple-empty-lines":"off"}};function i(t,...o){return s(r(n,t),{name:"Old config",languageOptions:{globals:{...e.browser,...e.jquery,...e.node,document:"readonly",navigator:"readonly",window:"readonly"}},ignores:["**/.next/*","**/node_modules/*","**/.github/*","cypress","**/__tests__/e2e/*","*.json","**/*.d.ts",".eslintrc.js","eslint.config.js",".prettierrc",".stylelintrc.js","tsconfig.json","package.json","*.md","*.config.ts","*.config.js","*.md"]},{name:"Rules breakup #1",rules:{"@next/next/no-duplicate-head":"off"}},{name:"Rules breakup #2",rules:{"style/operator-linebreak":"off","test/consistent-test-it":"off","test/prefer-lowercase-title":"off","style/jsx-quotes":"off","style/multiline-ternary":"off","style/indent":"off"},ignores:["cypress"]},...o)}export{i as default};
|
package/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementType, ComponentProps, FC, ReactNode, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
export { D as Defined } from './shared/xenopomp-essentials.BFV6RP1V.mjs';
|
|
2
3
|
import { Jsonifiable } from 'type-fest';
|
|
3
4
|
import * as transliteration from 'transliteration';
|
|
4
5
|
|
|
@@ -232,12 +233,6 @@ type DeepInject<T, I extends AnyObject> = T extends object ? {
|
|
|
232
233
|
[K in keyof T]: T[K] extends object ? T[K] & I & DeepInject<T[K], I> : T[K];
|
|
233
234
|
} & I : T;
|
|
234
235
|
|
|
235
|
-
/**
|
|
236
|
-
* Removes undefined from union type.
|
|
237
|
-
* @since 0.0.1
|
|
238
|
-
*/
|
|
239
|
-
type Defined<T> = Exclude<T, undefined>;
|
|
240
|
-
|
|
241
236
|
/**
|
|
242
237
|
* Return never if type does not match JSON schema.
|
|
243
238
|
*
|
|
@@ -566,4 +561,4 @@ declare const minmax: (num: number, [min, max]: [min: number | undefined, max: n
|
|
|
566
561
|
*/
|
|
567
562
|
declare function jsxDotNotation<Props = EmptyObject, Rest extends Record<string, FC<AnyObject>> = EmptyObject>(comp: FC<Props>, rest: Rest): FC<Props> & Rest;
|
|
568
563
|
|
|
569
|
-
export { type AnyFC, type AnyObject, type ArrayItemType, type ArrayType, type AsyncFC, type AsyncReturnType, type AsyncVariableFC, type DeepInject, type DeepWriteable, type
|
|
564
|
+
export { type AnyFC, type AnyObject, type ArrayItemType, type ArrayType, type AsyncFC, type AsyncReturnType, type AsyncVariableFC, type DeepInject, type DeepWriteable, type EmptyObject, type FcProps, type Fn, type FunctionalChildren, type Jsonish, type Lenient, type LenientAutocomplete, type MatchType, type MergeTypes, type Modify, type NextErrorParams, type NextParams, type NextSearchParams, type Nullable, type OneOf, type OnlyFirst, type Preid, type RecordKey, type RecordValue, type ReplaceReturnType, type SelectivePartial, type SetState, type StrictOmit, type Synchronous, type Undefinable, type VariableFC, type VersionData, type WeakOmit, type Writeable, capitalize, jsxDotNotation, minmax, parseVersion, pipe, transliterate, uncapitalize };
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementType, ComponentProps, FC, ReactNode, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
export { D as Defined } from './shared/xenopomp-essentials.BFV6RP1V.js';
|
|
2
3
|
import { Jsonifiable } from 'type-fest';
|
|
3
4
|
import * as transliteration from 'transliteration';
|
|
4
5
|
|
|
@@ -232,12 +233,6 @@ type DeepInject<T, I extends AnyObject> = T extends object ? {
|
|
|
232
233
|
[K in keyof T]: T[K] extends object ? T[K] & I & DeepInject<T[K], I> : T[K];
|
|
233
234
|
} & I : T;
|
|
234
235
|
|
|
235
|
-
/**
|
|
236
|
-
* Removes undefined from union type.
|
|
237
|
-
* @since 0.0.1
|
|
238
|
-
*/
|
|
239
|
-
type Defined<T> = Exclude<T, undefined>;
|
|
240
|
-
|
|
241
236
|
/**
|
|
242
237
|
* Return never if type does not match JSON schema.
|
|
243
238
|
*
|
|
@@ -566,4 +561,4 @@ declare const minmax: (num: number, [min, max]: [min: number | undefined, max: n
|
|
|
566
561
|
*/
|
|
567
562
|
declare function jsxDotNotation<Props = EmptyObject, Rest extends Record<string, FC<AnyObject>> = EmptyObject>(comp: FC<Props>, rest: Rest): FC<Props> & Rest;
|
|
568
563
|
|
|
569
|
-
export { type AnyFC, type AnyObject, type ArrayItemType, type ArrayType, type AsyncFC, type AsyncReturnType, type AsyncVariableFC, type DeepInject, type DeepWriteable, type
|
|
564
|
+
export { type AnyFC, type AnyObject, type ArrayItemType, type ArrayType, type AsyncFC, type AsyncReturnType, type AsyncVariableFC, type DeepInject, type DeepWriteable, type EmptyObject, type FcProps, type Fn, type FunctionalChildren, type Jsonish, type Lenient, type LenientAutocomplete, type MatchType, type MergeTypes, type Modify, type NextErrorParams, type NextParams, type NextSearchParams, type Nullable, type OneOf, type OnlyFirst, type Preid, type RecordKey, type RecordValue, type ReplaceReturnType, type SelectivePartial, type SetState, type StrictOmit, type Synchronous, type Undefinable, type VariableFC, type VersionData, type WeakOmit, type Writeable, capitalize, jsxDotNotation, minmax, parseVersion, pipe, transliterate, uncapitalize };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xenopomp-essentials",
|
|
3
|
-
"version": "0.1.3-rc.
|
|
3
|
+
"version": "0.1.3-rc.4",
|
|
4
4
|
"author": "XenoPOMP <101574433+XenoPOMP@users.noreply.github.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
"zod": "*"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@
|
|
40
|
-
"@ririd/eslint-config": "^1.4.0",
|
|
39
|
+
"@ririd/eslint-config": "1.1.0",
|
|
41
40
|
"@types/react": "^19.0.8",
|
|
42
41
|
"deepmerge-ts": "^7.1.5",
|
|
43
42
|
"eslint": "^9.22.0",
|
package/eslint/defaults/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ririd';
|
package/eslint/defaults/ririd.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { RiridOptions } from '../types';
|
|
2
|
-
|
|
3
|
-
export const defaultRiridOptions: RiridOptions = {
|
|
4
|
-
next: true,
|
|
5
|
-
react: true,
|
|
6
|
-
jsonc: false,
|
|
7
|
-
yaml: false,
|
|
8
|
-
stylistic: {
|
|
9
|
-
semi: true,
|
|
10
|
-
quotes: 'single',
|
|
11
|
-
},
|
|
12
|
-
typescript: {
|
|
13
|
-
overrides: {
|
|
14
|
-
'ts/consistent-type-definitions': ['error', 'interface'],
|
|
15
|
-
'ts/interface-name-prefix': 'off',
|
|
16
|
-
'ts/explicit-function-return-type': 'off',
|
|
17
|
-
'ts/explicit-module-boundary-types': 'off',
|
|
18
|
-
'ts/no-explicit-any': 'off',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
rules: {
|
|
22
|
-
'import/order': 'off',
|
|
23
|
-
'react/react-in-jsx-scope': 'off',
|
|
24
|
-
'react/prop-types': 'off',
|
|
25
|
-
'antfu/top-level-function': 'off',
|
|
26
|
-
'perfectionist/sort-imports': 'off',
|
|
27
|
-
'perfectionist/sort-named-imports': 'off',
|
|
28
|
-
'perfectionist/sort-named-exports': 'off',
|
|
29
|
-
'antfu/consistent-chaining': 'off',
|
|
30
|
-
'perfectionist/sort-exports': 'off',
|
|
31
|
-
'style/no-multiple-empty-lines': 'off',
|
|
32
|
-
},
|
|
33
|
-
};
|
package/eslint/index.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import ririd from '@ririd/eslint-config';
|
|
2
|
-
import { deepmerge } from 'deepmerge-ts';
|
|
3
|
-
import globals from 'globals';
|
|
4
|
-
|
|
5
|
-
import { defaultRiridOptions } from './defaults';
|
|
6
|
-
import type { RiridOptions, RiridReturn, UserConfig } from './types';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* XenoPOMP`s default ESLint config. Uses @ririd/eslint-config
|
|
10
|
-
* under the hood.
|
|
11
|
-
*
|
|
12
|
-
* @param options
|
|
13
|
-
* @param userConfigs
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* import { xenopomp } from 'xenopomp-essentials';
|
|
17
|
-
*
|
|
18
|
-
* export default xenopomp(
|
|
19
|
-
* // Setup Ririd options
|
|
20
|
-
* {
|
|
21
|
-
* react: false,
|
|
22
|
-
* },
|
|
23
|
-
*
|
|
24
|
-
* // Setup custom user configs
|
|
25
|
-
* {
|
|
26
|
-
* name: 'Custom config #1',
|
|
27
|
-
* rules: {
|
|
28
|
-
* 'some/rule-name': 'warn',
|
|
29
|
-
* },
|
|
30
|
-
* // ...
|
|
31
|
-
* },
|
|
32
|
-
* // ...
|
|
33
|
-
* );
|
|
34
|
-
*/
|
|
35
|
-
export default function xenopomp(
|
|
36
|
-
options?: RiridOptions,
|
|
37
|
-
...userConfigs: UserConfig[]
|
|
38
|
-
): RiridReturn {
|
|
39
|
-
return ririd(
|
|
40
|
-
deepmerge(defaultRiridOptions, options),
|
|
41
|
-
|
|
42
|
-
// User configs
|
|
43
|
-
{
|
|
44
|
-
name: 'Old config',
|
|
45
|
-
languageOptions: {
|
|
46
|
-
globals: {
|
|
47
|
-
...globals.browser,
|
|
48
|
-
...globals.jquery,
|
|
49
|
-
...globals.node,
|
|
50
|
-
|
|
51
|
-
// Rewrite globals anyway
|
|
52
|
-
document: 'readonly',
|
|
53
|
-
navigator: 'readonly',
|
|
54
|
-
window: 'readonly',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
// Ignore patterns
|
|
59
|
-
ignores: [
|
|
60
|
-
'**/.next/*',
|
|
61
|
-
'**/node_modules/*',
|
|
62
|
-
'**/.github/*',
|
|
63
|
-
'cypress',
|
|
64
|
-
'**/__tests__/e2e/*',
|
|
65
|
-
'*.json',
|
|
66
|
-
'**/*.d.ts',
|
|
67
|
-
'.eslintrc.js',
|
|
68
|
-
'eslint.config.js',
|
|
69
|
-
'.prettierrc',
|
|
70
|
-
'.stylelintrc.js',
|
|
71
|
-
'tsconfig.json',
|
|
72
|
-
'package.json',
|
|
73
|
-
'*.md',
|
|
74
|
-
'*.config.ts',
|
|
75
|
-
'*.config.js',
|
|
76
|
-
'*.md',
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: 'Rules breakup #1',
|
|
81
|
-
rules: { '@next/next/no-duplicate-head': 'off' },
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
name: 'Rules breakup #2',
|
|
85
|
-
rules: {
|
|
86
|
-
'style/operator-linebreak': 'off',
|
|
87
|
-
'test/consistent-test-it': 'off',
|
|
88
|
-
'test/prefer-lowercase-title': 'off',
|
|
89
|
-
'style/jsx-quotes': 'off',
|
|
90
|
-
'style/multiline-ternary': 'off',
|
|
91
|
-
'style/indent': 'off',
|
|
92
|
-
},
|
|
93
|
-
ignores: ['cypress'],
|
|
94
|
-
},
|
|
95
|
-
...userConfigs,
|
|
96
|
-
);
|
|
97
|
-
}
|
package/eslint/types/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ririd';
|
package/eslint/types/ririd.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type ririd from '@ririd/eslint-config';
|
|
2
|
-
|
|
3
|
-
import type { Defined } from '@/types';
|
|
4
|
-
|
|
5
|
-
export type RiridReturn = ReturnType<typeof ririd>;
|
|
6
|
-
export type RiridParams = Parameters<typeof ririd>;
|
|
7
|
-
export type RiridOptions = Defined<RiridParams[0]>;
|
|
8
|
-
export type UserConfig = Defined<RiridParams[1]>;
|