@cany748/eslint-config 3.0.1 → 3.0.3
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/README.md +1 -1
- package/dist/index.cjs +10 -17
- package/dist/index.d.cts +339 -118
- package/dist/index.d.ts +339 -118
- package/dist/index.js +10 -17
- package/package.json +19 -19
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -84,17 +84,17 @@ __export(src_exports, {
|
|
|
84
84
|
module.exports = __toCommonJS(src_exports);
|
|
85
85
|
|
|
86
86
|
// src/configs/comments.ts
|
|
87
|
-
var import_eslint_plugin_eslint_comments = __toESM(require("eslint-plugin-eslint-comments"), 1);
|
|
87
|
+
var import_eslint_plugin_eslint_comments = __toESM(require("@eslint-community/eslint-plugin-eslint-comments"), 1);
|
|
88
88
|
function comments() {
|
|
89
89
|
return [
|
|
90
90
|
{
|
|
91
|
-
name: "eslint-comments",
|
|
91
|
+
name: "@eslint-community/eslint-comments",
|
|
92
92
|
plugins: {
|
|
93
|
-
"eslint-comments": import_eslint_plugin_eslint_comments.default
|
|
93
|
+
"@eslint-community/eslint-comments": import_eslint_plugin_eslint_comments.default
|
|
94
94
|
},
|
|
95
95
|
rules: {
|
|
96
96
|
...import_eslint_plugin_eslint_comments.default.configs.recommended.rules,
|
|
97
|
-
"eslint-comments/disable-enable-pair": "off"
|
|
97
|
+
"@eslint-community/eslint-comments/disable-enable-pair": "off"
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
];
|
|
@@ -418,7 +418,6 @@ function javascript(options = {}) {
|
|
|
418
418
|
"no-dupe-else-if": "error",
|
|
419
419
|
"no-dupe-keys": "error",
|
|
420
420
|
"no-duplicate-case": "error",
|
|
421
|
-
"no-duplicate-imports": "error",
|
|
422
421
|
"no-empty-character-class": "error",
|
|
423
422
|
"no-empty-pattern": "error",
|
|
424
423
|
"no-empty-static-block": "error",
|
|
@@ -467,14 +466,7 @@ function javascript(options = {}) {
|
|
|
467
466
|
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupGetter__" },
|
|
468
467
|
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupSetter__" }
|
|
469
468
|
],
|
|
470
|
-
"no-restricted-syntax": [
|
|
471
|
-
"error",
|
|
472
|
-
"DebuggerStatement",
|
|
473
|
-
"LabeledStatement",
|
|
474
|
-
"WithStatement",
|
|
475
|
-
"TSEnumDeclaration[const=true]",
|
|
476
|
-
"TSExportAssignment"
|
|
477
|
-
],
|
|
469
|
+
"no-restricted-syntax": ["error", "TSEnumDeclaration[const=true]", "TSExportAssignment"],
|
|
478
470
|
"no-return-assign": ["error", "except-parens"],
|
|
479
471
|
"no-self-assign": ["error", { props: true }],
|
|
480
472
|
"no-self-compare": "error",
|
|
@@ -873,7 +865,7 @@ var _pluginTest;
|
|
|
873
865
|
async function test(options = {}) {
|
|
874
866
|
const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
|
|
875
867
|
const [pluginVitest, pluginNoOnlyTests] = await Promise.all([
|
|
876
|
-
interopDefault(import("eslint-plugin
|
|
868
|
+
interopDefault(import("@vitest/eslint-plugin")),
|
|
877
869
|
interopDefault(import("eslint-plugin-no-only-tests"))
|
|
878
870
|
]);
|
|
879
871
|
_pluginTest = _pluginTest || {
|
|
@@ -906,7 +898,7 @@ async function test(options = {}) {
|
|
|
906
898
|
|
|
907
899
|
// src/configs/typescript.ts
|
|
908
900
|
async function typescript(options = {}) {
|
|
909
|
-
const { componentExts = [], overrides = {}, parserOptions = {}, type = "app" } = options;
|
|
901
|
+
const { componentExts = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, type = "app" } = options;
|
|
910
902
|
const files = options.files ?? [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)];
|
|
911
903
|
const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
|
|
912
904
|
const ignoresTypeAware = options.ignoresTypeAware ?? [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS];
|
|
@@ -947,7 +939,7 @@ async function typescript(options = {}) {
|
|
|
947
939
|
}
|
|
948
940
|
},
|
|
949
941
|
// assign type-aware parser for type-aware files and type-unaware parser for the rest
|
|
950
|
-
...isTypeAware ? [makeParser(
|
|
942
|
+
...isTypeAware ? [makeParser(false, files), makeParser(true, filesTypeAware, ignoresTypeAware)] : [makeParser(false, files)],
|
|
951
943
|
{
|
|
952
944
|
files,
|
|
953
945
|
name: "typescript/rules",
|
|
@@ -1011,7 +1003,7 @@ async function typescript(options = {}) {
|
|
|
1011
1003
|
"no-throw-literal": "off",
|
|
1012
1004
|
"@typescript-eslint/only-throw-error": "error"
|
|
1013
1005
|
} : {},
|
|
1014
|
-
...
|
|
1006
|
+
...overridesTypeAware
|
|
1015
1007
|
}
|
|
1016
1008
|
}
|
|
1017
1009
|
] : [],
|
|
@@ -1056,6 +1048,7 @@ function unicorn() {
|
|
|
1056
1048
|
...import_eslint_plugin_unicorn.default.configs["flat/recommended"].rules,
|
|
1057
1049
|
"unicorn/consistent-function-scoping": "off",
|
|
1058
1050
|
"unicorn/filename-case": "off",
|
|
1051
|
+
"unicorn/import-style": "off",
|
|
1059
1052
|
"unicorn/no-array-callback-reference": "off",
|
|
1060
1053
|
"unicorn/no-null": "off",
|
|
1061
1054
|
"unicorn/prefer-string-replace-all": "off",
|