@svifty7/eslint-config 0.0.2 → 0.0.4

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.
@@ -327,8 +327,7 @@ const parserPlain = {
327
327
  * Combine array and non-array configs into a single array.
328
328
  */
329
329
  async function combine(...configs$1) {
330
- const resolved = await Promise.all(configs$1);
331
- return resolved.flat();
330
+ return (await Promise.all(configs$1)).flat();
332
331
  }
333
332
  /**
334
333
  * Rename plugin prefixes in a rule object.
@@ -379,7 +378,9 @@ const StylisticConfigDefaults = {
379
378
  blockSpacing: true,
380
379
  quoteProps: "consistent-as-needed",
381
380
  commaDangle: "always-multiline",
382
- pluginName: "style"
381
+ pluginName: "style",
382
+ severity: "error",
383
+ experimental: false
383
384
  };
384
385
  async function stylistic(options = {}) {
385
386
  const stylisticConfig = {
@@ -544,7 +545,6 @@ function mergePrettierOptions(options, overrides = {}) {
544
545
  parser: config.parser,
545
546
  plugins: config.plugins,
546
547
  bracketSameLine: config.bracketSameLine,
547
- printWidth: config.printWidth,
548
548
  singleAttributePerLine: config.singleAttributePerLine,
549
549
  tabWidth: config.tabWidth,
550
550
  xmlQuoteAttributes: config.xmlQuoteAttributes,
@@ -564,7 +564,6 @@ async function formatters(stylistic$1 = {}) {
564
564
  singleQuote: quotes === "single",
565
565
  tabWidth: typeof indent === "number" ? indent : 2,
566
566
  useTabs: indent === "tab",
567
- printWidth: 80,
568
567
  quoteProps: "consistent",
569
568
  jsxSingleQuote: false,
570
569
  trailingComma: "all",
@@ -577,12 +576,10 @@ async function formatters(stylistic$1 = {}) {
577
576
  htmlWhitespaceSensitivity: "css",
578
577
  vueIndentScriptAndStyle: true,
579
578
  endOfLine: "lf",
580
- singleAttributePerLine: true,
581
- objectWrap: "preserve",
582
- experimentalTernaries: false,
583
- experimentalOperatorPosition: "start"
579
+ singleAttributePerLine: true
584
580
  };
585
581
  const pluginFormat = await interopDefault(import("eslint-plugin-format"));
582
+ const tailwindPluginPath = resolveModule("prettier-plugin-tailwindcss", { paths: [fileURLToPath(import.meta.url)] });
586
583
  const configs$1 = [{
587
584
  name: "svifty7/formatter/setup",
588
585
  plugins: { format: pluginFormat }
@@ -590,7 +587,7 @@ async function formatters(stylistic$1 = {}) {
590
587
  configs$1.push({
591
588
  files: [GLOB_SRC, GLOB_VUE],
592
589
  name: "svifty7/formatter/prettier",
593
- rules: { "format/prettier": ["error", prettierOptions] }
590
+ rules: { "format/prettier": ["error", tailwindPluginPath ? mergePrettierOptions(prettierOptions, { plugins: [tailwindPluginPath] }) : prettierOptions] }
594
591
  });
595
592
  configs$1.push({
596
593
  files: [GLOB_CSS, GLOB_POSTCSS],
@@ -612,7 +609,10 @@ async function formatters(stylistic$1 = {}) {
612
609
  files: [GLOB_HTML],
613
610
  languageOptions: { parser: parserPlain },
614
611
  name: "svifty7/formatter/html",
615
- rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "html" })] }
612
+ rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, {
613
+ parser: "html",
614
+ plugins: tailwindPluginPath ? [tailwindPluginPath] : void 0
615
+ })] }
616
616
  });
617
617
  configs$1.push({
618
618
  files: [GLOB_MARKDOWN],
@@ -1139,32 +1139,50 @@ function perfectionist() {
1139
1139
  rules: {
1140
1140
  "perfectionist/sort-exports": ["error", {
1141
1141
  order: "asc",
1142
- type: "natural"
1142
+ type: "natural",
1143
+ newlinesBetween: 1,
1144
+ groups: [
1145
+ "type-export",
1146
+ {
1147
+ group: "multiline-export",
1148
+ newlinesInside: 1
1149
+ },
1150
+ "singleline-export"
1151
+ ]
1143
1152
  }],
1144
1153
  "perfectionist/sort-imports": ["error", {
1145
1154
  groups: [
1146
1155
  "builtin",
1147
1156
  "external",
1148
- "type",
1149
1157
  "internal",
1158
+ "tsconfig-path",
1159
+ "subpath",
1150
1160
  "parent",
1151
1161
  "sibling",
1152
1162
  "index",
1153
- "side-effect",
1154
1163
  "unknown",
1164
+ "type-builtin",
1165
+ "type-external",
1166
+ [
1167
+ "type-internal",
1168
+ "type-tsconfig-path",
1169
+ "type-subpath"
1170
+ ],
1155
1171
  [
1156
- "parent-type",
1157
- "sibling-type",
1158
- "index-type",
1159
- "internal-type"
1172
+ "type-parent",
1173
+ "type-sibling",
1174
+ "type-index"
1160
1175
  ],
1161
- "object"
1176
+ "side-effect",
1177
+ "side-effect-style",
1178
+ "style"
1162
1179
  ],
1163
1180
  internalPattern: ["^~/.+", "^@/.+"],
1164
- newlinesBetween: "always",
1181
+ newlinesBetween: 1,
1165
1182
  order: "asc",
1166
1183
  type: "natural",
1167
- tsconfigRootDir: process.cwd()
1184
+ tsconfig: { rootDir: process.cwd() },
1185
+ fallbackSort: { type: "unsorted" }
1168
1186
  }],
1169
1187
  "perfectionist/sort-named-exports": ["error", {
1170
1188
  order: "asc",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@svifty7/eslint-config",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "description": "ESLint config by svifty7 based on @antfu/eslint-config",
6
6
  "author": "svifty7 (https://github.com/svifty7)",
7
7
  "license": "MIT",
@@ -44,56 +44,57 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
47
- "@eslint/markdown": "^6.4.0",
48
- "@prettier/plugin-xml": "^3.4.1",
49
- "@stylistic/eslint-plugin": "^4.2.0",
50
- "@typescript-eslint/eslint-plugin": "^8.32.1",
51
- "@typescript-eslint/parser": "^8.32.1",
52
- "@vitest/eslint-plugin": "^1.1.44",
47
+ "@eslint/markdown": "^7.5.1",
48
+ "@prettier/plugin-xml": "^3.4.2",
49
+ "@stylistic/eslint-plugin": "^5.6.1",
50
+ "@typescript-eslint/eslint-plugin": "^8.51.0",
51
+ "@typescript-eslint/parser": "^8.51.0",
52
+ "@vitest/eslint-plugin": "^1.6.4",
53
53
  "eslint-config-flat-gitignore": "^2.1.0",
54
- "eslint-flat-config-utils": "^2.0.1",
54
+ "eslint-flat-config-utils": "^2.1.4",
55
55
  "eslint-merge-processors": "^2.0.0",
56
56
  "eslint-plugin-antfu": "^3.1.1",
57
- "eslint-plugin-command": "^3.2.0",
58
- "eslint-plugin-format": "^1.0.1",
59
- "eslint-plugin-import-x": "^4.11.1",
60
- "eslint-plugin-jsdoc": "^50.6.15",
61
- "eslint-plugin-jsonc": "^2.20.0",
62
- "eslint-plugin-n": "^17.18.0",
57
+ "eslint-plugin-command": "^3.4.0",
58
+ "eslint-plugin-format": "^1.1.0",
59
+ "eslint-plugin-import-x": "^4.16.1",
60
+ "eslint-plugin-jsdoc": "^61.5.0",
61
+ "eslint-plugin-jsonc": "^2.21.0",
62
+ "eslint-plugin-n": "^17.23.1",
63
63
  "eslint-plugin-no-only-tests": "^3.3.0",
64
- "eslint-plugin-perfectionist": "^4.13.0",
65
- "eslint-plugin-pnpm": "^0.3.1",
66
- "eslint-plugin-regexp": "^2.7.0",
64
+ "eslint-plugin-perfectionist": "^5.1.0",
65
+ "eslint-plugin-pnpm": "^1.4.3",
66
+ "eslint-plugin-regexp": "^2.10.0",
67
67
  "eslint-plugin-toml": "^0.12.0",
68
- "eslint-plugin-unicorn": "^59.0.1",
69
- "eslint-plugin-unused-imports": "^4.1.4",
70
- "eslint-plugin-vue": "^10.1.0",
68
+ "eslint-plugin-unicorn": "^62.0.0",
69
+ "eslint-plugin-unused-imports": "^4.3.0",
70
+ "eslint-plugin-vue": "^10.6.2",
71
71
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
72
- "eslint-plugin-yml": "^1.18.0",
73
- "globals": "^16.1.0",
74
- "jsonc-eslint-parser": "^2.4.0",
75
- "local-pkg": "^1.1.1",
76
- "pnpm-workspace-yaml": "^0.3.1",
77
- "prettier": "^3.5.3",
78
- "toml-eslint-parser": "^0.10.0",
79
- "vue-eslint-parser": "^10.1.3",
80
- "yaml-eslint-parser": "^1.3.0"
72
+ "eslint-plugin-yml": "^1.19.1",
73
+ "globals": "^16.5.0",
74
+ "jsonc-eslint-parser": "^2.4.2",
75
+ "local-pkg": "^1.1.2",
76
+ "pnpm-workspace-yaml": "^1.4.3",
77
+ "prettier": "^3.7.4",
78
+ "toml-eslint-parser": "^0.10.1",
79
+ "vue-eslint-parser": "^10.2.0",
80
+ "yaml-eslint-parser": "^1.3.2"
81
81
  },
82
82
  "devDependencies": {
83
- "@antfu/ni": "^24.3.0",
84
- "@eslint/config-inspector": "^1.0.2",
85
- "@types/node": "^22.14.0",
86
- "bumpp": "^10.1.0",
87
- "eslint": "^9.26.0",
88
- "eslint-typegen": "^2.2.0",
89
- "jiti": "^2.4.2",
90
- "lint-staged": "^16.0.0",
91
- "simple-git-hooks": "^2.13.0",
92
- "tinyglobby": "^0.2.13",
93
- "tsdown": "^0.11.9",
94
- "tsx": "^4.19.4",
95
- "typescript": "^5.8.3",
96
- "vue": "^3.5.14"
83
+ "@antfu/ni": "^28.0.0",
84
+ "@eslint/config-inspector": "^1.4.2",
85
+ "@types/node": "^22.19.3",
86
+ "bumpp": "^10.3.2",
87
+ "eslint": "^9.39.2",
88
+ "eslint-typegen": "^2.3.0",
89
+ "jiti": "^2.6.1",
90
+ "lint-staged": "^16.2.7",
91
+ "prettier-plugin-tailwindcss": "^0.7.2",
92
+ "simple-git-hooks": "^2.13.1",
93
+ "tinyglobby": "^0.2.15",
94
+ "tsdown": "^0.18.3",
95
+ "tsx": "^4.21.0",
96
+ "typescript": "^5.9.3",
97
+ "vue": "^3.5.26"
97
98
  },
98
99
  "simple-git-hooks": {
99
100
  "pre-commit": "pnpm lint-staged"