@shibanet0/datamitsu-config 0.0.1-alpha-10 → 0.0.1-alpha-11
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/bin/datamitsu.mjs +1 -0
- package/datamitsu.js +247 -40
- package/dist/chunk-7PGRJISO.js +24 -0
- package/dist/dist-SV6KNVWH.js +145 -0
- package/dist/eslint/globs.d.ts +16 -0
- package/dist/eslint/index.js +869 -261
- package/dist/eslint/plugins/arrayFunc.d.ts +2 -0
- package/dist/eslint/plugins/deMorgan.d.ts +2 -0
- package/dist/eslint/plugins/import.d.ts +2 -2
- package/dist/eslint/plugins/javascript.d.ts +2 -0
- package/dist/eslint/plugins/jsx-a11y.d.ts +2 -2
- package/dist/eslint/plugins/n.d.ts +2 -0
- package/dist/eslint/plugins/no-use-extend-native.d.ts +2 -2
- package/dist/eslint/plugins/perfectionist.d.ts +2 -2
- package/dist/eslint/plugins/promise.d.ts +2 -2
- package/dist/eslint/plugins/react-hooks.d.ts +2 -2
- package/dist/eslint/plugins/react-perf.d.ts +2 -2
- package/dist/eslint/plugins/react-prefer-function-component.d.ts +2 -2
- package/dist/eslint/plugins/react-refresh.d.ts +2 -2
- package/dist/eslint/plugins/react.d.ts +2 -2
- package/dist/eslint/plugins/security.d.ts +2 -2
- package/dist/eslint/plugins/sonarjs.d.ts +2 -2
- package/dist/eslint/plugins/storybook.d.ts +2 -2
- package/dist/eslint/plugins/turbo.d.ts +2 -2
- package/dist/eslint/plugins/typescript.d.ts +2 -0
- package/dist/eslint/plugins/unicorn.d.ts +2 -2
- package/dist/eslint/plugins/unused-imports.d.ts +2 -2
- package/dist/eslint/types.d.ts +34 -0
- package/dist/globs/globs.d.ts +1 -0
- package/dist/oxlint/index.d.ts +2 -0
- package/dist/react-QIEZHZI3.js +61 -0
- package/dist/storybook-IETULN4Z.js +8 -0
- package/dist/turbo-ZBSVFMOO.js +23 -0
- package/dist/unused-imports-GCXR6T7K.js +31 -0
- package/oxlint_configuration_schema.json +712 -0
- package/package.json +11 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function pluginImport(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function jsxA11y(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function noUseExtendNative(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function perfectionist(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function promise(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function reactHooks(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function reactPerf(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function reactPreferFunctionComponent(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function reactRefresh(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function react(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function security(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function sonarjs(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function storybook(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function turbo(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function unicorn(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function unusedImports(): Promise<TypedFlatConfigItem[]>;
|
package/dist/eslint/types.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { ConfigWithExtendsArray } from "@eslint/config-helpers";
|
|
2
|
+
import type { Linter } from "eslint";
|
|
3
|
+
export type Config = Omit<Linter.Config<Linter.RulesRecord>, "plugins"> & {
|
|
4
|
+
/**
|
|
5
|
+
* An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
|
|
6
|
+
*
|
|
7
|
+
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
8
|
+
*/
|
|
9
|
+
plugins?: Record<string, any>;
|
|
10
|
+
};
|
|
11
|
+
export type ConfigNames = "antfu/astro/rules" | "antfu/astro/setup" | "antfu/command/rules" | "antfu/disables/bin" | "antfu/disables/cjs" | "antfu/disables/cli" | "antfu/disables/config-files" | "antfu/disables/dts" | "antfu/disables/scripts" | "antfu/eslint-comments/rules" | "antfu/formatter/astro" | "antfu/formatter/astro/disables" | "antfu/formatter/css" | "antfu/formatter/graphql" | "antfu/formatter/html" | "antfu/formatter/less" | "antfu/formatter/markdown" | "antfu/formatter/scss" | "antfu/formatter/setup" | "antfu/formatter/svg" | "antfu/formatter/xml" | "antfu/gitignore" | "antfu/ignores" | "antfu/imports/rules" | "antfu/javascript/rules" | "antfu/javascript/setup" | "antfu/jsdoc/rules" | "antfu/jsonc/rules" | "antfu/jsonc/setup" | "antfu/jsx/setup" | "antfu/markdown/disables" | "antfu/markdown/parser" | "antfu/markdown/processor" | "antfu/markdown/setup" | "antfu/nextjs/rules" | "antfu/nextjs/setup" | "antfu/node/rules" | "antfu/perfectionist/setup" | "antfu/pnpm/package-json" | "antfu/pnpm/pnpm-workspace-yaml" | "antfu/pnpm/pnpm-workspace-yaml-sort" | "antfu/react/rules" | "antfu/react/setup" | "antfu/react/type-aware-rules" | "antfu/regexp/rules" | "antfu/solid/rules" | "antfu/solid/setup" | "antfu/sort/package-json" | "antfu/sort/tsconfig-json" | "antfu/stylistic/rules" | "antfu/svelte/rules" | "antfu/svelte/setup" | "antfu/test/rules" | "antfu/test/setup" | "antfu/toml/rules" | "antfu/toml/setup" | "antfu/typescript/erasable-syntax-only" | "antfu/typescript/parser" | "antfu/typescript/rules" | "antfu/typescript/rules-type-aware" | "antfu/typescript/setup" | "antfu/typescript/type-aware-parser" | "antfu/unicorn/rules" | "antfu/unocss" | "antfu/vue/rules" | "antfu/vue/setup" | "antfu/yaml/rules" | "antfu/yaml/setup";
|
|
2
12
|
export type DefineConfigFn = (config?: ConfigWithExtendsArray, options?: DefineConfigOptions) => Promise<ConfigWithExtendsArray>;
|
|
3
13
|
export interface DefineConfigOptions {
|
|
4
14
|
globalIgnores?: string[];
|
|
@@ -6,6 +16,9 @@ export interface DefineConfigOptions {
|
|
|
6
16
|
compat?: {
|
|
7
17
|
disabled?: boolean;
|
|
8
18
|
};
|
|
19
|
+
deMorgan?: {
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
};
|
|
9
22
|
"eslint-plugin-array-func"?: {
|
|
10
23
|
disabled?: boolean;
|
|
11
24
|
};
|
|
@@ -88,4 +101,25 @@ export interface DefineConfigOptions {
|
|
|
88
101
|
disabled?: boolean;
|
|
89
102
|
};
|
|
90
103
|
};
|
|
104
|
+
react?: boolean;
|
|
91
105
|
}
|
|
106
|
+
export type Rules = Record<string, Linter.RuleEntry<any> | undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* An updated version of ESLint's `Linter.Config`, which provides autocompletion
|
|
109
|
+
* for `rules` and relaxes type limitations for `plugins` and `rules`, because
|
|
110
|
+
* many plugins still lack proper type definitions.
|
|
111
|
+
*/
|
|
112
|
+
export type TypedFlatConfigItem = Omit<Linter.Config, "plugins" | "rules"> & {
|
|
113
|
+
/**
|
|
114
|
+
* An object containing a name-value mapping of plugin names to plugin objects.
|
|
115
|
+
* When `files` is specified, these plugins are only available to the matching files.
|
|
116
|
+
*
|
|
117
|
+
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
118
|
+
*/
|
|
119
|
+
plugins?: Record<string, any>;
|
|
120
|
+
/**
|
|
121
|
+
* An object containing the configured rules. When `files` or `ignores` are
|
|
122
|
+
* specified, these rule configurations are only available to the matching files.
|
|
123
|
+
*/
|
|
124
|
+
rules?: Rules;
|
|
125
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// src/eslint/plugins/react.ts
|
|
2
|
+
async function react() {
|
|
3
|
+
const plugin = await import("eslint-plugin-react");
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
name: "shibanet0/react/rules",
|
|
7
|
+
plugins: {
|
|
8
|
+
react: plugin.default
|
|
9
|
+
},
|
|
10
|
+
rules: {
|
|
11
|
+
...plugin.default.configs["jsx-runtime"].rules,
|
|
12
|
+
...plugin.default.configs.recommended.rules,
|
|
13
|
+
"react/destructuring-assignment": "off",
|
|
14
|
+
// TODO
|
|
15
|
+
"react/display-name": "off",
|
|
16
|
+
"react/forbid-component-props": "off",
|
|
17
|
+
// TODO
|
|
18
|
+
"react/forward-ref-uses-ref": "off",
|
|
19
|
+
"react/function-component-definition": "off",
|
|
20
|
+
"react/iframe-missing-sandbox": "off",
|
|
21
|
+
"react/jsx-child-element-spacing": "off",
|
|
22
|
+
"react/jsx-closing-tag-location": "off",
|
|
23
|
+
// TODO
|
|
24
|
+
"react/jsx-curly-newline": "off",
|
|
25
|
+
// TODO
|
|
26
|
+
"react/jsx-filename-extension": "off",
|
|
27
|
+
"react/jsx-handler-names": "off",
|
|
28
|
+
"react/jsx-indent": "off",
|
|
29
|
+
// TODO
|
|
30
|
+
// "react/jsx-max-depth": "off", // TODO
|
|
31
|
+
"react/jsx-max-props-per-line": "off",
|
|
32
|
+
// TODO
|
|
33
|
+
"react/jsx-newline": "off",
|
|
34
|
+
// TODO
|
|
35
|
+
"react/jsx-no-bind": "off",
|
|
36
|
+
// TODO
|
|
37
|
+
"react/jsx-no-literals": "off",
|
|
38
|
+
// TODO
|
|
39
|
+
"react/jsx-no-useless-fragment": "off",
|
|
40
|
+
"react/jsx-one-expression-per-line": "off",
|
|
41
|
+
// TODO
|
|
42
|
+
"react/jsx-pascal-case": "off",
|
|
43
|
+
"react/jsx-props-no-spreading": "off",
|
|
44
|
+
"react/jsx-sort-props": "off",
|
|
45
|
+
// TODO
|
|
46
|
+
"react/no-array-index-key": "off",
|
|
47
|
+
// TODO
|
|
48
|
+
"react/no-unknown-property": "off",
|
|
49
|
+
"react/no-unused-prop-types": "warn",
|
|
50
|
+
"react/prefer-read-only-props": "off",
|
|
51
|
+
// TODO
|
|
52
|
+
"react/prop-types": "off",
|
|
53
|
+
"react/react-in-jsx-scope": "off",
|
|
54
|
+
"react/require-default-props": "off"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
react
|
|
61
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/eslint/plugins/turbo.ts
|
|
2
|
+
import "@eslint/config-helpers";
|
|
3
|
+
import turbo from "eslint-plugin-turbo";
|
|
4
|
+
var turboRules = turbo.configs["flat/recommended"];
|
|
5
|
+
async function reactHooks() {
|
|
6
|
+
const plugin = await import("eslint-plugin-turbo");
|
|
7
|
+
console.log(">>>turbo>>>", { ...plugin.default.configs["flat/recommended"], rules: {} }, "<<<<");
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
name: "shibanet0/turbo/rules",
|
|
11
|
+
plugins: {
|
|
12
|
+
"turbo": plugin.default
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
...plugin.default.configs["flat/recommended"].rules
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
reactHooks,
|
|
22
|
+
turboRules
|
|
23
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/eslint/plugins/unused-imports.ts
|
|
2
|
+
async function unusedImports() {
|
|
3
|
+
const plugin = await import("./dist-SV6KNVWH.js");
|
|
4
|
+
console.log(plugin.default);
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
name: "shibanet0/unused-imports/rules",
|
|
8
|
+
plugins: {
|
|
9
|
+
promise: plugin.default
|
|
10
|
+
},
|
|
11
|
+
rules: {
|
|
12
|
+
...plugin.default.rules,
|
|
13
|
+
"no-unused-vars": "off",
|
|
14
|
+
// or "@typescript-eslint/no-unused-vars": "off",
|
|
15
|
+
"unused-imports/no-unused-imports": "error",
|
|
16
|
+
"unused-imports/no-unused-vars": [
|
|
17
|
+
"warn",
|
|
18
|
+
{
|
|
19
|
+
args: "after-used",
|
|
20
|
+
argsIgnorePattern: "^_",
|
|
21
|
+
vars: "all",
|
|
22
|
+
varsIgnorePattern: "^_"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
unusedImports
|
|
31
|
+
};
|