@maprox/lint-config 1.6.1 → 1.8.1

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 CHANGED
@@ -4,6 +4,7 @@ Shared ESLint flat configs for maprox (and related) projects, plus an experiment
4
4
 
5
5
  Formerly published as `@sunsay/eslint-config` on the Forgejo npm registry; use `@maprox/lint-config` going forward (same presets).
6
6
 
7
+ Breaking changes: see [`docs/MIGRATION.md`](./docs/MIGRATION.md).
7
8
 
8
9
  ## Install
9
10
 
@@ -117,7 +118,7 @@ Vue stays on the ESLint `./vue` preset for now.
117
118
 
118
119
  ## What is included
119
120
 
120
- - **Base / portable:** `@stylistic`, import order (`import-x` + `import-newlines`), TS strictness, type-aware rules for `*.ts`, relative-import ban, `@typescript-eslint/no-shadow` (core `no-shadow` off), `curly` / `no-console`, etc. Enums are PascalCase with `UPPER_CASE` members. Boolean variables and parameters are PascalCase with a prefix of `is`, `should`, `has`, `can`, `did`, or `will` (`isReady`, `hasError`). Needs a usable `tsconfig.json` (`project: true`).
121
+ - **Base / portable:** `@stylistic` (including single quotes via `@stylistic/quotes`), import order (`import-x` + `import-newlines`), TS strictness, type-aware rules for `*.ts`, relative-import ban, `@typescript-eslint/no-shadow` (core `no-shadow` off), `curly` / `no-console`, complexity metrics (`complexity` ≤10, `max-params` ≤4, `max-depth` ≤3, `max-lines-per-function` ≤40, `max-statements` ≤20), etc. Enums are PascalCase with `UPPER_CASE` members. Boolean variables and parameters are PascalCase with a prefix of `is`, `should`, `has`, `can`, `did`, or `will` (`isReady`, `hasError`). Needs a usable `tsconfig.json` (`project: true`).
121
122
  - **Vue:** `createConfigForNuxt` + portable layer + Vue SFC-only rules; type-aware rules also cover `.vue` `<script>` (`extraFileExtensions`).
122
123
  - **Astro / Node:** extend base with their parsers/globals.
123
124
  - **Tailwind (opt-in `./tailwind`):** `eslint-plugin-tailwindcss@4` `classnames-order` + required `cssConfigPath`.
@@ -139,6 +140,11 @@ Prefer either the package stylistic rules **or** Prettier at full strength — n
139
140
  - `eslint-plugin-astro` (optional peer, Astro preset)
140
141
  - `eslint-plugin-tailwindcss`, `tailwindcss` (optional peers, `./tailwind` only)
141
142
 
143
+ ## Changelog
144
+
145
+ See [`CHANGELOG.md`](./CHANGELOG.md) for notable changes. Releases: [`docs/RELEASES.md`](./docs/RELEASES.md).
146
+
142
147
  ## License
143
148
 
144
149
  MIT
150
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maprox/lint-config",
3
- "version": "1.6.1",
3
+ "version": "1.8.1",
4
4
  "description": "Shared ESLint flat configs (base, vue, astro, node, opt-in tailwind) + oxlint skeleton",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -88,10 +88,14 @@
88
88
  "devDependencies": {
89
89
  "@eslint/js": "^10.0.1",
90
90
  "@nuxt/eslint-config": "^1.16.0",
91
+ "@semantic-release/commit-analyzer": "^13.0.1",
92
+ "@semantic-release/npm": "^13.2.0",
93
+ "@semantic-release/release-notes-generator": "^14.1.1",
91
94
  "eslint": "^10.5.0",
92
95
  "eslint-plugin-astro": "^1.7.0",
93
96
  "eslint-plugin-tailwindcss": "^4.4.0",
94
97
  "globals": "^17.7.0",
98
+ "semantic-release": "^25.0.9",
95
99
  "tailwindcss": "^4.1.14",
96
100
  "typescript": "^5.9.0",
97
101
  "typescript-eslint": "^8.62.0"
@@ -99,6 +99,7 @@ export const portableOverrides = [
99
99
  },
100
100
  ],
101
101
  '@stylistic/quote-props': ['error', 'as-needed'],
102
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
102
103
  'import/order': [
103
104
  'error',
104
105
  {
@@ -113,6 +114,14 @@ export const portableOverrides = [
113
114
  'no-constant-condition': ['error', { checkLoops: 'none' }],
114
115
  'no-lonely-if': 'error',
115
116
  'no-useless-constructor': 'off',
117
+ complexity: ['error', 10],
118
+ 'max-params': ['error', 4],
119
+ 'max-depth': ['error', 3],
120
+ 'max-lines-per-function': [
121
+ 'error',
122
+ { max: 40, skipBlankLines: true, skipComments: true },
123
+ ],
124
+ 'max-statements': ['error', 20],
116
125
  'nonblock-statement-body-position': ['error', 'below'],
117
126
  'space-before-function-paren': [
118
127
  'error',