@ghettoddos/eslint-config 3.2.1 → 4.0.0

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/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { FlatConfigComposer } from "eslint-flat-config-utils";
2
2
  import process from "node:process";
3
- import fsPromises from "node:fs/promises";
3
+ import fs from "node:fs/promises";
4
4
  import { fileURLToPath } from "node:url";
5
- import fs from "node:fs";
5
+ import fs$1 from "node:fs";
6
6
  import path from "node:path";
7
7
  import { isPackageExists } from "local-pkg";
8
8
  import createCommand from "eslint-plugin-command/config";
@@ -28,7 +28,7 @@ async function findUp(name, { cwd = process.cwd(), type = "file", stopAt } = {})
28
28
  while (directory) {
29
29
  const filePath = isAbsoluteName ? name : path.join(directory, name);
30
30
  try {
31
- const stats = await fsPromises.stat(filePath);
31
+ const stats = await fs.stat(filePath);
32
32
  if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) return filePath;
33
33
  } catch {}
34
34
  if (directory === stopAt || directory === root) break;
@@ -43,7 +43,7 @@ function findUpSync(name, { cwd = process.cwd(), type = "file", stopAt } = {}) {
43
43
  while (directory) {
44
44
  const filePath = isAbsoluteName ? name : path.join(directory, name);
45
45
  try {
46
- const stats = fs.statSync(filePath, { throwIfNoEntry: false });
46
+ const stats = fs$1.statSync(filePath, { throwIfNoEntry: false });
47
47
  if (type === "file" && stats?.isFile() || type === "directory" && stats?.isDirectory()) return filePath;
48
48
  } catch {}
49
49
  if (directory === stopAt || directory === root) break;
@@ -489,11 +489,11 @@ async function formatters(options = {}, stylistic$1 = {}) {
489
489
  //#endregion
490
490
  //#region src/configs/ignores.ts
491
491
  async function ignores(userIgnores = []) {
492
- let ignores$1 = [...GLOB_EXCLUDE];
493
- if (typeof userIgnores === "function") ignores$1 = userIgnores(ignores$1);
494
- else ignores$1 = [...ignores$1, ...userIgnores];
492
+ let ignores = [...GLOB_EXCLUDE];
493
+ if (typeof userIgnores === "function") ignores = userIgnores(ignores);
494
+ else ignores = [...ignores, ...userIgnores];
495
495
  return [{
496
- ignores: ignores$1,
496
+ ignores,
497
497
  name: "ignores"
498
498
  }];
499
499
  }
@@ -827,7 +827,7 @@ async function jsonc(options = {}) {
827
827
  "jsonc/array-bracket-spacing": ["error", "never"],
828
828
  "jsonc/comma-dangle": ["error", "never"],
829
829
  "jsonc/comma-style": ["error", "last"],
830
- "jsonc/indent": ["error", indent],
830
+ "jsonc/indent": ["error", typeof indent === "number" ? indent : indent === "tab" ? "tab" : 2],
831
831
  "jsonc/key-spacing": ["error", {
832
832
  afterColon: true,
833
833
  beforeColon: false
@@ -894,17 +894,17 @@ async function jsx(options = {}) {
894
894
  //#region src/configs/markdown.ts
895
895
  async function markdown(options = {}) {
896
896
  const { componentExts = [], files = [GLOB_MARKDOWN], overrides = {} } = options;
897
- const markdown$1 = await interopDefault(import("@eslint/markdown"));
897
+ const markdown = await interopDefault(import("@eslint/markdown"));
898
898
  return [
899
899
  {
900
900
  name: "markdown/setup",
901
- plugins: { markdown: markdown$1 }
901
+ plugins: { markdown }
902
902
  },
903
903
  {
904
904
  files,
905
905
  ignores: [GLOB_MARKDOWN_IN_MARKDOWN],
906
906
  name: "markdown/processor",
907
- processor: mergeProcessors([markdown$1.processors.markdown, processorPassThrough])
907
+ processor: mergeProcessors([markdown.processors.markdown, processorPassThrough])
908
908
  },
909
909
  {
910
910
  files,
@@ -1027,25 +1027,27 @@ async function perfectionist() {
1027
1027
  }],
1028
1028
  "perfectionist/sort-imports": ["error", {
1029
1029
  groups: [
1030
- "type-external",
1030
+ "type-import",
1031
1031
  [
1032
1032
  "type-parent",
1033
1033
  "type-sibling",
1034
1034
  "type-index",
1035
1035
  "type-internal"
1036
1036
  ],
1037
- "builtin",
1038
- "external",
1039
- "internal",
1037
+ "value-builtin",
1038
+ "value-external",
1039
+ "value-internal",
1040
1040
  [
1041
- "parent",
1042
- "sibling",
1043
- "index"
1041
+ "value-parent",
1042
+ "value-sibling",
1043
+ "value-index"
1044
1044
  ],
1045
1045
  "side-effect",
1046
+ "ts-equals-import",
1046
1047
  "unknown"
1047
1048
  ],
1048
- newlinesBetween: 1,
1049
+ newlinesBetween: "ignore",
1050
+ newlinesInside: "ignore",
1049
1051
  order: "asc",
1050
1052
  type: "natural"
1051
1053
  }],
@@ -1066,7 +1068,7 @@ async function perfectionist() {
1066
1068
  async function detectCatalogUsage() {
1067
1069
  const workspaceFile = await findUp("pnpm-workspace.yaml");
1068
1070
  if (!workspaceFile) return false;
1069
- const yaml$1 = await fsPromises.readFile(workspaceFile, "utf-8");
1071
+ const yaml$1 = await fs.readFile(workspaceFile, "utf-8");
1070
1072
  return yaml$1.includes("catalog:") || yaml$1.includes("catalogs:");
1071
1073
  }
1072
1074
  async function pnpm(options) {
@@ -1270,6 +1272,7 @@ async function react(options = {}) {
1270
1272
  "react/no-use-context": "warn",
1271
1273
  "react/no-useless-forward-ref": "warn",
1272
1274
  "react/prefer-use-state-lazy-initialization": "warn",
1275
+ "react/prefer-namespace-import": "error",
1273
1276
  "react/jsx-shorthand-boolean": "warn",
1274
1277
  "react/prefer-destructuring-assignment": "warn",
1275
1278
  "react/no-missing-context-display-name": "warn",
@@ -1682,13 +1685,15 @@ async function tailwindcss(options = {}) {
1682
1685
  plugins: { tailwindcss: pluginTailwindCSS },
1683
1686
  rules: {
1684
1687
  ...stylistic$1 ? {
1688
+ "tailwindcss/enforce-canonical-classes": "warn",
1685
1689
  "tailwindcss/enforce-consistent-class-order": "warn",
1686
- "tailwindcss/enforce-consistent-line-wrapping": ["warn", { indent }],
1690
+ "tailwindcss/enforce-consistent-line-wrapping": ["warn", { indent: typeof indent === "number" ? indent : indent === "tab" ? "tab" : 2 }],
1691
+ "tailwindcss/no-deprecated-classes": "warn",
1687
1692
  "tailwindcss/no-duplicate-classes": "warn",
1688
1693
  "tailwindcss/no-unnecessary-whitespace": "warn"
1689
1694
  } : {},
1690
1695
  "tailwindcss/no-conflicting-classes": "error",
1691
- "tailwindcss/no-unregistered-classes": "error",
1696
+ "tailwindcss/no-unknown-classes": "error",
1692
1697
  ...overrides
1693
1698
  },
1694
1699
  settings: { "better-tailwindcss": {
@@ -1763,7 +1768,7 @@ async function toml(options = {}) {
1763
1768
  "toml/array-bracket-newline": "error",
1764
1769
  "toml/array-bracket-spacing": "error",
1765
1770
  "toml/array-element-newline": "error",
1766
- "toml/indent": ["error", indent === "tab" ? 2 : indent],
1771
+ "toml/indent": ["error", typeof indent === "number" ? indent : indent === "tab" ? "tab" : 2],
1767
1772
  "toml/inline-table-curly-spacing": "error",
1768
1773
  "toml/key-spacing": "error",
1769
1774
  "toml/padding-line-between-pairs": "error",
@@ -1910,7 +1915,7 @@ async function typescript(options = {}) {
1910
1915
  }] : [],
1911
1916
  ...erasableOnly ? [{
1912
1917
  name: "antfu/typescript/erasable-syntax-only",
1913
- plugins: { "erasable-syntax-only": await interopDefault(import("./lib-iPqdw0x2.mjs")) },
1918
+ plugins: { "erasable-syntax-only": await interopDefault(import("./lib-D6spnV0Z.mjs")) },
1914
1919
  rules: {
1915
1920
  "erasable-syntax-only/enums": "error",
1916
1921
  "erasable-syntax-only/import-aliases": "error",
@@ -2209,7 +2214,7 @@ async function yaml(options = {}) {
2209
2214
  "yaml/flow-mapping-curly-spacing": "error",
2210
2215
  "yaml/flow-sequence-bracket-newline": "error",
2211
2216
  "yaml/flow-sequence-bracket-spacing": "error",
2212
- "yaml/indent": ["error", indent === "tab" ? 2 : indent],
2217
+ "yaml/indent": ["error", typeof indent === "number" ? indent : 2],
2213
2218
  "yaml/key-spacing": "error",
2214
2219
  "yaml/no-tab-indent": "error",
2215
2220
  "yaml/quotes": ["error", {
@@ -10932,12 +10932,12 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
10932
10932
  }));
10933
10933
 
10934
10934
  //#endregion
10935
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/utils.js
10935
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.53.0_eslint@9.39.2_24da780f368b860d5b1e09d753136340/node_modules/eslint-plugin-erasable-syntax-only/lib/utils.js
10936
10936
  var import_dist = require_dist();
10937
10937
  const createRule = import_dist.ESLintUtils.RuleCreator((name$1) => `https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/${name$1}.md`);
10938
10938
 
10939
10939
  //#endregion
10940
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/enums.js
10940
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.53.0_eslint@9.39.2_24da780f368b860d5b1e09d753136340/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/enums.js
10941
10941
  const rule$3 = createRule({
10942
10942
  create(context) {
10943
10943
  return { TSEnumDeclaration(node) {
@@ -10998,7 +10998,7 @@ ${isExported ? "export " : ""}type ${name$1} = typeof ${name$1}[keyof typeof ${n
10998
10998
  });
10999
10999
 
11000
11000
  //#endregion
11001
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/import-aliases.js
11001
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.53.0_eslint@9.39.2_24da780f368b860d5b1e09d753136340/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/import-aliases.js
11002
11002
  const rule$2 = createRule({
11003
11003
  create(context) {
11004
11004
  return { TSImportEqualsDeclaration(node) {
@@ -11062,7 +11062,7 @@ var CachedFactory = class {
11062
11062
  };
11063
11063
 
11064
11064
  //#endregion
11065
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/namespaces.js
11065
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.53.0_eslint@9.39.2_24da780f368b860d5b1e09d753136340/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/namespaces.js
11066
11066
  function skipExportParent(node) {
11067
11067
  return node.parent.type == import_dist.AST_NODE_TYPES.ExportNamedDeclaration ? node.parent : node;
11068
11068
  }
@@ -11099,7 +11099,7 @@ const rule$1 = createRule({
11099
11099
  });
11100
11100
 
11101
11101
  //#endregion
11102
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/parameter-properties.js
11102
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.53.0_eslint@9.39.2_24da780f368b860d5b1e09d753136340/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/parameter-properties.js
11103
11103
  const rule = createRule({
11104
11104
  create(context) {
11105
11105
  return { TSParameterProperty(node) {
@@ -11120,7 +11120,7 @@ const rule = createRule({
11120
11120
  });
11121
11121
 
11122
11122
  //#endregion
11123
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/index.js
11123
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.53.0_eslint@9.39.2_24da780f368b860d5b1e09d753136340/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/index.js
11124
11124
  const rules = {
11125
11125
  enums: rule$3,
11126
11126
  "import-aliases": rule$2,
@@ -11129,7 +11129,7 @@ const rules = {
11129
11129
  };
11130
11130
 
11131
11131
  //#endregion
11132
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/index.js
11132
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.53.0_eslint@9.39.2_24da780f368b860d5b1e09d753136340/node_modules/eslint-plugin-erasable-syntax-only/lib/index.js
11133
11133
  const { name, version } = Module.createRequire(import.meta.url)("../package.json");
11134
11134
  const plugin = {
11135
11135
  configs: { get recommended() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ghettoddos/eslint-config",
3
3
  "type": "module",
4
- "version": "3.2.1",
4
+ "version": "4.0.0",
5
5
  "description": "ghettoDdOS ESLint config",
6
6
  "author": "ghettoDdOS <pen.egor2002@gamil.com> (https://github.com/ghettoDdOS/)",
7
7
  "license": "MIT",
@@ -20,8 +20,6 @@
20
20
  ".": "./dist/index.mjs",
21
21
  "./package.json": "./package.json"
22
22
  },
23
- "main": "./dist/index.mjs",
24
- "module": "./dist/index.mjs",
25
23
  "types": "./dist/index.d.mts",
26
24
  "files": [
27
25
  "dist"
@@ -33,7 +31,7 @@
33
31
  "@react-native/eslint-plugin": ">=0.80.0",
34
32
  "@unocss/eslint-plugin": ">=0.50.0",
35
33
  "eslint": "^9.10.0",
36
- "eslint-plugin-better-tailwindcss": "^3.8.0",
34
+ "eslint-plugin-better-tailwindcss": "^4.0.0",
37
35
  "eslint-plugin-effector": ">=0.15.0",
38
36
  "eslint-plugin-expo": "^0.1.4",
39
37
  "eslint-plugin-format": ">=0.1.0",
@@ -102,53 +100,53 @@
102
100
  "dependencies": {
103
101
  "@antfu/install-pkg": "^1.1.0",
104
102
  "@clack/prompts": "^0.11.0",
105
- "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
106
- "@eslint/compat": "^2.0.0",
103
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
104
+ "@eslint/compat": "^2.0.1",
107
105
  "@eslint/markdown": "^7.5.1",
108
- "@stylistic/eslint-plugin": "^5.6.1",
109
- "@typescript-eslint/eslint-plugin": "^8.50.1",
110
- "@typescript-eslint/parser": "^8.50.1",
111
- "@vitest/eslint-plugin": "^1.6.4",
106
+ "@stylistic/eslint-plugin": "^5.7.0",
107
+ "@typescript-eslint/eslint-plugin": "^8.53.0",
108
+ "@typescript-eslint/parser": "^8.53.0",
109
+ "@vitest/eslint-plugin": "^1.6.6",
112
110
  "eslint-config-flat-gitignore": "^2.1.0",
113
111
  "eslint-flat-config-utils": "^2.1.4",
114
112
  "eslint-merge-processors": "^2.0.0",
115
- "eslint-plugin-antfu": "^3.1.1",
113
+ "eslint-plugin-antfu": "^3.1.3",
116
114
  "eslint-plugin-command": "^3.4.0",
117
- "eslint-plugin-import-lite": "^0.4.0",
118
- "eslint-plugin-jsdoc": "^61.5.0",
115
+ "eslint-plugin-import-lite": "^0.5.0",
116
+ "eslint-plugin-jsdoc": "^62.0.0",
119
117
  "eslint-plugin-jsonc": "^2.21.0",
120
- "eslint-plugin-n": "^17.23.1",
118
+ "eslint-plugin-n": "^17.23.2",
121
119
  "eslint-plugin-no-only-tests": "^3.3.0",
122
- "eslint-plugin-perfectionist": "^5.1.0",
120
+ "eslint-plugin-perfectionist": "^5.3.1",
123
121
  "eslint-plugin-pnpm": "^1.4.3",
124
122
  "eslint-plugin-regexp": "^2.10.0",
125
- "eslint-plugin-toml": "^0.12.0",
123
+ "eslint-plugin-toml": "^1.0.0",
126
124
  "eslint-plugin-unicorn": "^62.0.0",
127
125
  "eslint-plugin-unused-imports": "^4.3.0",
128
126
  "eslint-plugin-yml": "^1.19.1",
129
- "globals": "^16.5.0",
127
+ "globals": "^17.0.0",
130
128
  "jsonc-eslint-parser": "^2.4.2",
131
129
  "local-pkg": "^1.1.2",
132
130
  "parse-gitignore": "^2.0.0",
133
- "toml-eslint-parser": "^0.10.1",
131
+ "toml-eslint-parser": "^1.0.2",
134
132
  "yaml-eslint-parser": "^1.3.2"
135
133
  },
136
134
  "devDependencies": {
137
- "@commitlint/cli": "^20.2.0",
138
- "@commitlint/config-conventional": "^20.2.0",
139
- "@eslint-react/eslint-plugin": "^2.4.0",
135
+ "@commitlint/cli": "^20.3.1",
136
+ "@commitlint/config-conventional": "^20.3.1",
137
+ "@eslint-react/eslint-plugin": "^2.6.4",
140
138
  "@eslint/config-inspector": "^1.4.2",
141
- "@next/eslint-plugin-next": "^16.1.1",
139
+ "@next/eslint-plugin-next": "^16.1.2",
142
140
  "@prettier/plugin-xml": "^3.4.2",
143
141
  "@react-native/eslint-plugin": "^0.83.1",
144
142
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
145
- "@types/node": "^25.0.3",
146
- "@unocss/eslint-plugin": "^66.5.11",
147
- "bumpp": "^10.3.2",
143
+ "@types/node": "^25.0.8",
144
+ "@unocss/eslint-plugin": "^66.6.0",
145
+ "bumpp": "^10.4.0",
148
146
  "eslint": "^9.39.2",
149
- "eslint-plugin-better-tailwindcss": "^3.8.0",
147
+ "eslint-plugin-better-tailwindcss": "^4.0.1",
150
148
  "eslint-plugin-erasable-syntax-only": "^0.4.0",
151
- "eslint-plugin-format": "^1.1.0",
149
+ "eslint-plugin-format": "^1.3.1",
152
150
  "eslint-plugin-jsx-a11y": "^6.10.2",
153
151
  "eslint-plugin-react-hooks": "^7.0.1",
154
152
  "eslint-plugin-react-refresh": "^0.4.26",
@@ -160,13 +158,13 @@
160
158
  "lint-staged": "^16.2.7",
161
159
  "pnpm-workspace-yaml": "^1.4.3",
162
160
  "simple-git-hooks": "^2.13.1",
163
- "tsdown": "^0.18.3",
161
+ "tsdown": "^0.20.0-beta.3",
164
162
  "tsx": "^4.21.0",
165
163
  "typescript": "^5.9.3",
166
- "vitest": "^4.0.16",
164
+ "vitest": "^4.0.17",
167
165
  "vue": "^3.5.26",
168
166
  "vue-eslint-parser": "^10.2.0",
169
- "@ghettoddos/eslint-config": "3.2.1"
167
+ "@ghettoddos/eslint-config": "4.0.0"
170
168
  },
171
169
  "simple-git-hooks": {
172
170
  "pre-commit": "npx lint-staged",