@rotki/eslint-config 2.1.0 → 2.3.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.cjs +58 -3
- package/dist/index.d.cts +59 -2
- package/dist/index.d.ts +59 -2
- package/dist/index.js +58 -3
- package/package.json +17 -13
package/dist/index.cjs
CHANGED
|
@@ -580,7 +580,7 @@ function imports(options = {}) {
|
|
|
580
580
|
}
|
|
581
581
|
},
|
|
582
582
|
{
|
|
583
|
-
files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`],
|
|
583
|
+
files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`, `**/.vitepress/config.${GLOB_SRC}`],
|
|
584
584
|
rules: {
|
|
585
585
|
"import/no-default-export": "off",
|
|
586
586
|
"no-console": "off"
|
|
@@ -1021,8 +1021,8 @@ function node() {
|
|
|
1021
1021
|
"node/no-exports-assign": "error",
|
|
1022
1022
|
"node/no-new-require": "error",
|
|
1023
1023
|
"node/no-path-concat": "error",
|
|
1024
|
-
"node/prefer-global/buffer": ["
|
|
1025
|
-
"node/prefer-global/process": ["
|
|
1024
|
+
"node/prefer-global/buffer": ["error", "never"],
|
|
1025
|
+
"node/prefer-global/process": ["error", "never"],
|
|
1026
1026
|
"node/process-exit-as-throw": "error"
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
@@ -1589,6 +1589,12 @@ function unicorn() {
|
|
|
1589
1589
|
"unicorn/prefer-type-error": "error",
|
|
1590
1590
|
"unicorn/throw-new-error": "error"
|
|
1591
1591
|
}
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
files: [".github/**/*.md"],
|
|
1595
|
+
rules: {
|
|
1596
|
+
"unicorn/filename-case": "off"
|
|
1597
|
+
}
|
|
1592
1598
|
}
|
|
1593
1599
|
];
|
|
1594
1600
|
}
|
|
@@ -2025,6 +2031,49 @@ async function yaml(options = {}) {
|
|
|
2025
2031
|
];
|
|
2026
2032
|
}
|
|
2027
2033
|
|
|
2034
|
+
// src/configs/storybook.ts
|
|
2035
|
+
async function storybook(options = {}) {
|
|
2036
|
+
const {
|
|
2037
|
+
overrides = {}
|
|
2038
|
+
} = options;
|
|
2039
|
+
await ensurePackages(["eslint-plugin-storybook"]);
|
|
2040
|
+
const [pluginStorybook] = await Promise.all([
|
|
2041
|
+
interopDefault(import("eslint-plugin-storybook"))
|
|
2042
|
+
]);
|
|
2043
|
+
return [
|
|
2044
|
+
{
|
|
2045
|
+
plugins: {
|
|
2046
|
+
storybook: pluginStorybook
|
|
2047
|
+
}
|
|
2048
|
+
},
|
|
2049
|
+
{
|
|
2050
|
+
files: [
|
|
2051
|
+
`*.stories.${GLOB_SRC_EXT}`,
|
|
2052
|
+
`*.story.${GLOB_SRC_EXT}`
|
|
2053
|
+
],
|
|
2054
|
+
rules: {
|
|
2055
|
+
"import/no-anonymous-default-export": "off",
|
|
2056
|
+
"storybook/await-interactions": "error",
|
|
2057
|
+
"storybook/context-in-play-function": "error",
|
|
2058
|
+
"storybook/default-exports": "error",
|
|
2059
|
+
"storybook/hierarchy-separator": "warn",
|
|
2060
|
+
"storybook/no-redundant-story-name": "warn",
|
|
2061
|
+
"storybook/prefer-pascal-case": "warn",
|
|
2062
|
+
"storybook/story-exports": "error",
|
|
2063
|
+
"storybook/use-storybook-expect": "error",
|
|
2064
|
+
"storybook/use-storybook-testing-library": "error",
|
|
2065
|
+
...overrides
|
|
2066
|
+
}
|
|
2067
|
+
},
|
|
2068
|
+
{
|
|
2069
|
+
files: [`.storybook/main.${GLOB_SRC_EXT}`],
|
|
2070
|
+
rules: {
|
|
2071
|
+
"storybook/no-uninstalled-addons": "error"
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
];
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2028
2077
|
// src/factory.ts
|
|
2029
2078
|
var flatConfigProps = [
|
|
2030
2079
|
"files",
|
|
@@ -2049,6 +2098,7 @@ async function rotki(options = {}, ...userConfigs) {
|
|
|
2049
2098
|
gitignore: enableGitignore = true,
|
|
2050
2099
|
isInEditor = !!((import_node_process4.default.env.VSCODE_PID || import_node_process4.default.env.JETBRAINS_IDE || import_node_process4.default.env.VIM) && !import_node_process4.default.env.CI),
|
|
2051
2100
|
rotki: enableRotki,
|
|
2101
|
+
storybook: enableStorybook,
|
|
2052
2102
|
typescript: enableTypeScript = (0, import_local_pkg2.isPackageExists)("typescript"),
|
|
2053
2103
|
vue: enableVue = VuePackages.some((i) => (0, import_local_pkg2.isPackageExists)(i)),
|
|
2054
2104
|
vueI18n: enableVueI18n,
|
|
@@ -2136,6 +2186,11 @@ async function rotki(options = {}, ...userConfigs) {
|
|
|
2136
2186
|
typescript: !!enableTypeScript
|
|
2137
2187
|
}));
|
|
2138
2188
|
}
|
|
2189
|
+
if (enableStorybook) {
|
|
2190
|
+
configs.push(storybook({
|
|
2191
|
+
overrides: getOverrides(options, "storybook")
|
|
2192
|
+
}));
|
|
2193
|
+
}
|
|
2139
2194
|
if (options.jsonc ?? true) {
|
|
2140
2195
|
configs.push(
|
|
2141
2196
|
jsonc({
|
package/dist/index.d.cts
CHANGED
|
@@ -16,6 +16,55 @@ export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
|
16
16
|
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
17
17
|
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
18
18
|
|
|
19
|
+
interface AwaitInteractionsRule {
|
|
20
|
+
'await-interactions': RuleConfig<[]>;
|
|
21
|
+
}
|
|
22
|
+
interface ContextInPlayFunctionRule {
|
|
23
|
+
'context-in-play-function': RuleConfig<[]>;
|
|
24
|
+
}
|
|
25
|
+
interface CsfComponentsRule {
|
|
26
|
+
'csf-component': RuleConfig<[]>;
|
|
27
|
+
}
|
|
28
|
+
interface DefaultExportsRule {
|
|
29
|
+
'default-exports': RuleConfig<[]>;
|
|
30
|
+
}
|
|
31
|
+
interface HierarchySeparatorRule {
|
|
32
|
+
'hierarchy-separator': RuleConfig<[]>;
|
|
33
|
+
}
|
|
34
|
+
interface MetaInlinePropertiesRule {
|
|
35
|
+
'meta-inline-properties': RuleConfig<[{
|
|
36
|
+
csfVersion?: number;
|
|
37
|
+
}]>;
|
|
38
|
+
}
|
|
39
|
+
interface NoRedundantStoryNameRule {
|
|
40
|
+
'no-redundant-story-name': RuleConfig<[]>;
|
|
41
|
+
}
|
|
42
|
+
interface NoStoriesOfRule {
|
|
43
|
+
'no-stories-of': RuleConfig<[]>;
|
|
44
|
+
}
|
|
45
|
+
interface NoTitlePropertyInMetaRule {
|
|
46
|
+
'no-title-property-in-met': RuleConfig<[]>;
|
|
47
|
+
}
|
|
48
|
+
interface NoUninstalledAddonRule {
|
|
49
|
+
'no-uninstalled-addons': RuleConfig<[{
|
|
50
|
+
packageJsonLocation?: string;
|
|
51
|
+
ignore?: string[];
|
|
52
|
+
}]>;
|
|
53
|
+
}
|
|
54
|
+
interface PreferPascalCaseRule {
|
|
55
|
+
'prefer-pascal-case': RuleConfig<[]>;
|
|
56
|
+
}
|
|
57
|
+
interface StoryExportsRule {
|
|
58
|
+
'prefer-pascal-case': RuleConfig<[]>;
|
|
59
|
+
}
|
|
60
|
+
interface UseStorybookExpectRule {
|
|
61
|
+
'use-storybook-expect': RuleConfig<[]>;
|
|
62
|
+
}
|
|
63
|
+
interface UseStorybookTestingLibraryRule {
|
|
64
|
+
'use-storybook-testing-library': RuleConfig<[]>;
|
|
65
|
+
}
|
|
66
|
+
type StorybookRules = AwaitInteractionsRule & ContextInPlayFunctionRule & CsfComponentsRule & DefaultExportsRule & HierarchySeparatorRule & MetaInlinePropertiesRule & NoRedundantStoryNameRule & NoStoriesOfRule & NoTitlePropertyInMetaRule & NoUninstalledAddonRule & PreferPascalCaseRule & StoryExportsRule & UseStorybookExpectRule & UseStorybookTestingLibraryRule;
|
|
67
|
+
|
|
19
68
|
type ValidVLostConfiguration = [
|
|
20
69
|
{
|
|
21
70
|
allowModifiers?: boolean;
|
|
@@ -184,7 +233,7 @@ type WrapRuleConfig<T extends {
|
|
|
184
233
|
[K in keyof T]: T[K] extends RuleConfig ? T[K] : RuleConfig<T[K]>;
|
|
185
234
|
};
|
|
186
235
|
type Awaitable<T> = T | Promise<T>;
|
|
187
|
-
type Rules = WrapRuleConfig<MergeIntersection<Prefix<RuleOptions, '@typescript-eslint/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<YmlRules, 'yml/', 'yaml/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<UnprefixedRuleOptions, '@
|
|
236
|
+
type Rules = WrapRuleConfig<MergeIntersection<Prefix<RuleOptions, '@typescript-eslint/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<YmlRules, 'yml/', 'yaml/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<UnprefixedRuleOptions, '@stylistic/'> & Prefix<Rules$1, 'antfu/'> & ImportRules & EslintRules & JsoncRules & VueRules & RuleOptions$1 & EslintCommentsRules & {
|
|
188
237
|
'test/no-only-tests': RuleConfig<[]>;
|
|
189
238
|
} & {
|
|
190
239
|
'cypress/no-assigning-return-values': RuleConfig<[]>;
|
|
@@ -195,7 +244,7 @@ type Rules = WrapRuleConfig<MergeIntersection<Prefix<RuleOptions, '@typescript-e
|
|
|
195
244
|
'cypress/no-pause': RuleConfig<[]>;
|
|
196
245
|
} & {
|
|
197
246
|
'@rotki/no-deprecated-classes': RuleConfig<[]>;
|
|
198
|
-
} & VuetifyRules & Prefix<VueI18nRules, '@intlify/vue-i18n/'>>>;
|
|
247
|
+
} & VuetifyRules & Prefix<VueI18nRules, '@intlify/vue-i18n/'> & Prefix<StorybookRules, 'storybook/'>>>;
|
|
199
248
|
type FlatConfigItem = Omit<FlatESLintConfigItem<Rules, false>, 'plugins'> & {
|
|
200
249
|
plugins?: Record<string, any>;
|
|
201
250
|
};
|
|
@@ -432,6 +481,14 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
432
481
|
* @default false
|
|
433
482
|
*/
|
|
434
483
|
vueI18n?: boolean | OptionsVueI18n;
|
|
484
|
+
/**
|
|
485
|
+
* Enable storybook linting support
|
|
486
|
+
*
|
|
487
|
+
* Requires installing
|
|
488
|
+
* - `eslint-plugin-storybook
|
|
489
|
+
*
|
|
490
|
+
*/
|
|
491
|
+
storybook?: boolean | OptionsOverrides;
|
|
435
492
|
/**
|
|
436
493
|
* Control to disable some rules in editors.
|
|
437
494
|
* @default auto-detect based on the process.env
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,55 @@ export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
|
16
16
|
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
17
17
|
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
18
18
|
|
|
19
|
+
interface AwaitInteractionsRule {
|
|
20
|
+
'await-interactions': RuleConfig<[]>;
|
|
21
|
+
}
|
|
22
|
+
interface ContextInPlayFunctionRule {
|
|
23
|
+
'context-in-play-function': RuleConfig<[]>;
|
|
24
|
+
}
|
|
25
|
+
interface CsfComponentsRule {
|
|
26
|
+
'csf-component': RuleConfig<[]>;
|
|
27
|
+
}
|
|
28
|
+
interface DefaultExportsRule {
|
|
29
|
+
'default-exports': RuleConfig<[]>;
|
|
30
|
+
}
|
|
31
|
+
interface HierarchySeparatorRule {
|
|
32
|
+
'hierarchy-separator': RuleConfig<[]>;
|
|
33
|
+
}
|
|
34
|
+
interface MetaInlinePropertiesRule {
|
|
35
|
+
'meta-inline-properties': RuleConfig<[{
|
|
36
|
+
csfVersion?: number;
|
|
37
|
+
}]>;
|
|
38
|
+
}
|
|
39
|
+
interface NoRedundantStoryNameRule {
|
|
40
|
+
'no-redundant-story-name': RuleConfig<[]>;
|
|
41
|
+
}
|
|
42
|
+
interface NoStoriesOfRule {
|
|
43
|
+
'no-stories-of': RuleConfig<[]>;
|
|
44
|
+
}
|
|
45
|
+
interface NoTitlePropertyInMetaRule {
|
|
46
|
+
'no-title-property-in-met': RuleConfig<[]>;
|
|
47
|
+
}
|
|
48
|
+
interface NoUninstalledAddonRule {
|
|
49
|
+
'no-uninstalled-addons': RuleConfig<[{
|
|
50
|
+
packageJsonLocation?: string;
|
|
51
|
+
ignore?: string[];
|
|
52
|
+
}]>;
|
|
53
|
+
}
|
|
54
|
+
interface PreferPascalCaseRule {
|
|
55
|
+
'prefer-pascal-case': RuleConfig<[]>;
|
|
56
|
+
}
|
|
57
|
+
interface StoryExportsRule {
|
|
58
|
+
'prefer-pascal-case': RuleConfig<[]>;
|
|
59
|
+
}
|
|
60
|
+
interface UseStorybookExpectRule {
|
|
61
|
+
'use-storybook-expect': RuleConfig<[]>;
|
|
62
|
+
}
|
|
63
|
+
interface UseStorybookTestingLibraryRule {
|
|
64
|
+
'use-storybook-testing-library': RuleConfig<[]>;
|
|
65
|
+
}
|
|
66
|
+
type StorybookRules = AwaitInteractionsRule & ContextInPlayFunctionRule & CsfComponentsRule & DefaultExportsRule & HierarchySeparatorRule & MetaInlinePropertiesRule & NoRedundantStoryNameRule & NoStoriesOfRule & NoTitlePropertyInMetaRule & NoUninstalledAddonRule & PreferPascalCaseRule & StoryExportsRule & UseStorybookExpectRule & UseStorybookTestingLibraryRule;
|
|
67
|
+
|
|
19
68
|
type ValidVLostConfiguration = [
|
|
20
69
|
{
|
|
21
70
|
allowModifiers?: boolean;
|
|
@@ -184,7 +233,7 @@ type WrapRuleConfig<T extends {
|
|
|
184
233
|
[K in keyof T]: T[K] extends RuleConfig ? T[K] : RuleConfig<T[K]>;
|
|
185
234
|
};
|
|
186
235
|
type Awaitable<T> = T | Promise<T>;
|
|
187
|
-
type Rules = WrapRuleConfig<MergeIntersection<Prefix<RuleOptions, '@typescript-eslint/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<YmlRules, 'yml/', 'yaml/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<UnprefixedRuleOptions, '@
|
|
236
|
+
type Rules = WrapRuleConfig<MergeIntersection<Prefix<RuleOptions, '@typescript-eslint/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<YmlRules, 'yml/', 'yaml/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<UnprefixedRuleOptions, '@stylistic/'> & Prefix<Rules$1, 'antfu/'> & ImportRules & EslintRules & JsoncRules & VueRules & RuleOptions$1 & EslintCommentsRules & {
|
|
188
237
|
'test/no-only-tests': RuleConfig<[]>;
|
|
189
238
|
} & {
|
|
190
239
|
'cypress/no-assigning-return-values': RuleConfig<[]>;
|
|
@@ -195,7 +244,7 @@ type Rules = WrapRuleConfig<MergeIntersection<Prefix<RuleOptions, '@typescript-e
|
|
|
195
244
|
'cypress/no-pause': RuleConfig<[]>;
|
|
196
245
|
} & {
|
|
197
246
|
'@rotki/no-deprecated-classes': RuleConfig<[]>;
|
|
198
|
-
} & VuetifyRules & Prefix<VueI18nRules, '@intlify/vue-i18n/'>>>;
|
|
247
|
+
} & VuetifyRules & Prefix<VueI18nRules, '@intlify/vue-i18n/'> & Prefix<StorybookRules, 'storybook/'>>>;
|
|
199
248
|
type FlatConfigItem = Omit<FlatESLintConfigItem<Rules, false>, 'plugins'> & {
|
|
200
249
|
plugins?: Record<string, any>;
|
|
201
250
|
};
|
|
@@ -432,6 +481,14 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
432
481
|
* @default false
|
|
433
482
|
*/
|
|
434
483
|
vueI18n?: boolean | OptionsVueI18n;
|
|
484
|
+
/**
|
|
485
|
+
* Enable storybook linting support
|
|
486
|
+
*
|
|
487
|
+
* Requires installing
|
|
488
|
+
* - `eslint-plugin-storybook
|
|
489
|
+
*
|
|
490
|
+
*/
|
|
491
|
+
storybook?: boolean | OptionsOverrides;
|
|
435
492
|
/**
|
|
436
493
|
* Control to disable some rules in editors.
|
|
437
494
|
* @default auto-detect based on the process.env
|
package/dist/index.js
CHANGED
|
@@ -487,7 +487,7 @@ function imports(options = {}) {
|
|
|
487
487
|
}
|
|
488
488
|
},
|
|
489
489
|
{
|
|
490
|
-
files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`],
|
|
490
|
+
files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`, `**/.vitepress/config.${GLOB_SRC}`],
|
|
491
491
|
rules: {
|
|
492
492
|
"import/no-default-export": "off",
|
|
493
493
|
"no-console": "off"
|
|
@@ -928,8 +928,8 @@ function node() {
|
|
|
928
928
|
"node/no-exports-assign": "error",
|
|
929
929
|
"node/no-new-require": "error",
|
|
930
930
|
"node/no-path-concat": "error",
|
|
931
|
-
"node/prefer-global/buffer": ["
|
|
932
|
-
"node/prefer-global/process": ["
|
|
931
|
+
"node/prefer-global/buffer": ["error", "never"],
|
|
932
|
+
"node/prefer-global/process": ["error", "never"],
|
|
933
933
|
"node/process-exit-as-throw": "error"
|
|
934
934
|
}
|
|
935
935
|
}
|
|
@@ -1496,6 +1496,12 @@ function unicorn() {
|
|
|
1496
1496
|
"unicorn/prefer-type-error": "error",
|
|
1497
1497
|
"unicorn/throw-new-error": "error"
|
|
1498
1498
|
}
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
files: [".github/**/*.md"],
|
|
1502
|
+
rules: {
|
|
1503
|
+
"unicorn/filename-case": "off"
|
|
1504
|
+
}
|
|
1499
1505
|
}
|
|
1500
1506
|
];
|
|
1501
1507
|
}
|
|
@@ -1932,6 +1938,49 @@ async function yaml(options = {}) {
|
|
|
1932
1938
|
];
|
|
1933
1939
|
}
|
|
1934
1940
|
|
|
1941
|
+
// src/configs/storybook.ts
|
|
1942
|
+
async function storybook(options = {}) {
|
|
1943
|
+
const {
|
|
1944
|
+
overrides = {}
|
|
1945
|
+
} = options;
|
|
1946
|
+
await ensurePackages(["eslint-plugin-storybook"]);
|
|
1947
|
+
const [pluginStorybook] = await Promise.all([
|
|
1948
|
+
interopDefault(import("eslint-plugin-storybook"))
|
|
1949
|
+
]);
|
|
1950
|
+
return [
|
|
1951
|
+
{
|
|
1952
|
+
plugins: {
|
|
1953
|
+
storybook: pluginStorybook
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
files: [
|
|
1958
|
+
`*.stories.${GLOB_SRC_EXT}`,
|
|
1959
|
+
`*.story.${GLOB_SRC_EXT}`
|
|
1960
|
+
],
|
|
1961
|
+
rules: {
|
|
1962
|
+
"import/no-anonymous-default-export": "off",
|
|
1963
|
+
"storybook/await-interactions": "error",
|
|
1964
|
+
"storybook/context-in-play-function": "error",
|
|
1965
|
+
"storybook/default-exports": "error",
|
|
1966
|
+
"storybook/hierarchy-separator": "warn",
|
|
1967
|
+
"storybook/no-redundant-story-name": "warn",
|
|
1968
|
+
"storybook/prefer-pascal-case": "warn",
|
|
1969
|
+
"storybook/story-exports": "error",
|
|
1970
|
+
"storybook/use-storybook-expect": "error",
|
|
1971
|
+
"storybook/use-storybook-testing-library": "error",
|
|
1972
|
+
...overrides
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
{
|
|
1976
|
+
files: [`.storybook/main.${GLOB_SRC_EXT}`],
|
|
1977
|
+
rules: {
|
|
1978
|
+
"storybook/no-uninstalled-addons": "error"
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
];
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1935
1984
|
// src/factory.ts
|
|
1936
1985
|
var flatConfigProps = [
|
|
1937
1986
|
"files",
|
|
@@ -1956,6 +2005,7 @@ async function rotki(options = {}, ...userConfigs) {
|
|
|
1956
2005
|
gitignore: enableGitignore = true,
|
|
1957
2006
|
isInEditor = !!((process4.env.VSCODE_PID || process4.env.JETBRAINS_IDE || process4.env.VIM) && !process4.env.CI),
|
|
1958
2007
|
rotki: enableRotki,
|
|
2008
|
+
storybook: enableStorybook,
|
|
1959
2009
|
typescript: enableTypeScript = isPackageExists2("typescript"),
|
|
1960
2010
|
vue: enableVue = VuePackages.some((i) => isPackageExists2(i)),
|
|
1961
2011
|
vueI18n: enableVueI18n,
|
|
@@ -2043,6 +2093,11 @@ async function rotki(options = {}, ...userConfigs) {
|
|
|
2043
2093
|
typescript: !!enableTypeScript
|
|
2044
2094
|
}));
|
|
2045
2095
|
}
|
|
2096
|
+
if (enableStorybook) {
|
|
2097
|
+
configs.push(storybook({
|
|
2098
|
+
overrides: getOverrides(options, "storybook")
|
|
2099
|
+
}));
|
|
2100
|
+
}
|
|
2046
2101
|
if (options.jsonc ?? true) {
|
|
2047
2102
|
configs.push(
|
|
2048
2103
|
jsonc({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rotki/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"packageManager": "pnpm@8.14.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@rotki/eslint-plugin": ">=0.0.3",
|
|
29
29
|
"eslint": ">=8.56.0",
|
|
30
30
|
"eslint-plugin-cypress": ">=2.15.0",
|
|
31
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
31
32
|
"eslint-plugin-vuetify": "^1 || ^2"
|
|
32
33
|
},
|
|
33
34
|
"peerDependenciesMeta": {
|
|
@@ -40,6 +41,9 @@
|
|
|
40
41
|
"eslint-plugin-cypress": {
|
|
41
42
|
"optional": true
|
|
42
43
|
},
|
|
44
|
+
"eslint-plugin-storybook": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
43
47
|
"eslint-plugin-vuetify": {
|
|
44
48
|
"optional": true
|
|
45
49
|
}
|
|
@@ -49,18 +53,18 @@
|
|
|
49
53
|
"@antfu/install-pkg": "0.3.1",
|
|
50
54
|
"@eslint-types/typescript-eslint": "6.18.1",
|
|
51
55
|
"@eslint-types/unicorn": "50.0.1",
|
|
52
|
-
"@stylistic/eslint-plugin": "1.5.
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
54
|
-
"@typescript-eslint/parser": "6.
|
|
56
|
+
"@stylistic/eslint-plugin": "1.5.4",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "6.19.0",
|
|
58
|
+
"@typescript-eslint/parser": "6.19.0",
|
|
55
59
|
"eslint-config-flat-gitignore": "0.1.2",
|
|
56
60
|
"eslint-config-prettier": "9.1.0",
|
|
57
61
|
"eslint-merge-processors": "0.1.0",
|
|
58
|
-
"eslint-plugin-antfu": "2.1.
|
|
62
|
+
"eslint-plugin-antfu": "2.1.2",
|
|
59
63
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
60
64
|
"eslint-plugin-format": "0.1.0",
|
|
61
65
|
"eslint-plugin-html": "7.1.0",
|
|
62
66
|
"eslint-plugin-i": "2.29.1",
|
|
63
|
-
"eslint-plugin-jsonc": "2.
|
|
67
|
+
"eslint-plugin-jsonc": "2.12.2",
|
|
64
68
|
"eslint-plugin-markdown": "3.0.1",
|
|
65
69
|
"eslint-plugin-n": "16.6.2",
|
|
66
70
|
"eslint-plugin-no-only-tests": "3.1.0",
|
|
@@ -70,24 +74,24 @@
|
|
|
70
74
|
"eslint-plugin-unused-imports": "3.0.0",
|
|
71
75
|
"eslint-plugin-vitest": "0.3.20",
|
|
72
76
|
"eslint-plugin-vue": "9.20.1",
|
|
73
|
-
"eslint-plugin-yml": "1.
|
|
77
|
+
"eslint-plugin-yml": "1.12.2",
|
|
74
78
|
"eslint-processor-vue-blocks": "0.1.1",
|
|
75
79
|
"globals": "13.24.0",
|
|
76
80
|
"jsonc-eslint-parser": "2.4.0",
|
|
77
81
|
"local-pkg": "0.5.0",
|
|
78
|
-
"prettier": "3.2.
|
|
82
|
+
"prettier": "3.2.4",
|
|
79
83
|
"prompts": "2.4.2",
|
|
80
|
-
"vue-eslint-parser": "9.4.
|
|
84
|
+
"vue-eslint-parser": "9.4.1",
|
|
81
85
|
"yaml-eslint-parser": "1.2.2"
|
|
82
86
|
},
|
|
83
87
|
"devDependencies": {
|
|
84
|
-
"@commitlint/cli": "18.
|
|
85
|
-
"@commitlint/config-conventional": "18.
|
|
88
|
+
"@commitlint/cli": "18.5.0",
|
|
89
|
+
"@commitlint/config-conventional": "18.5.0",
|
|
86
90
|
"@rotki/eslint-config": "*",
|
|
87
91
|
"@types/eslint": "8.56.2",
|
|
88
|
-
"@types/node": "20.11.
|
|
92
|
+
"@types/node": "20.11.5",
|
|
89
93
|
"@types/prompts": "2.4.9",
|
|
90
|
-
"bumpp": "9.
|
|
94
|
+
"bumpp": "9.3.0",
|
|
91
95
|
"eslint": "8.56.0",
|
|
92
96
|
"eslint-flat-config-viewer": "0.1.11",
|
|
93
97
|
"husky": "8.0.3",
|