@siberiacancode/eslint 2.16.1 → 2.16.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 +14 -11
- package/dist/esm/index.mjs +12 -10
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -34,10 +34,12 @@ let eslint_plugin_jsx_a11y = require("eslint-plugin-jsx-a11y");
|
|
|
34
34
|
eslint_plugin_jsx_a11y = __toESM(eslint_plugin_jsx_a11y);
|
|
35
35
|
let eslint_plugin_playwright = require("eslint-plugin-playwright");
|
|
36
36
|
eslint_plugin_playwright = __toESM(eslint_plugin_playwright);
|
|
37
|
-
let node_fs = require("node:fs");
|
|
38
|
-
node_fs = __toESM(node_fs);
|
|
39
37
|
let node_path = require("node:path");
|
|
40
38
|
node_path = __toESM(node_path);
|
|
39
|
+
let node_process = require("node:process");
|
|
40
|
+
node_process = __toESM(node_process);
|
|
41
|
+
let node_fs = require("node:fs");
|
|
42
|
+
node_fs = __toESM(node_fs);
|
|
41
43
|
|
|
42
44
|
//#region src/plugin/rules/function-component-definition.ts
|
|
43
45
|
const NAMED_TEMPLATES = {
|
|
@@ -467,14 +469,6 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
467
469
|
"style/semi": ["error", "always"]
|
|
468
470
|
}
|
|
469
471
|
});
|
|
470
|
-
configs.unshift({
|
|
471
|
-
name: "siberiacancode",
|
|
472
|
-
plugins: { siberiacancode: siberiacancodePlugin },
|
|
473
|
-
rules: {
|
|
474
|
-
"siberiacancode/function-component-definition": ["error", { namedComponents: ["arrow-function"] }],
|
|
475
|
-
"siberiacancode/no-unused-class": "error"
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
472
|
configs.unshift({
|
|
479
473
|
name: "siberiacancode/css",
|
|
480
474
|
plugins: { "siberiacancode-css": _eslint_css.default },
|
|
@@ -483,10 +477,18 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
483
477
|
return acc;
|
|
484
478
|
}, {}) }
|
|
485
479
|
});
|
|
480
|
+
configs.unshift({
|
|
481
|
+
name: "siberiacancode",
|
|
482
|
+
plugins: { siberiacancode: siberiacancodePlugin },
|
|
483
|
+
rules: {
|
|
484
|
+
"siberiacancode/function-component-definition": ["error", { namedComponents: ["arrow-function"] }],
|
|
485
|
+
"siberiacancode/no-unused-class": "error"
|
|
486
|
+
}
|
|
487
|
+
});
|
|
486
488
|
return (0, _antfu_eslint_config.default)({
|
|
487
489
|
...options,
|
|
488
490
|
stylistic,
|
|
489
|
-
...typescript === "engine" ? { typescript: { tsconfigPath: "
|
|
491
|
+
...typescript === "engine" ? { typescript: { tsconfigPath: node_path.default.resolve(node_process.default.cwd(), "tsconfig.json") } } : typescript
|
|
490
492
|
}, {
|
|
491
493
|
name: "siberiacancode/rewrite",
|
|
492
494
|
rules: {
|
|
@@ -494,6 +496,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
494
496
|
"antfu/if-newline": "off",
|
|
495
497
|
"antfu/top-level-function": "off",
|
|
496
498
|
"no-console": "warn",
|
|
499
|
+
"react/prefer-namespace-import": "off",
|
|
497
500
|
"react-hooks/exhaustive-deps": "off",
|
|
498
501
|
"test/prefer-lowercase-title": "off"
|
|
499
502
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2,8 +2,9 @@ import antfu from "@antfu/eslint-config";
|
|
|
2
2
|
import pluginCss from "@eslint/css";
|
|
3
3
|
import pluginJsxA11y from "eslint-plugin-jsx-a11y";
|
|
4
4
|
import pluginPlaywright from "eslint-plugin-playwright";
|
|
5
|
-
import fs from "node:fs";
|
|
6
5
|
import path from "node:path";
|
|
6
|
+
import process from "node:process";
|
|
7
|
+
import fs from "node:fs";
|
|
7
8
|
|
|
8
9
|
//#region src/plugin/rules/function-component-definition.ts
|
|
9
10
|
const NAMED_TEMPLATES = {
|
|
@@ -433,14 +434,6 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
433
434
|
"style/semi": ["error", "always"]
|
|
434
435
|
}
|
|
435
436
|
});
|
|
436
|
-
configs.unshift({
|
|
437
|
-
name: "siberiacancode",
|
|
438
|
-
plugins: { siberiacancode: siberiacancodePlugin },
|
|
439
|
-
rules: {
|
|
440
|
-
"siberiacancode/function-component-definition": ["error", { namedComponents: ["arrow-function"] }],
|
|
441
|
-
"siberiacancode/no-unused-class": "error"
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
437
|
configs.unshift({
|
|
445
438
|
name: "siberiacancode/css",
|
|
446
439
|
plugins: { "siberiacancode-css": pluginCss },
|
|
@@ -449,10 +442,18 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
449
442
|
return acc;
|
|
450
443
|
}, {}) }
|
|
451
444
|
});
|
|
445
|
+
configs.unshift({
|
|
446
|
+
name: "siberiacancode",
|
|
447
|
+
plugins: { siberiacancode: siberiacancodePlugin },
|
|
448
|
+
rules: {
|
|
449
|
+
"siberiacancode/function-component-definition": ["error", { namedComponents: ["arrow-function"] }],
|
|
450
|
+
"siberiacancode/no-unused-class": "error"
|
|
451
|
+
}
|
|
452
|
+
});
|
|
452
453
|
return antfu({
|
|
453
454
|
...options,
|
|
454
455
|
stylistic,
|
|
455
|
-
...typescript === "engine" ? { typescript: { tsconfigPath: "
|
|
456
|
+
...typescript === "engine" ? { typescript: { tsconfigPath: path.resolve(process.cwd(), "tsconfig.json") } } : typescript
|
|
456
457
|
}, {
|
|
457
458
|
name: "siberiacancode/rewrite",
|
|
458
459
|
rules: {
|
|
@@ -460,6 +461,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
460
461
|
"antfu/if-newline": "off",
|
|
461
462
|
"antfu/top-level-function": "off",
|
|
462
463
|
"no-console": "warn",
|
|
464
|
+
"react/prefer-namespace-import": "off",
|
|
463
465
|
"react-hooks/exhaustive-deps": "off",
|
|
464
466
|
"test/prefer-lowercase-title": "off"
|
|
465
467
|
}
|