diff --git a/dist/cli.cjs b/dist/cli.cjs index 1cff0cc..106f720 100644 --- a/dist/cli.cjs +++ b/dist/cli.cjs @@ -48,7 +48,7 @@ var import_picocolors = __toESM(require("picocolors"), 1); var package_default = { name: "@jiangweiye/eslint-config", type: "module", - version: "0.1.5-beta.2", + version: "0.1.5-beta.3", description: "A eslint config for jiangweiye", author: "jiangweiye (https://github.com/jwyGithub)", license: "SEE LICENSE IN LICENSE.md", @@ -188,7 +188,7 @@ var package_default = { "@eslint-react/eslint-plugin": "^1.5.13", "@eslint/config-inspector": "^0.4.8", "@jiangweiye/eslint-config": "workspace:*", - "@jiangweiye/prettier-config": "^0.0.11", + "@jiangweiye/prettier-config": "^0.0.14", "@prettier/plugin-xml": "^3.4.1", "@stylistic/eslint-plugin-migrate": "^2.1.0", "@types/eslint": "^8.56.10", diff --git a/dist/cli.js b/dist/cli.js index 98f2897..812e8fb 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -19,7 +19,7 @@ import c from "picocolors"; var package_default = { name: "@jiangweiye/eslint-config", type: "module", - version: "0.1.5-beta.2", + version: "0.1.5-beta.3", description: "A eslint config for jiangweiye", author: "jiangweiye (https://github.com/jwyGithub)", license: "SEE LICENSE IN LICENSE.md", @@ -159,7 +159,7 @@ var package_default = { "@eslint-react/eslint-plugin": "^1.5.13", "@eslint/config-inspector": "^0.4.8", "@jiangweiye/eslint-config": "workspace:*", - "@jiangweiye/prettier-config": "^0.0.11", + "@jiangweiye/prettier-config": "^0.0.14", "@prettier/plugin-xml": "^3.4.1", "@stylistic/eslint-plugin-migrate": "^2.1.0", "@types/eslint": "^8.56.10", diff --git a/dist/index.cjs b/dist/index.cjs index dc39c0a..fc2b1cd 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -5,6 +5,12 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); @@ -27,6 +33,63 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +// node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js +var init_cjs_shims = __esm({ + "node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js"() { + "use strict"; + } +}); + +// node_modules/.pnpm/@jiangweiye+prettier-config@0.0.14/node_modules/@jiangweiye/prettier-config/dist/src/options.cjs +var require_options = __commonJS({ + "node_modules/.pnpm/@jiangweiye+prettier-config@0.0.14/node_modules/@jiangweiye/prettier-config/dist/src/options.cjs"(exports2, module2) { + "use strict"; + init_cjs_shims(); + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var options_exports = {}; + __export2(options_exports, { + DEFAULT_OPTIONS: () => DEFAULT_OPTIONS3 + }); + module2.exports = __toCommonJS2(options_exports); + var DEFAULT_OPTIONS3 = { + printWidth: 140, + tabWidth: 4, + useTabs: false, + semi: true, + singleQuote: true, + quoteProps: "as-needed", + jsxSingleQuote: true, + trailingComma: "none", + bracketSpacing: true, + bracketSameLine: false, + arrowParens: "avoid", + insertPragma: false, + proseWrap: "never", + htmlWhitespaceSensitivity: "strict", + vueIndentScriptAndStyle: false, + endOfLine: "lf", + embeddedLanguageFormatting: "auto", + singleAttributePerLine: false + }; + } +}); + // src/index.ts var src_exports = {}; __export(src_exports, { @@ -100,14 +163,23 @@ __export(src_exports, { yaml: () => yaml }); module.exports = __toCommonJS(src_exports); +init_cjs_shims(); // src/factory.ts +init_cjs_shims(); var import_node_process3 = __toESM(require("process"), 1); var import_node_fs = __toESM(require("fs"), 1); var import_local_pkg4 = require("local-pkg"); var import_eslint_flat_config_utils = require("eslint-flat-config-utils"); +// src/configs/index.ts +init_cjs_shims(); + +// src/configs/astro.ts +init_cjs_shims(); + // src/globs.ts +init_cjs_shims(); var GLOB_SRC_EXT = "?([cm])[jt]s?(x)"; var GLOB_SRC = "**/*.?([cm])[jt]s?(x)"; var GLOB_JS = "**/*.?([cm])js"; @@ -185,6 +257,7 @@ var GLOB_EXCLUDE = [ ]; // src/utils.ts +init_cjs_shims(); var import_node_process = __toESM(require("process"), 1); var import_local_pkg = require("local-pkg"); var parserPlain = { @@ -301,6 +374,7 @@ async function astro(options = {}) { } // src/configs/command.ts +init_cjs_shims(); var import_config = __toESM(require("eslint-plugin-command/config"), 1); async function command() { return [ @@ -311,7 +385,11 @@ async function command() { ]; } +// src/configs/comments.ts +init_cjs_shims(); + // src/plugins.ts +init_cjs_shims(); var import_eslint_plugin_eslint_comments = __toESM(require("eslint-plugin-eslint-comments"), 1); var pluginImport = __toESM(require("eslint-plugin-import-x"), 1); var import_eslint_plugin_n = __toESM(require("eslint-plugin-n"), 1); @@ -338,36 +416,18 @@ async function comments() { } // src/configs/formatters.ts +init_cjs_shims(); var import_local_pkg2 = require("local-pkg"); - -// node_modules/.pnpm/@jiangweiye+prettier-config@0.0.11/node_modules/@jiangweiye/prettier-config/dist/src/options.esm.js -var DEFAULT_OPTIONS = { - printWidth: 140, - tabWidth: 4, - useTabs: false, - semi: true, - singleQuote: true, - quoteProps: "as-needed", - jsxSingleQuote: true, - trailingComma: "none", - bracketSpacing: true, - bracketSameLine: false, - arrowParens: "avoid", - insertPragma: false, - proseWrap: "never", - htmlWhitespaceSensitivity: "strict", - vueIndentScriptAndStyle: false, - endOfLine: "lf", - embeddedLanguageFormatting: "auto", - singleAttributePerLine: false -}; +var import_options2 = __toESM(require_options(), 1); // src/configs/stylistic.ts +init_cjs_shims(); +var import_options = __toESM(require_options(), 1); var StylisticConfigDefaults = { - indent: DEFAULT_OPTIONS.tabWidth, + indent: import_options.DEFAULT_OPTIONS.tabWidth, jsx: true, quotes: "single", - semi: DEFAULT_OPTIONS.semi + semi: import_options.DEFAULT_OPTIONS.semi }; async function stylistic(options = {}) { const { @@ -440,13 +500,13 @@ async function formatters(options = {}, stylistic2 = {}) { }; const prettierOptions = Object.assign( { - ...DEFAULT_OPTIONS, - endOfLine: DEFAULT_OPTIONS.endOfLine, + ...import_options2.DEFAULT_OPTIONS, + endOfLine: import_options2.DEFAULT_OPTIONS.endOfLine, semi, - singleQuote: DEFAULT_OPTIONS.singleQuote, + singleQuote: import_options2.DEFAULT_OPTIONS.singleQuote, tabWidth: typeof indent === "number" ? indent : 4, - trailingComma: DEFAULT_OPTIONS.trailingComma, - useTabs: DEFAULT_OPTIONS.useTabs + trailingComma: import_options2.DEFAULT_OPTIONS.trailingComma, + useTabs: import_options2.DEFAULT_OPTIONS.useTabs }, options.prettierOptions || {} ); @@ -577,7 +637,7 @@ async function formatters(options = {}, stylistic2 = {}) { [`format/${formater}`]: [ "error", formater === "prettier" ? { - printWidth: DEFAULT_OPTIONS.printWidth, + printWidth: import_options2.DEFAULT_OPTIONS.printWidth, ...prettierOptions, embeddedLanguageFormatting: "off", parser: "markdown" @@ -599,7 +659,7 @@ async function formatters(options = {}, stylistic2 = {}) { "format/prettier": [ "error", { - printWidth: DEFAULT_OPTIONS.printWidth, + printWidth: import_options2.DEFAULT_OPTIONS.printWidth, ...prettierOptions, embeddedLanguageFormatting: "off", parser: "slidev", @@ -651,6 +711,7 @@ async function formatters(options = {}, stylistic2 = {}) { } // src/configs/ignores.ts +init_cjs_shims(); async function ignores() { return [ { @@ -662,6 +723,7 @@ async function ignores() { } // src/configs/imports.ts +init_cjs_shims(); async function imports(options = {}) { const { stylistic: stylistic2 = true } = options; return [ @@ -699,6 +761,7 @@ async function imports(options = {}) { } // src/configs/javascript.ts +init_cjs_shims(); var import_globals = __toESM(require("globals"), 1); async function javascript(options = {}) { const { isInEditor = false, overrides = {} } = options; @@ -938,6 +1001,7 @@ async function javascript(options = {}) { } // src/configs/jsdoc.ts +init_cjs_shims(); async function jsdoc(options = {}) { const { stylistic: stylistic2 = true } = options; return [ @@ -972,6 +1036,7 @@ async function jsdoc(options = {}) { } // src/configs/jsonc.ts +init_cjs_shims(); async function jsonc(options = {}) { const { files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC], overrides = {}, stylistic: stylistic2 = true } = options; const { indent = 4 } = typeof stylistic2 === "boolean" ? {} : stylistic2; @@ -1038,6 +1103,7 @@ async function jsonc(options = {}) { } // src/configs/markdown.ts +init_cjs_shims(); var import_eslint_merge_processors = require("eslint-merge-processors"); async function markdown(options = {}) { const { componentExts = [], files = [GLOB_MARKDOWN], overrides = {} } = options; @@ -1125,6 +1191,7 @@ async function markdown(options = {}) { } // src/configs/node.ts +init_cjs_shims(); async function node() { return [ { @@ -1147,6 +1214,7 @@ async function node() { } // src/configs/perfectionist.ts +init_cjs_shims(); async function perfectionist() { return [ { @@ -1159,6 +1227,7 @@ async function perfectionist() { } // src/configs/react.ts +init_cjs_shims(); var import_local_pkg3 = require("local-pkg"); var ReactRefreshAllowConstantExportPackages = ["vite"]; var RemixPackages = ["@remix-run/node", "@remix-run/react", "@remix-run/serve", "@remix-run/dev"]; @@ -1278,6 +1347,7 @@ async function react(options = {}) { } // src/configs/solid.ts +init_cjs_shims(); async function solid(options = {}) { const { files = [GLOB_JSX, GLOB_TSX], overrides = {}, typescript: typescript2 = true } = options; await ensurePackages(["eslint-plugin-solid"]); @@ -1348,6 +1418,7 @@ async function solid(options = {}) { } // src/configs/sort.ts +init_cjs_shims(); async function sortPackageJson() { return [ { @@ -1564,6 +1635,7 @@ function sortTsconfig() { } // src/configs/svelte.ts +init_cjs_shims(); async function svelte(options = {}) { const { files = [GLOB_SVELTE], overrides = {}, stylistic: stylistic2 = true } = options; const { indent = 4, quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2; @@ -1655,6 +1727,7 @@ async function svelte(options = {}) { } // src/configs/test.ts +init_cjs_shims(); var _pluginTest; async function test(options = {}) { const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options; @@ -1696,6 +1769,7 @@ async function test(options = {}) { } // src/configs/toml.ts +init_cjs_shims(); async function toml(options = {}) { const { files = [GLOB_TOML], overrides = {}, stylistic: stylistic2 = true } = options; const { indent = 4 } = typeof stylistic2 === "boolean" ? {} : stylistic2; @@ -1746,6 +1820,7 @@ async function toml(options = {}) { } // src/configs/typescript.ts +init_cjs_shims(); var import_node_process2 = __toESM(require("process"), 1); async function typescript(options = {}) { const { componentExts = [], overrides = {}, parserOptions = {} } = options; @@ -1885,6 +1960,7 @@ async function typescript(options = {}) { } // src/configs/unicorn.ts +init_cjs_shims(); async function unicorn() { return [ { @@ -1925,6 +2001,7 @@ async function unicorn() { } // src/configs/unocss.ts +init_cjs_shims(); async function unocss(options = {}) { const { attributify = true, strict = false } = options; await ensurePackages(["@unocss/eslint-plugin"]); @@ -1949,6 +2026,7 @@ async function unocss(options = {}) { } // src/configs/vue.ts +init_cjs_shims(); var import_eslint_merge_processors2 = require("eslint-merge-processors"); async function vue(options = {}) { const { files = [GLOB_VUE], overrides = {}, stylistic: stylistic2 = true, vueVersion = 3 } = options; @@ -2113,6 +2191,7 @@ async function vue(options = {}) { } // src/configs/yaml.ts +init_cjs_shims(); async function yaml(options = {}) { const { files = [GLOB_YAML], overrides = {}, stylistic: stylistic2 = true } = options; const { quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2; @@ -2162,6 +2241,7 @@ async function yaml(options = {}) { } // src/configs/regexp.ts +init_cjs_shims(); var import_eslint_plugin_regexp = require("eslint-plugin-regexp"); async function regexp(options = {}) { const config = import_eslint_plugin_regexp.configs["flat/recommended"]; @@ -2397,6 +2477,9 @@ function getOverrides(options, key) { }; } +// src/types.ts +init_cjs_shims(); + // src/index.ts var src_default = eslint; // Annotate the CommonJS export names for ESM import in node: diff --git a/dist/index.js b/dist/index.js index 6d0cac1..934d6c8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,10 +1,107 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js +var init_esm_shims = __esm({ + "node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js"() { + "use strict"; + } +}); + +// node_modules/.pnpm/@jiangweiye+prettier-config@0.0.14/node_modules/@jiangweiye/prettier-config/dist/src/options.cjs +var require_options = __commonJS({ + "node_modules/.pnpm/@jiangweiye+prettier-config@0.0.14/node_modules/@jiangweiye/prettier-config/dist/src/options.cjs"(exports, module) { + "use strict"; + init_esm_shims(); + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var options_exports = {}; + __export(options_exports, { + DEFAULT_OPTIONS: () => DEFAULT_OPTIONS3 + }); + module.exports = __toCommonJS(options_exports); + var DEFAULT_OPTIONS3 = { + printWidth: 140, + tabWidth: 4, + useTabs: false, + semi: true, + singleQuote: true, + quoteProps: "as-needed", + jsxSingleQuote: true, + trailingComma: "none", + bracketSpacing: true, + bracketSameLine: false, + arrowParens: "avoid", + insertPragma: false, + proseWrap: "never", + htmlWhitespaceSensitivity: "strict", + vueIndentScriptAndStyle: false, + endOfLine: "lf", + embeddedLanguageFormatting: "auto", + singleAttributePerLine: false + }; + } +}); + +// src/index.ts +init_esm_shims(); + // src/factory.ts +init_esm_shims(); import process3 from "node:process"; import fs from "node:fs"; import { isPackageExists as isPackageExists4 } from "local-pkg"; import { FlatConfigComposer } from "eslint-flat-config-utils"; +// src/configs/index.ts +init_esm_shims(); + +// src/configs/astro.ts +init_esm_shims(); + // src/globs.ts +init_esm_shims(); var GLOB_SRC_EXT = "?([cm])[jt]s?(x)"; var GLOB_SRC = "**/*.?([cm])[jt]s?(x)"; var GLOB_JS = "**/*.?([cm])js"; @@ -82,6 +179,7 @@ var GLOB_EXCLUDE = [ ]; // src/utils.ts +init_esm_shims(); import process from "node:process"; import { isPackageExists } from "local-pkg"; var parserPlain = { @@ -198,6 +296,7 @@ async function astro(options = {}) { } // src/configs/command.ts +init_esm_shims(); import createCommand from "eslint-plugin-command/config"; async function command() { return [ @@ -208,7 +307,11 @@ async function command() { ]; } +// src/configs/comments.ts +init_esm_shims(); + // src/plugins.ts +init_esm_shims(); import { default as default2 } from "eslint-plugin-eslint-comments"; import * as pluginImport from "eslint-plugin-import-x"; import { default as default3 } from "eslint-plugin-n"; @@ -235,36 +338,18 @@ async function comments() { } // src/configs/formatters.ts +init_esm_shims(); +var import_options2 = __toESM(require_options(), 1); import { isPackageExists as isPackageExists2 } from "local-pkg"; -// node_modules/.pnpm/@jiangweiye+prettier-config@0.0.11/node_modules/@jiangweiye/prettier-config/dist/src/options.esm.js -var DEFAULT_OPTIONS = { - printWidth: 140, - tabWidth: 4, - useTabs: false, - semi: true, - singleQuote: true, - quoteProps: "as-needed", - jsxSingleQuote: true, - trailingComma: "none", - bracketSpacing: true, - bracketSameLine: false, - arrowParens: "avoid", - insertPragma: false, - proseWrap: "never", - htmlWhitespaceSensitivity: "strict", - vueIndentScriptAndStyle: false, - endOfLine: "lf", - embeddedLanguageFormatting: "auto", - singleAttributePerLine: false -}; - // src/configs/stylistic.ts +init_esm_shims(); +var import_options = __toESM(require_options(), 1); var StylisticConfigDefaults = { - indent: DEFAULT_OPTIONS.tabWidth, + indent: import_options.DEFAULT_OPTIONS.tabWidth, jsx: true, quotes: "single", - semi: DEFAULT_OPTIONS.semi + semi: import_options.DEFAULT_OPTIONS.semi }; async function stylistic(options = {}) { const { @@ -337,13 +422,13 @@ async function formatters(options = {}, stylistic2 = {}) { }; const prettierOptions = Object.assign( { - ...DEFAULT_OPTIONS, - endOfLine: DEFAULT_OPTIONS.endOfLine, + ...import_options2.DEFAULT_OPTIONS, + endOfLine: import_options2.DEFAULT_OPTIONS.endOfLine, semi, - singleQuote: DEFAULT_OPTIONS.singleQuote, + singleQuote: import_options2.DEFAULT_OPTIONS.singleQuote, tabWidth: typeof indent === "number" ? indent : 4, - trailingComma: DEFAULT_OPTIONS.trailingComma, - useTabs: DEFAULT_OPTIONS.useTabs + trailingComma: import_options2.DEFAULT_OPTIONS.trailingComma, + useTabs: import_options2.DEFAULT_OPTIONS.useTabs }, options.prettierOptions || {} ); @@ -474,7 +559,7 @@ async function formatters(options = {}, stylistic2 = {}) { [`format/${formater}`]: [ "error", formater === "prettier" ? { - printWidth: DEFAULT_OPTIONS.printWidth, + printWidth: import_options2.DEFAULT_OPTIONS.printWidth, ...prettierOptions, embeddedLanguageFormatting: "off", parser: "markdown" @@ -496,7 +581,7 @@ async function formatters(options = {}, stylistic2 = {}) { "format/prettier": [ "error", { - printWidth: DEFAULT_OPTIONS.printWidth, + printWidth: import_options2.DEFAULT_OPTIONS.printWidth, ...prettierOptions, embeddedLanguageFormatting: "off", parser: "slidev", @@ -548,6 +633,7 @@ async function formatters(options = {}, stylistic2 = {}) { } // src/configs/ignores.ts +init_esm_shims(); async function ignores() { return [ { @@ -559,6 +645,7 @@ async function ignores() { } // src/configs/imports.ts +init_esm_shims(); async function imports(options = {}) { const { stylistic: stylistic2 = true } = options; return [ @@ -596,6 +683,7 @@ async function imports(options = {}) { } // src/configs/javascript.ts +init_esm_shims(); import globals from "globals"; async function javascript(options = {}) { const { isInEditor = false, overrides = {} } = options; @@ -835,6 +923,7 @@ async function javascript(options = {}) { } // src/configs/jsdoc.ts +init_esm_shims(); async function jsdoc(options = {}) { const { stylistic: stylistic2 = true } = options; return [ @@ -869,6 +958,7 @@ async function jsdoc(options = {}) { } // src/configs/jsonc.ts +init_esm_shims(); async function jsonc(options = {}) { const { files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC], overrides = {}, stylistic: stylistic2 = true } = options; const { indent = 4 } = typeof stylistic2 === "boolean" ? {} : stylistic2; @@ -935,6 +1025,7 @@ async function jsonc(options = {}) { } // src/configs/markdown.ts +init_esm_shims(); import { mergeProcessors, processorPassThrough } from "eslint-merge-processors"; async function markdown(options = {}) { const { componentExts = [], files = [GLOB_MARKDOWN], overrides = {} } = options; @@ -1022,6 +1113,7 @@ async function markdown(options = {}) { } // src/configs/node.ts +init_esm_shims(); async function node() { return [ { @@ -1044,6 +1136,7 @@ async function node() { } // src/configs/perfectionist.ts +init_esm_shims(); async function perfectionist() { return [ { @@ -1056,6 +1149,7 @@ async function perfectionist() { } // src/configs/react.ts +init_esm_shims(); import { isPackageExists as isPackageExists3 } from "local-pkg"; var ReactRefreshAllowConstantExportPackages = ["vite"]; var RemixPackages = ["@remix-run/node", "@remix-run/react", "@remix-run/serve", "@remix-run/dev"]; @@ -1175,6 +1269,7 @@ async function react(options = {}) { } // src/configs/solid.ts +init_esm_shims(); async function solid(options = {}) { const { files = [GLOB_JSX, GLOB_TSX], overrides = {}, typescript: typescript2 = true } = options; await ensurePackages(["eslint-plugin-solid"]); @@ -1245,6 +1340,7 @@ async function solid(options = {}) { } // src/configs/sort.ts +init_esm_shims(); async function sortPackageJson() { return [ { @@ -1461,6 +1557,7 @@ function sortTsconfig() { } // src/configs/svelte.ts +init_esm_shims(); async function svelte(options = {}) { const { files = [GLOB_SVELTE], overrides = {}, stylistic: stylistic2 = true } = options; const { indent = 4, quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2; @@ -1552,6 +1649,7 @@ async function svelte(options = {}) { } // src/configs/test.ts +init_esm_shims(); var _pluginTest; async function test(options = {}) { const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options; @@ -1593,6 +1691,7 @@ async function test(options = {}) { } // src/configs/toml.ts +init_esm_shims(); async function toml(options = {}) { const { files = [GLOB_TOML], overrides = {}, stylistic: stylistic2 = true } = options; const { indent = 4 } = typeof stylistic2 === "boolean" ? {} : stylistic2; @@ -1643,6 +1742,7 @@ async function toml(options = {}) { } // src/configs/typescript.ts +init_esm_shims(); import process2 from "node:process"; async function typescript(options = {}) { const { componentExts = [], overrides = {}, parserOptions = {} } = options; @@ -1782,6 +1882,7 @@ async function typescript(options = {}) { } // src/configs/unicorn.ts +init_esm_shims(); async function unicorn() { return [ { @@ -1822,6 +1923,7 @@ async function unicorn() { } // src/configs/unocss.ts +init_esm_shims(); async function unocss(options = {}) { const { attributify = true, strict = false } = options; await ensurePackages(["@unocss/eslint-plugin"]); @@ -1846,6 +1948,7 @@ async function unocss(options = {}) { } // src/configs/vue.ts +init_esm_shims(); import { mergeProcessors as mergeProcessors2 } from "eslint-merge-processors"; async function vue(options = {}) { const { files = [GLOB_VUE], overrides = {}, stylistic: stylistic2 = true, vueVersion = 3 } = options; @@ -2010,6 +2113,7 @@ async function vue(options = {}) { } // src/configs/yaml.ts +init_esm_shims(); async function yaml(options = {}) { const { files = [GLOB_YAML], overrides = {}, stylistic: stylistic2 = true } = options; const { quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2; @@ -2059,6 +2163,7 @@ async function yaml(options = {}) { } // src/configs/regexp.ts +init_esm_shims(); import { configs } from "eslint-plugin-regexp"; async function regexp(options = {}) { const config = configs["flat/recommended"]; @@ -2294,6 +2399,9 @@ function getOverrides(options, key) { }; } +// src/types.ts +init_esm_shims(); + // src/index.ts var src_default = eslint; export { diff --git a/package.json b/package.json index 4882ac1..4887b96 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@jiangweiye/eslint-config", "type": "module", - "version": "0.1.5-beta.2", + "version": "0.1.5-beta.3", "description": "A eslint config for jiangweiye", "author": "jiangweiye (https://github.com/jwyGithub)", "license": "SEE LICENSE IN LICENSE.md", @@ -141,7 +141,7 @@ "@eslint-react/eslint-plugin": "^1.5.13", "@eslint/config-inspector": "^0.4.8", "@jiangweiye/eslint-config": "workspace:*", - "@jiangweiye/prettier-config": "^0.0.11", + "@jiangweiye/prettier-config": "^0.0.14", "@prettier/plugin-xml": "^3.4.1", "@stylistic/eslint-plugin-migrate": "^2.1.0", "@types/eslint": "^8.56.10", @@ -177,3 +177,4 @@ "vue": "^3.4.27" } } + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c88fd31..5a5dbd6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -121,8 +121,8 @@ importers: specifier: workspace:* version: 'link:' '@jiangweiye/prettier-config': - specifier: ^0.0.11 - version: 0.0.11 + specifier: ^0.0.14 + version: 0.0.14 '@prettier/plugin-xml': specifier: ^3.4.1 version: 3.4.1(prettier@3.2.5) @@ -298,7 +298,6 @@ packages: dependencies: picocolors: 1.0.1 sisteransi: 1.0.5 - dev: false /@clack/prompts@0.7.0: resolution: {integrity: sha512-0MhX9/B4iL6Re04jPrttDm+BsP8y6mS7byuv0BvXgdXhbV5PdlsHt55dvNsuBCPZ7xq1oTAOOuotR9NFbQyMSA==} @@ -306,7 +305,6 @@ packages: '@clack/core': 0.3.4 picocolors: 1.0.1 sisteransi: 1.0.5 - dev: false bundledDependencies: - is-unicode-supported @@ -1168,8 +1166,13 @@ packages: '@jsdevtools/ez-spawn': 3.0.4 dev: false - /@jiangweiye/prettier-config@0.0.11: - resolution: {integrity: sha512-C2GEJ86Rs/VpFoGm2Cbb5dd+sD7iYo/HxSiqyVyQ66IaLM0Dcskfi/gvi2NC74QLCdNAmyzU4PdAlTcS0nON3A==} + /@jiangweiye/prettier-config@0.0.14: + resolution: {integrity: sha512-AjfihdEqO2+mbaCsnwhLwWZMKKQ4RlKNBG6i+AjZgDL1uGDCETIU1STnIsN1eOjSn6D0XrU6SWTG9SQJQjBlrw==} + hasBin: true + dependencies: + '@clack/prompts': 0.7.0 + picocolors: 1.0.1 + yargs: 17.7.2 optionalDependencies: prettier: 3.2.5 dev: true @@ -2133,7 +2136,6 @@ packages: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - dev: false /code-red@1.0.4: resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} @@ -3306,7 +3308,6 @@ packages: /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - dev: false /get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} @@ -4418,7 +4419,6 @@ packages: /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - dev: false /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} @@ -5215,7 +5215,6 @@ packages: /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - dev: false /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} @@ -5243,7 +5242,6 @@ packages: /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} - dev: false /yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} @@ -5256,7 +5254,6 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 21.1.1 - dev: false /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} diff --git a/prettier.config.js b/prettier.config.mjs similarity index 100% rename from prettier.config.js rename to prettier.config.mjs