@shibanet0/datamitsu-config 0.0.1-alpha-9 → 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 +15 -8
- package/bin/tsc.mjs +8 -4
- package/bin/tsx.mjs +1 -1
- package/datamitsu.js +343 -101
- package/dist/array-func-M6KDQ7DN.js +14 -0
- package/dist/array-func-NPT6GB52.js +14 -0
- package/dist/chunk-7PGRJISO.js +24 -0
- package/dist/clean-package/index.js +12 -4
- package/dist/dist-SV6KNVWH.js +145 -0
- package/dist/eslint/globs.d.ts +16 -0
- package/dist/eslint/index.d.ts +1 -0
- package/dist/eslint/index.js +954 -55
- package/dist/eslint/plugins/array-func.d.ts +2 -0
- 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 -0
- package/dist/eslint/plugins/javascript.d.ts +2 -0
- package/dist/eslint/plugins/json-schema-validator.d.ts +2 -0
- package/dist/eslint/plugins/json.d.ts +2 -0
- package/dist/eslint/plugins/jsx-a11y.d.ts +2 -0
- package/dist/eslint/plugins/n.d.ts +4 -0
- package/dist/eslint/plugins/no-use-extend-native.d.ts +2 -0
- package/dist/eslint/plugins/perfectionist copy.d.ts +2 -0
- package/dist/eslint/plugins/perfectionist.d.ts +2 -2
- package/dist/eslint/plugins/playwright.d.ts +2 -0
- package/dist/eslint/plugins/prettier.d.ts +2 -0
- package/dist/eslint/plugins/promise.d.ts +2 -0
- package/dist/eslint/plugins/react copy.d.ts +2 -0
- package/dist/eslint/plugins/react-hooks.d.ts +2 -0
- package/dist/eslint/plugins/react-perf.d.ts +2 -0
- package/dist/eslint/plugins/react-prefer-function-component.d.ts +2 -0
- package/dist/eslint/plugins/react-refresh.d.ts +2 -0
- package/dist/eslint/plugins/react.d.ts +2 -0
- package/dist/eslint/plugins/security.d.ts +2 -0
- package/dist/eslint/plugins/sonarjs.d.ts +2 -0
- package/dist/eslint/plugins/storybook.d.ts +2 -0
- package/dist/eslint/plugins/toml.d.ts +2 -0
- package/dist/eslint/plugins/turbo.d.ts +2 -0
- package/dist/eslint/plugins/typescript.d.ts +2 -0
- package/dist/eslint/plugins/unicorn copy.d.ts +2 -0
- package/dist/eslint/plugins/unicorn.d.ts +2 -0
- package/dist/eslint/plugins/unused-imports.d.ts +2 -0
- package/dist/eslint/plugins/vanilla-extract.d.ts +2 -0
- package/dist/eslint/plugins/yml.d.ts +2 -0
- package/dist/eslint/types.d.ts +34 -0
- package/dist/globs/globs.d.ts +1 -0
- package/dist/json-LWTL4ZNK.js +18 -0
- package/dist/json-ZAIWY2QG.js +18 -0
- package/dist/jsx-a11y-DENBIOMT.js +7 -0
- package/dist/no-use-extend-native-WXT3EZT4.js +7 -0
- package/dist/no-use-extend-native-ZPCF5GPF.js +7 -0
- package/dist/oxlint/index.d.ts +2 -0
- package/dist/playwright-BGT6YZAD.js +15 -0
- package/dist/playwright-EQJ74ILC.js +15 -0
- package/dist/prettier/index.js +1 -1
- package/dist/prettier-STALF5K5.js +7 -0
- package/dist/prettier-VWVEU6BH.js +7 -0
- package/dist/promise-4UOFB7NK.js +7 -0
- package/dist/promise-GMCQOXN6.js +7 -0
- package/dist/react-QIEZHZI3.js +61 -0
- package/dist/react-SBV4CSZW.js +10 -0
- package/dist/react-hooks-KCD4FRWS.js +7 -0
- package/dist/react-hooks-R6UCTUUG.js +7 -0
- package/dist/react-perf-I32W4SW7.js +7 -0
- package/dist/react-prefer-function-component-ZCGU3TJA.js +7 -0
- package/dist/security-QVOYXU25.js +7 -0
- package/dist/sonarjs-L2LS4QXC.js +16 -0
- package/dist/storybook-HBDSOOCR.js +7 -0
- package/dist/storybook-IETULN4Z.js +8 -0
- package/dist/storybook-IFYU76LT.js +7 -0
- package/dist/toml-UYLTOG46.js +7 -0
- package/dist/toml-Y76F5J2F.js +7 -0
- package/dist/turbo-BF4PT2F4.js +7 -0
- package/dist/turbo-ZBSVFMOO.js +23 -0
- package/dist/unicorn-CIVFI3IM.js +17 -0
- package/dist/unused-imports-7PV5NHDW.js +25 -0
- package/dist/unused-imports-GCXR6T7K.js +31 -0
- package/dist/unused-imports-PHM72DI2.js +25 -0
- package/dist/vanilla-extract-52HEEDJV.js +11 -0
- package/oxlint_configuration_schema.json +712 -0
- package/package.json +12 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import type { TypedFlatConfigItem } from "../types";
|
|
2
|
+
export declare function perfectionist(): 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,18 @@
|
|
|
1
|
+
// src/eslint/plugins/json.ts
|
|
2
|
+
import "@eslint/config-helpers";
|
|
3
|
+
import json from "eslint-plugin-json";
|
|
4
|
+
var jsonRules = [
|
|
5
|
+
{
|
|
6
|
+
files: ["**/*.json"],
|
|
7
|
+
...json.configs["recommended"]
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
files: ["**/tsconfig*.json"],
|
|
11
|
+
rules: {
|
|
12
|
+
"json/*": ["error", { allowComments: true }]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
export {
|
|
17
|
+
jsonRules
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/eslint/plugins/json.ts
|
|
2
|
+
import json from "eslint-plugin-json";
|
|
3
|
+
import "@eslint/config-helpers";
|
|
4
|
+
var jsonRules = [
|
|
5
|
+
{
|
|
6
|
+
files: ["**/*.json"],
|
|
7
|
+
...json.configs["recommended"]
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
files: ["**/tsconfig*.json"],
|
|
11
|
+
rules: {
|
|
12
|
+
"json/*": ["error", { allowComments: true }]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
export {
|
|
17
|
+
jsonRules
|
|
18
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// src/eslint/plugins/no-use-extend-native.ts
|
|
2
|
+
import "@eslint/config-helpers";
|
|
3
|
+
import eslintPluginNoUseExtendNative from "eslint-plugin-no-use-extend-native";
|
|
4
|
+
var noUseExtendNativeRules = eslintPluginNoUseExtendNative.configs.recommended;
|
|
5
|
+
export {
|
|
6
|
+
noUseExtendNativeRules
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// src/eslint/plugins/no-use-extend-native.ts
|
|
2
|
+
import eslintPluginNoUseExtendNative from "eslint-plugin-no-use-extend-native";
|
|
3
|
+
import "@eslint/config-helpers";
|
|
4
|
+
var noUseExtendNativeRules = eslintPluginNoUseExtendNative.configs.recommended;
|
|
5
|
+
export {
|
|
6
|
+
noUseExtendNativeRules
|
|
7
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/eslint/plugins/playwright.ts
|
|
2
|
+
import "@eslint/config-helpers";
|
|
3
|
+
import playwright from "eslint-plugin-playwright";
|
|
4
|
+
var playwrightRules = {
|
|
5
|
+
...playwright.configs["flat/recommended"],
|
|
6
|
+
files: ["tests/**"],
|
|
7
|
+
rules: {
|
|
8
|
+
...playwright.configs["flat/recommended"].rules
|
|
9
|
+
// Customize Playwright rules
|
|
10
|
+
// ...
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
playwrightRules
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/eslint/plugins/playwright.ts
|
|
2
|
+
import playwright from "eslint-plugin-playwright";
|
|
3
|
+
import "@eslint/config-helpers";
|
|
4
|
+
var playwrightRules = {
|
|
5
|
+
...playwright.configs["flat/recommended"],
|
|
6
|
+
files: ["tests/**"],
|
|
7
|
+
rules: {
|
|
8
|
+
...playwright.configs["flat/recommended"].rules
|
|
9
|
+
// Customize Playwright rules
|
|
10
|
+
// ...
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
playwrightRules
|
|
15
|
+
};
|
package/dist/prettier/index.js
CHANGED
|
@@ -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,7 @@
|
|
|
1
|
+
// src/eslint/plugins/react-prefer-function-component.ts
|
|
2
|
+
import "@eslint/config-helpers";
|
|
3
|
+
import preferFunctionComponent from "eslint-plugin-react-prefer-function-component/config";
|
|
4
|
+
var reactPreferFunctionComponentRules = preferFunctionComponent.configs.recommended;
|
|
5
|
+
export {
|
|
6
|
+
reactPreferFunctionComponentRules
|
|
7
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/eslint/plugins/sonarjs.ts
|
|
2
|
+
import "@eslint/config-helpers";
|
|
3
|
+
import sonarjs from "eslint-plugin-sonarjs";
|
|
4
|
+
var sonarjsRules = [
|
|
5
|
+
sonarjs.configs.recommended,
|
|
6
|
+
{
|
|
7
|
+
rules: {
|
|
8
|
+
"sonarjs/cognitive-complexity": "off",
|
|
9
|
+
"sonarjs/no-commented-code": "off",
|
|
10
|
+
"sonarjs/no-small-switch": "off"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
];
|
|
14
|
+
export {
|
|
15
|
+
sonarjsRules
|
|
16
|
+
};
|
|
@@ -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,17 @@
|
|
|
1
|
+
// src/eslint/plugins/unicorn.ts
|
|
2
|
+
import "@eslint/config-helpers";
|
|
3
|
+
import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
|
4
|
+
var unicornRules = [
|
|
5
|
+
eslintPluginUnicorn.configs.recommended,
|
|
6
|
+
{
|
|
7
|
+
rules: {
|
|
8
|
+
"unicorn/empty-brace-spaces": "off",
|
|
9
|
+
"unicorn/filename-case": "off",
|
|
10
|
+
"unicorn/prefer-global-this": "off",
|
|
11
|
+
"unicorn/prefer-query-selector": "off"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
export {
|
|
16
|
+
unicornRules
|
|
17
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/eslint/plugins/unused-imports.ts
|
|
2
|
+
import unusedImports from "eslint-plugin-unused-imports";
|
|
3
|
+
import "@eslint/config-helpers";
|
|
4
|
+
var unusedImportsRules = {
|
|
5
|
+
plugins: {
|
|
6
|
+
"unused-imports": unusedImports
|
|
7
|
+
},
|
|
8
|
+
rules: {
|
|
9
|
+
"no-unused-vars": "off",
|
|
10
|
+
// or "@typescript-eslint/no-unused-vars": "off",
|
|
11
|
+
"unused-imports/no-unused-imports": "error",
|
|
12
|
+
"unused-imports/no-unused-vars": [
|
|
13
|
+
"warn",
|
|
14
|
+
{
|
|
15
|
+
args: "after-used",
|
|
16
|
+
argsIgnorePattern: "^_",
|
|
17
|
+
vars: "all",
|
|
18
|
+
varsIgnorePattern: "^_"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
unusedImportsRules
|
|
25
|
+
};
|