@nonitomo/eslint 0.0.1 → 0.0.2
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/cjs/index.cjs +3 -3
- package/dist/cjs/index.d.cts +4 -5
- package/dist/esm/index.d.mts +4 -5
- package/dist/esm/index.mjs +3 -3
- package/package.json +13 -13
package/dist/cjs/index.cjs
CHANGED
|
@@ -23,13 +23,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
let _antfu_eslint_config = require("@antfu/eslint-config");
|
|
24
24
|
_antfu_eslint_config = __toESM(_antfu_eslint_config, 1);
|
|
25
25
|
// src/index.ts
|
|
26
|
-
const eslint = (inputOptions = {}, ...configs) => {
|
|
26
|
+
const eslint = async (inputOptions = {}, ...configs) => {
|
|
27
27
|
const { typescript = false, ...options } = inputOptions;
|
|
28
28
|
return (0, _antfu_eslint_config.default)({
|
|
29
29
|
...options,
|
|
30
30
|
...typescript === "engine" ? { typescript: { tsconfigPath: "./tsconfig.json" } } : { typescript }
|
|
31
31
|
}, {
|
|
32
|
-
name: "
|
|
32
|
+
name: "nonitomo/rewrite",
|
|
33
33
|
files: ["**/*.?([cm])[jt]s?(x)"],
|
|
34
34
|
rules: {
|
|
35
35
|
"antfu/if-newline": "off",
|
|
@@ -48,7 +48,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
48
48
|
"test/prefer-lowercase-title": "off"
|
|
49
49
|
}
|
|
50
50
|
}, {
|
|
51
|
-
name: "
|
|
51
|
+
name: "nonitomo/sort",
|
|
52
52
|
rules: {
|
|
53
53
|
"perfectionist/sort-array-includes": ["error", {
|
|
54
54
|
order: "asc",
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Awaitable,
|
|
1
|
+
import { Awaitable, OptionsConfig, OptionsTypescript, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
|
-
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
4
3
|
type EslintOptions = OptionsConfig & TypedFlatConfigItem & {
|
|
5
|
-
typescript?: boolean |
|
|
4
|
+
typescript?: boolean | 'engine' | OptionsTypescript;
|
|
6
5
|
};
|
|
7
|
-
type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) =>
|
|
6
|
+
type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => Promise<Linter.Config[]>;
|
|
8
7
|
declare const eslint: Eslint;
|
|
9
|
-
export {
|
|
8
|
+
export { eslint };
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Awaitable,
|
|
1
|
+
import { Awaitable, OptionsConfig, OptionsTypescript, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
|
-
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
4
3
|
type EslintOptions = OptionsConfig & TypedFlatConfigItem & {
|
|
5
|
-
typescript?: boolean |
|
|
4
|
+
typescript?: boolean | 'engine' | OptionsTypescript;
|
|
6
5
|
};
|
|
7
|
-
type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) =>
|
|
6
|
+
type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => Promise<Linter.Config[]>;
|
|
8
7
|
declare const eslint: Eslint;
|
|
9
|
-
export {
|
|
8
|
+
export { eslint };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import antfu from "@antfu/eslint-config";
|
|
2
2
|
// src/index.ts
|
|
3
|
-
const eslint = (inputOptions = {}, ...configs) => {
|
|
3
|
+
const eslint = async (inputOptions = {}, ...configs) => {
|
|
4
4
|
const { typescript = false, ...options } = inputOptions;
|
|
5
5
|
return antfu({
|
|
6
6
|
...options,
|
|
7
7
|
...typescript === "engine" ? { typescript: { tsconfigPath: "./tsconfig.json" } } : { typescript }
|
|
8
8
|
}, {
|
|
9
|
-
name: "
|
|
9
|
+
name: "nonitomo/rewrite",
|
|
10
10
|
files: ["**/*.?([cm])[jt]s?(x)"],
|
|
11
11
|
rules: {
|
|
12
12
|
"antfu/if-newline": "off",
|
|
@@ -25,7 +25,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
25
25
|
"test/prefer-lowercase-title": "off"
|
|
26
26
|
}
|
|
27
27
|
}, {
|
|
28
|
-
name: "
|
|
28
|
+
name: "nonitomo/sort",
|
|
29
29
|
rules: {
|
|
30
30
|
"perfectionist/sort-array-includes": ["error", {
|
|
31
31
|
order: "asc",
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nonitomo/eslint",
|
|
3
|
-
"license": "MIT",
|
|
4
3
|
"type": "module",
|
|
5
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
6
5
|
"description": "eslint config",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"eslint",
|
|
9
|
-
"formatter"
|
|
10
|
-
],
|
|
11
6
|
"author": {
|
|
12
7
|
"name": "NoniTomo",
|
|
13
8
|
"url": "https://github.com/NoniTomo/hub"
|
|
14
9
|
},
|
|
10
|
+
"license": "MIT",
|
|
15
11
|
"repository": {
|
|
16
12
|
"url": "https://github.com/NoniTomo/hub"
|
|
17
13
|
},
|
|
18
14
|
"bugs": {
|
|
19
15
|
"url": "https://github.com/NoniTomo/hub/issues"
|
|
20
16
|
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"eslint",
|
|
19
|
+
"formatter"
|
|
20
|
+
],
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
23
|
"import": {
|
|
@@ -39,25 +39,25 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"
|
|
43
|
-
"oxfmt": "^0.78.0",
|
|
42
|
+
"dependencies": {
|
|
44
43
|
"@antfu/eslint-config": "10.0.0",
|
|
45
44
|
"@eslint-react/eslint-plugin": "5.28.8",
|
|
45
|
+
"@vue/compiler-sfc": "3.5.45",
|
|
46
46
|
"eslint": "10.14.0",
|
|
47
|
-
"eslint-flat-config-utils": "3.2.0"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
47
|
+
"eslint-flat-config-utils": "3.2.0",
|
|
50
48
|
"oxfmt": "^0.78.0"
|
|
51
49
|
},
|
|
52
50
|
"devDependencies": {
|
|
53
|
-
"@nonitomo/
|
|
51
|
+
"@nonitomo/eslint": "0.0.2",
|
|
52
|
+
"@nonitomo/oxfmt": "0.0.2",
|
|
53
|
+
"@nonitomo/tsconfig": "0.0.2"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "tsdown",
|
|
57
57
|
"lint": "eslint . --fix",
|
|
58
58
|
"lint-inspector": "npx @eslint/config-inspector",
|
|
59
59
|
"type": "tsc --noEmit",
|
|
60
|
-
"format": "
|
|
60
|
+
"format": "oxfmt",
|
|
61
61
|
"pretty": "pnpm type && pnpm lint && pnpm format"
|
|
62
62
|
}
|
|
63
63
|
}
|