@cany748/eslint-config 3.0.0 → 3.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/README.md +2 -2
- package/dist/index.cjs +9 -16
- package/dist/index.d.cts +172 -110
- package/dist/index.d.ts +172 -110
- package/dist/index.js +9 -16
- package/package.json +20 -21
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
|
];
|
|
@@ -467,14 +467,7 @@ function javascript(options = {}) {
|
|
|
467
467
|
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupGetter__" },
|
|
468
468
|
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupSetter__" }
|
|
469
469
|
],
|
|
470
|
-
"no-restricted-syntax": [
|
|
471
|
-
"error",
|
|
472
|
-
"DebuggerStatement",
|
|
473
|
-
"LabeledStatement",
|
|
474
|
-
"WithStatement",
|
|
475
|
-
"TSEnumDeclaration[const=true]",
|
|
476
|
-
"TSExportAssignment"
|
|
477
|
-
],
|
|
470
|
+
"no-restricted-syntax": ["error", "TSEnumDeclaration[const=true]", "TSExportAssignment"],
|
|
478
471
|
"no-return-assign": ["error", "except-parens"],
|
|
479
472
|
"no-self-assign": ["error", { props: true }],
|
|
480
473
|
"no-self-compare": "error",
|
|
@@ -873,7 +866,7 @@ var _pluginTest;
|
|
|
873
866
|
async function test(options = {}) {
|
|
874
867
|
const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
|
|
875
868
|
const [pluginVitest, pluginNoOnlyTests] = await Promise.all([
|
|
876
|
-
interopDefault(import("eslint-plugin
|
|
869
|
+
interopDefault(import("@vitest/eslint-plugin")),
|
|
877
870
|
interopDefault(import("eslint-plugin-no-only-tests"))
|
|
878
871
|
]);
|
|
879
872
|
_pluginTest = _pluginTest || {
|
|
@@ -906,7 +899,7 @@ async function test(options = {}) {
|
|
|
906
899
|
|
|
907
900
|
// src/configs/typescript.ts
|
|
908
901
|
async function typescript(options = {}) {
|
|
909
|
-
const { componentExts = [], overrides = {}, parserOptions = {}, type = "app" } = options;
|
|
902
|
+
const { componentExts = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, type = "app" } = options;
|
|
910
903
|
const files = options.files ?? [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)];
|
|
911
904
|
const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
|
|
912
905
|
const ignoresTypeAware = options.ignoresTypeAware ?? [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS];
|
|
@@ -947,7 +940,7 @@ async function typescript(options = {}) {
|
|
|
947
940
|
}
|
|
948
941
|
},
|
|
949
942
|
// assign type-aware parser for type-aware files and type-unaware parser for the rest
|
|
950
|
-
...isTypeAware ? [makeParser(
|
|
943
|
+
...isTypeAware ? [makeParser(false, files), makeParser(true, filesTypeAware, ignoresTypeAware)] : [makeParser(false, files)],
|
|
951
944
|
{
|
|
952
945
|
files,
|
|
953
946
|
name: "typescript/rules",
|
|
@@ -1011,7 +1004,7 @@ async function typescript(options = {}) {
|
|
|
1011
1004
|
"no-throw-literal": "off",
|
|
1012
1005
|
"@typescript-eslint/only-throw-error": "error"
|
|
1013
1006
|
} : {},
|
|
1014
|
-
...
|
|
1007
|
+
...overridesTypeAware
|
|
1015
1008
|
}
|
|
1016
1009
|
}
|
|
1017
1010
|
] : [],
|