@fabdeh/eslint-config 0.12.1 → 0.12.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/dist/index.d.mts CHANGED
@@ -2059,6 +2059,7 @@ type EnforceLogicalProperties = [] | [{
2059
2059
  detectComponentClasses?: boolean;
2060
2060
  rootFontSize?: number;
2061
2061
  cwd?: string;
2062
+ ignore?: string[];
2062
2063
  }]; // ----- enforce-shorthand-classes -----
2063
2064
  type EnforceShorthandClasses = [] | [{
2064
2065
  selectors?: ({
@@ -18233,6 +18234,13 @@ interface NamingConventionOptions {
18233
18234
  * @default false
18234
18235
  */
18235
18236
  useRelaxedNamingConventionForCamelAndPascalCases?: boolean;
18237
+ /**
18238
+ * Indicates whether function names should allow PascalCase in addition to camelCase.
18239
+ * Enable this when using JSX/TSX syntax.
18240
+ *
18241
+ * @default false
18242
+ */
18243
+ allowJsx?: boolean;
18236
18244
  }
18237
18245
  /**
18238
18246
  * Options for configuring Angular-specific linting rules.
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
14
14
  import nodePlugin from "eslint-plugin-n";
15
15
  import perfectionistPlugin from "eslint-plugin-perfectionist";
16
16
  import { readFile } from "node:fs/promises";
17
- import { findUp, findUpSync } from "find-up-simple";
17
+ import { up } from "empathic/find";
18
18
  import { configs } from "eslint-plugin-regexp";
19
19
  import unicornPlugin from "eslint-plugin-unicorn";
20
20
  import { FlatConfigComposer } from "eslint-flat-config-utils";
@@ -1519,7 +1519,7 @@ async function playwright(options = {}) {
1519
1519
  * @returns `true` when catalog configuration is present; otherwise `false`.
1520
1520
  */
1521
1521
  async function detectCatalogUsage() {
1522
- const workspaceFile = await findUp("pnpm-workspace.yaml");
1522
+ const workspaceFile = up("pnpm-workspace.yaml");
1523
1523
  if (!workspaceFile) return false;
1524
1524
  const yaml = await readFile(workspaceFile, "utf-8");
1525
1525
  return yaml.includes("catalog:") || yaml.includes("catalogs:");
@@ -2094,7 +2094,7 @@ const MEMBER_ORDERING_OPTIONS = { default: [
2094
2094
  * @returns A TypedConfig[] containing the TypeScript ESLint configuration.
2095
2095
  */
2096
2096
  async function typescript(options = {}, isWorkspaceProject = false) {
2097
- const { enableErasableSyntaxOnly = false, overrides = {}, parserOptions = {}, stylistic = true, type = "app", useRelaxedNamingConventionForCamelAndPascalCases = false } = options;
2097
+ const { enableErasableSyntaxOnly = false, overrides = {}, parserOptions = {}, stylistic = true, type = "app", useRelaxedNamingConventionForCamelAndPascalCases = false, allowJsx = false } = options;
2098
2098
  let erasableSyntaxOnlyPlugin;
2099
2099
  let erasableSyntaxOnlyRules;
2100
2100
  if (enableErasableSyntaxOnly) {
@@ -2169,7 +2169,7 @@ async function typescript(options = {}, isWorkspaceProject = false) {
2169
2169
  ...type === "workspace" ? {} : { "@typescript-eslint/explicit-module-boundary-types": "error" },
2170
2170
  "@typescript-eslint/member-ordering": ["error", MEMBER_ORDERING_OPTIONS],
2171
2171
  "@typescript-eslint/method-signature-style": "error",
2172
- "@typescript-eslint/naming-convention": ["error", ...namingConvention(!useRelaxedNamingConventionForCamelAndPascalCases)],
2172
+ "@typescript-eslint/naming-convention": ["error", ...namingConvention(!useRelaxedNamingConventionForCamelAndPascalCases, allowJsx)],
2173
2173
  "@typescript-eslint/no-base-to-string": "error",
2174
2174
  "@typescript-eslint/no-confusing-non-null-assertion": "error",
2175
2175
  "@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
@@ -2546,7 +2546,7 @@ function defineProjectConfig(baseConfig, options = {}, ...userConfigs) {
2546
2546
  * ```
2547
2547
  */
2548
2548
  function defineConfig(options = {}, ...userConfigs) {
2549
- const { angular: enableAngular = isPackageExists("@angular/core"), gitignore: enableGitignore = true, jsdoc: enableJsdoc = options.type === "lib", ngrx: enableNgrx = NGRX_PACKAGES.some((p) => isPackageExists(p)), playwright: enablePlaywright = PLAYWRIGHT_PACKAGES.some((p) => isPackageExists(p)), pnpm: enableCatalogs = !!findUpSync("pnpm-workspace.yaml"), regexp: enableRegexp = true, tailwindcss: enableTailwind = false, typescript: enableTypescript = isPackageExists("typescript"), unicorn: enableUnicorn = true, vitest: enableVitest = isPackageExists("vitest") } = options;
2549
+ const { angular: enableAngular = isPackageExists("@angular/core"), gitignore: enableGitignore = true, jsdoc: enableJsdoc = options.type === "lib", ngrx: enableNgrx = NGRX_PACKAGES.some((p) => isPackageExists(p)), playwright: enablePlaywright = PLAYWRIGHT_PACKAGES.some((p) => isPackageExists(p)), pnpm: enableCatalogs = !!up("pnpm-workspace.yaml"), regexp: enableRegexp = true, tailwindcss: enableTailwind = false, typescript: enableTypescript = isPackageExists("typescript"), unicorn: enableUnicorn = true, vitest: enableVitest = isPackageExists("vitest") } = options;
2550
2550
  let isInEditor = options.isInEditor;
2551
2551
  if (isInEditor === void 0) {
2552
2552
  isInEditor = isInEditorEnv();
@@ -2677,7 +2677,7 @@ function defineConfig(options = {}, ...userConfigs) {
2677
2677
  * ```
2678
2678
  */
2679
2679
  function defineWorkspaceConfig(options = {}, ...userConfigs) {
2680
- const { gitignore: enableGitignore = true, pnpm: enableCatalogs = !!findUpSync("pnpm-workspace.yaml"), regexp: enableRegexp = true, typescript: enableTypescript = isPackageExists("typescript"), unicorn: enableUnicorn = true } = options;
2680
+ const { gitignore: enableGitignore = true, pnpm: enableCatalogs = !!up("pnpm-workspace.yaml"), regexp: enableRegexp = true, typescript: enableTypescript = isPackageExists("typescript"), unicorn: enableUnicorn = true } = options;
2681
2681
  let isInEditor = options.isInEditor;
2682
2682
  if (isInEditor === void 0) {
2683
2683
  isInEditor = isInEditorEnv();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fabdeh/eslint-config",
3
3
  "type": "module",
4
- "version": "0.12.1",
4
+ "version": "0.12.2",
5
5
  "description": "My personal eslint config preset",
6
6
  "author": {
7
7
  "name": "Fabien Dehopré",
@@ -37,8 +37,8 @@
37
37
  ],
38
38
  "peerDependencies": {
39
39
  "eslint": "^9.38.0 || ^10.0.0",
40
- "eslint-plugin-better-tailwindcss": "^4.5.0",
41
- "eslint-plugin-erasable-syntax-only": "^0.4.1"
40
+ "eslint-plugin-better-tailwindcss": "^4.6.0",
41
+ "eslint-plugin-erasable-syntax-only": "^0.4.2"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "eslint-plugin-better-tailwindcss": {
@@ -55,20 +55,21 @@
55
55
  "@eslint/markdown": "^8.0.2",
56
56
  "@ngrx/eslint-plugin": "^21.1.1",
57
57
  "@stylistic/eslint-plugin": "^5.10.0",
58
- "@typescript-eslint/eslint-plugin": "^8.61.0",
59
- "@typescript-eslint/parser": "^8.61.0",
60
- "@typescript-eslint/utils": "^8.61.0",
61
- "@vitest/eslint-plugin": "^1.6.19",
58
+ "@typescript-eslint/eslint-plugin": "^8.61.1",
59
+ "@typescript-eslint/parser": "^8.61.1",
60
+ "@typescript-eslint/utils": "^8.61.1",
61
+ "@vitest/eslint-plugin": "^1.6.20",
62
62
  "angular-eslint": "^22.0.0",
63
+ "empathic": "^2.0.1",
63
64
  "eslint-config-flat-gitignore": "^2.3.0",
64
65
  "eslint-flat-config-utils": "^3.2.0",
65
66
  "eslint-merge-processors": "^2.0.0",
66
67
  "eslint-plugin-import-x": "^4.16.2",
67
68
  "eslint-plugin-jest-dom-ya": "^1.0.1",
68
- "eslint-plugin-jsdoc": "^63.0.2",
69
+ "eslint-plugin-jsdoc": "^63.0.6",
69
70
  "eslint-plugin-jsonc": "^3.2.0",
70
71
  "eslint-plugin-n": "^18.1.0",
71
- "eslint-plugin-perfectionist": "^5.9.0",
72
+ "eslint-plugin-perfectionist": "^5.9.1",
72
73
  "eslint-plugin-playwright": "^2.10.4",
73
74
  "eslint-plugin-pnpm": "^1.6.1",
74
75
  "eslint-plugin-prefer-arrow-functions": "^3.9.1",
@@ -78,15 +79,15 @@
78
79
  "eslint-plugin-unicorn": "^65.0.1",
79
80
  "eslint-plugin-unused-imports": "^4.4.1",
80
81
  "eslint-plugin-yml": "^3.4.0",
81
- "find-up-simple": "^1.0.1",
82
82
  "glob": "^13.0.6",
83
83
  "globals": "^17.6.0",
84
84
  "jsonc-eslint-parser": "^3.1.0",
85
85
  "local-pkg": "^1.2.1",
86
- "typescript-eslint": "^8.61.0"
86
+ "typescript-eslint": "^8.61.1"
87
87
  },
88
88
  "devDependencies": {
89
- "@angular/core": "^22.0.0",
89
+ "@angular/cli": "^22.0.2",
90
+ "@angular/core": "^22.0.2",
90
91
  "@arethetypeswrong/cli": "^0.18.3",
91
92
  "@commitlint/cli": "^21.0.2",
92
93
  "@commitlint/config-conventional": "^21.0.2",
@@ -100,31 +101,31 @@
100
101
  "@testing-library/angular": "^19.4.1",
101
102
  "@testing-library/jest-dom": "^6.9.1",
102
103
  "@types/fs-extra": "^11.0.4",
103
- "@types/node": "^24.13.1",
104
- "@vitest/coverage-v8": "^4.1.8",
105
- "@vitest/ui": "^4.1.8",
104
+ "@types/node": "^24.13.2",
105
+ "@vitest/coverage-v8": "^4.1.9",
106
+ "@vitest/ui": "^4.1.9",
106
107
  "bumpp": "^11.1.0",
107
108
  "change-case": "^5.4.4",
108
109
  "changelogithub": "^14.0.0",
109
- "commitizen": "^4.3.1",
110
- "eslint": "^10.4.1",
111
- "eslint-plugin-better-tailwindcss": "^4.5.0",
112
- "eslint-plugin-erasable-syntax-only": "^0.4.1",
110
+ "commitizen": "^4.3.2",
111
+ "eslint": "^10.5.0",
112
+ "eslint-plugin-better-tailwindcss": "^4.6.0",
113
+ "eslint-plugin-erasable-syntax-only": "^0.4.2",
113
114
  "eslint-typegen": "^2.3.1",
114
115
  "execa": "^9.6.1",
115
116
  "fs-extra": "^11.3.5",
116
117
  "is-ci": "^4.1.0",
117
118
  "jiti": "^2.7.0",
118
119
  "nano-staged": "^1.0.2",
119
- "playwright": "^1.60.0",
120
- "semver": "^7.8.3",
120
+ "playwright": "^1.61.0",
121
+ "semver": "^7.8.4",
121
122
  "simple-git-hooks": "^2.13.1",
122
- "tailwindcss": "^4.3.0",
123
- "tsdown": "^0.22.2",
123
+ "tailwindcss": "^4.3.1",
124
+ "tsdown": "^0.22.3",
124
125
  "tsx": "^4.22.4",
125
126
  "typescript": "^6.0.3",
126
- "vitest": "^4.1.8",
127
- "@fabdeh/eslint-config": "0.12.1"
127
+ "vitest": "^4.1.9",
128
+ "@fabdeh/eslint-config": "0.12.2"
128
129
  },
129
130
  "simple-git-hooks": {
130
131
  "pre-commit": "pnpm nano-staged",