@siberiacancode/eslint 2.16.5 → 2.16.6
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 -2
- package/dist/cjs/index.d.cts +2 -2
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +3 -2
- package/package.json +3 -3
package/dist/cjs/index.cjs
CHANGED
|
@@ -269,12 +269,13 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
269
269
|
files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"],
|
|
270
270
|
languageOptions: { parserOptions: { projectService: true } },
|
|
271
271
|
rules: {
|
|
272
|
+
...options.react && { "react/no-leaked-conditional-rendering": "error" },
|
|
272
273
|
"ts/promise-function-async": "off",
|
|
273
274
|
"ts/strict-boolean-expressions": "off",
|
|
274
275
|
"ts/no-unnecessary-condition": "error",
|
|
275
276
|
"ts/no-namespace": "off",
|
|
276
277
|
"ts/no-floating-promises": "off",
|
|
277
|
-
"ts/no-misused-promises": "
|
|
278
|
+
"ts/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
278
279
|
"ts/no-empty-object-type": "warn"
|
|
279
280
|
}
|
|
280
281
|
});
|
|
@@ -365,7 +366,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
365
366
|
return (0, _antfu_eslint_config.default)({
|
|
366
367
|
...options,
|
|
367
368
|
stylistic,
|
|
368
|
-
...typescript === "engine" ? { typescript: { tsconfigPath: "./tsconfig.json" } } : typescript
|
|
369
|
+
...typescript === "engine" ? { typescript: { tsconfigPath: "./tsconfig.json" } } : { typescript }
|
|
369
370
|
}, {
|
|
370
371
|
name: "siberiacancode/rewrite",
|
|
371
372
|
rules: {
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Awaitable, ConfigNames, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
1
|
+
import { Awaitable, ConfigNames, OptionsConfig, OptionsTypescript, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
3
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ type EslintOptions = OptionsConfig & TypedFlatConfigItem & {
|
|
|
7
7
|
jsxA11y?: boolean;
|
|
8
8
|
playwright?: boolean;
|
|
9
9
|
tailwind?: boolean;
|
|
10
|
-
typescript?: 'engine';
|
|
10
|
+
typescript?: boolean | 'engine' | OptionsTypescript;
|
|
11
11
|
};
|
|
12
12
|
type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
13
13
|
declare const eslint: Eslint;
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Awaitable, ConfigNames, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
1
|
+
import { Awaitable, ConfigNames, OptionsConfig, OptionsTypescript, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
3
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ type EslintOptions = OptionsConfig & TypedFlatConfigItem & {
|
|
|
7
7
|
jsxA11y?: boolean;
|
|
8
8
|
playwright?: boolean;
|
|
9
9
|
tailwind?: boolean;
|
|
10
|
-
typescript?: 'engine';
|
|
10
|
+
typescript?: boolean | 'engine' | OptionsTypescript;
|
|
11
11
|
};
|
|
12
12
|
type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
13
13
|
declare const eslint: Eslint;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -236,12 +236,13 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
236
236
|
files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"],
|
|
237
237
|
languageOptions: { parserOptions: { projectService: true } },
|
|
238
238
|
rules: {
|
|
239
|
+
...options.react && { "react/no-leaked-conditional-rendering": "error" },
|
|
239
240
|
"ts/promise-function-async": "off",
|
|
240
241
|
"ts/strict-boolean-expressions": "off",
|
|
241
242
|
"ts/no-unnecessary-condition": "error",
|
|
242
243
|
"ts/no-namespace": "off",
|
|
243
244
|
"ts/no-floating-promises": "off",
|
|
244
|
-
"ts/no-misused-promises": "
|
|
245
|
+
"ts/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
245
246
|
"ts/no-empty-object-type": "warn"
|
|
246
247
|
}
|
|
247
248
|
});
|
|
@@ -332,7 +333,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
332
333
|
return antfu({
|
|
333
334
|
...options,
|
|
334
335
|
stylistic,
|
|
335
|
-
...typescript === "engine" ? { typescript: { tsconfigPath: "./tsconfig.json" } } : typescript
|
|
336
|
+
...typescript === "engine" ? { typescript: { tsconfigPath: "./tsconfig.json" } } : { typescript }
|
|
336
337
|
}, {
|
|
337
338
|
name: "siberiacancode/rewrite",
|
|
338
339
|
rules: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siberiacancode/eslint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.16.
|
|
4
|
+
"version": "2.16.6",
|
|
5
5
|
"description": "eslint configs",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "SIBERIA CAN CODE 🧊",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"dist"
|
|
46
46
|
],
|
|
47
47
|
"scripts": {
|
|
48
|
-
"prepublishOnly": "
|
|
48
|
+
"prepublishOnly": "pnpm type && pnpm build",
|
|
49
49
|
"build": "tsdown",
|
|
50
50
|
"lint": "eslint . --fix",
|
|
51
51
|
"lint-inspector": "npx @eslint/config-inspector",
|
|
52
52
|
"type": "tsc --noEmit",
|
|
53
53
|
"format": "prettier --write .",
|
|
54
|
-
"pretty": "
|
|
54
|
+
"pretty": "pnpm type && pnpm lint && pnpm format"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@antfu/eslint-config": "7.4.3",
|