@maprox/lint-config 1.0.0 → 1.6.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/README.md +3 -21
- package/package.json +2 -3
- package/src/eslint/portable.js +2 -0
- package/.npmrc.example +0 -3
package/README.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Shared ESLint flat configs for maprox (and related) projects, plus an experimental Oxlint base.
|
|
4
4
|
|
|
5
|
-
Formerly published
|
|
5
|
+
Formerly published as `@sunsay/eslint-config` on the Forgejo npm registry; use `@maprox/lint-config` going forward (same presets).
|
|
6
|
+
|
|
6
7
|
|
|
7
8
|
## Install
|
|
8
9
|
|
|
@@ -10,8 +11,6 @@ Formerly published privately as `@sunsay/eslint-config` (last aligned content: 1
|
|
|
10
11
|
npm install --save-dev @maprox/lint-config
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
Uses the public npm registry (`registry.npmjs.org`). No scoped `.npmrc` override is required.
|
|
14
|
-
|
|
15
14
|
Install peers for the preset you use (`eslint`, `typescript`, and for Vue also `@nuxt/eslint-config`, for Astro also `eslint-plugin-astro`, etc.).
|
|
16
15
|
|
|
17
16
|
## Usage
|
|
@@ -118,7 +117,7 @@ Vue stays on the ESLint `./vue` preset for now.
|
|
|
118
117
|
|
|
119
118
|
## What is included
|
|
120
119
|
|
|
121
|
-
- **Base / portable:** `@stylistic`, import order (`import-x` + `import-newlines`), TS strictness, type-aware rules for `*.ts`, relative-import ban, `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`).
|
|
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`).
|
|
122
121
|
- **Vue:** `createConfigForNuxt` + portable layer + Vue SFC-only rules; type-aware rules also cover `.vue` `<script>` (`extraFileExtensions`).
|
|
123
122
|
- **Astro / Node:** extend base with their parsers/globals.
|
|
124
123
|
- **Tailwind (opt-in `./tailwind`):** `eslint-plugin-tailwindcss@4` `classnames-order` + required `cssConfigPath`.
|
|
@@ -140,23 +139,6 @@ Prefer either the package stylistic rules **or** Prettier at full strength — n
|
|
|
140
139
|
- `eslint-plugin-astro` (optional peer, Astro preset)
|
|
141
140
|
- `eslint-plugin-tailwindcss`, `tailwindcss` (optional peers, `./tailwind` only)
|
|
142
141
|
|
|
143
|
-
## Test / lint
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
npx eslint src/
|
|
147
|
-
npx eslint src/ --fix
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Package smoke tests:
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
npm test
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
## Publishing
|
|
157
|
-
|
|
158
|
-
Published to the public npm registry as `@maprox/lint-config`. Tags matching `v*` can run Forgejo Actions publish when `NPM_TOKEN` is an npmjs Automation token with publish rights on `@maprox`.
|
|
159
|
-
|
|
160
142
|
## License
|
|
161
143
|
|
|
162
144
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maprox/lint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Shared ESLint flat configs (base, vue, astro, node, opt-in tailwind) + oxlint skeleton",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,8 +42,7 @@
|
|
|
42
42
|
"files": [
|
|
43
43
|
"src",
|
|
44
44
|
"README.md",
|
|
45
|
-
"LICENSE"
|
|
46
|
-
".npmrc.example"
|
|
45
|
+
"LICENSE"
|
|
47
46
|
],
|
|
48
47
|
"engines": {
|
|
49
48
|
"node": ">=18"
|
package/src/eslint/portable.js
CHANGED
|
@@ -69,6 +69,8 @@ export const portableOverrides = [
|
|
|
69
69
|
'warn',
|
|
70
70
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
71
71
|
],
|
|
72
|
+
'no-shadow': 'off',
|
|
73
|
+
'@typescript-eslint/no-shadow': 'error',
|
|
72
74
|
'@typescript-eslint/no-dynamic-delete': 'off',
|
|
73
75
|
'@typescript-eslint/no-invalid-void-type': 'off',
|
|
74
76
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
package/.npmrc.example
DELETED