eslint-plugin-ocavue 0.0.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/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/package.json +55 -0
- package/src/index.test.ts +7 -0
- package/src/index.ts +2 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ocavue
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# eslint-plugin-ocavue
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/eslint-plugin-ocavue)
|
|
4
|
+
|
|
5
|
+
A minimal [TypeScript](https://www.typescriptlang.org/) library starter with bundling, testing, linting, formatting, and automated npm releases, all preconfigured.
|
|
6
|
+
|
|
7
|
+
> **Using this template?** Click [Use this template](https://github.com/ocavue/starter-ts/generate), rename the package in `package.json`, and write your code in `src/index.ts`.
|
|
8
|
+
|
|
9
|
+
## Project structure
|
|
10
|
+
|
|
11
|
+
- `src/`: source code, with co-located [Vitest](https://vitest.dev/) tests (`*.test.ts`)
|
|
12
|
+
- `dist/`: bundled output (ESM + type declarations), built by [tsdown](https://tsdown.dev/)
|
|
13
|
+
|
|
14
|
+
## Scripts
|
|
15
|
+
|
|
16
|
+
Local development needs [Node.js](https://nodejs.org/) v22+ and [pnpm](https://pnpm.io/).
|
|
17
|
+
|
|
18
|
+
| Command | Description |
|
|
19
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
20
|
+
| `pnpm dev` | Rebuild on change (`tsdown --watch`) |
|
|
21
|
+
| `pnpm build` | Bundle the library to `dist/` |
|
|
22
|
+
| `pnpm test` | Run tests with [Vitest](https://vitest.dev/) |
|
|
23
|
+
| `pnpm lint` | Lint with [ESLint](https://eslint.org/), [oxfmt](https://oxc.rs/docs/guide/usage/formatter), and [knip](https://knip.dev/) |
|
|
24
|
+
| `pnpm fix` | Auto-fix formatting and lint issues |
|
|
25
|
+
| `pnpm typecheck` | Type-check with `tsc` |
|
|
26
|
+
|
|
27
|
+
## Publishing
|
|
28
|
+
|
|
29
|
+
Releases are automated with [release-please](https://github.com/googleapis/release-please) and npm [trusted publishing](https://docs.npmjs.com/trusted-publishers/) (OIDC). No tokens to manage.
|
|
30
|
+
|
|
31
|
+
1. **First release (manual).** OIDC can't create a brand-new package, so publish the first version by hand:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pnpm login
|
|
35
|
+
pnpm build
|
|
36
|
+
pnpm publish
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. **Enable OIDC.** On [npmjs.com](https://www.npmjs.com/), open the package → **Settings → Trusted Publisher → GitHub Actions**, and set the workflow filename to `release.yml`.
|
|
40
|
+
|
|
41
|
+
3. **Future releases (automatic).** Push [Conventional Commits](https://www.conventionalcommits.org/) (`fix:`, `feat:`, …) to your default branch (usually `master` or `main`); [release-please](https://github.com/googleapis/release-please) opens a release PR that bumps the version, updates the changelog, and publishes on merge.
|
|
42
|
+
|
|
43
|
+
## Sponsors
|
|
44
|
+
|
|
45
|
+
<p align="center">
|
|
46
|
+
<a href="https://github.com/sponsors/ocavue">
|
|
47
|
+
<img src="https://cdn.jsdelivr.net/gh/ocavue/sponsors/sponsorkit/sponsors.svg" alt="My Sponsors">
|
|
48
|
+
</a>
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
[MIT](./LICENSE) © [ocavue](https://github.com/ocavue)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";cAAa;cACA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export const one = 1\nexport const two = 2\n"],"mappings":";AAAA,MAAa,MAAM;AACnB,MAAa,MAAM"}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eslint-plugin-ocavue",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "TypeScript starter kit",
|
|
6
|
+
"author": "ocavue <ocavue@gmail.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"funding": "https://github.com/sponsors/ocavue",
|
|
9
|
+
"homepage": "https://github.com/ocavue/starter-ts#readme",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/ocavue/starter-ts.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": "https://github.com/ocavue/starter-ts/issues",
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"main": "./dist/index.js",
|
|
18
|
+
"module": "./dist/index.js",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"src"
|
|
29
|
+
],
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@ocavue/eslint-config": "^4.13.5",
|
|
32
|
+
"@ocavue/tsconfig": "^0.7.1",
|
|
33
|
+
"@types/node": "^24.0.0",
|
|
34
|
+
"eslint": "^10.9.1",
|
|
35
|
+
"knip": "^6.33.0",
|
|
36
|
+
"oxfmt": "^0.65.0",
|
|
37
|
+
"tsdown": "^0.22.14",
|
|
38
|
+
"typescript": "^6.0.3",
|
|
39
|
+
"vite": "^8.2.2",
|
|
40
|
+
"vitest": "^4.1.11"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsdown",
|
|
44
|
+
"dev": "tsdown --watch",
|
|
45
|
+
"lint": "pnpm run lint:eslint && pnpm run lint:oxfmt && pnpm run lint:knip",
|
|
46
|
+
"lint:oxfmt": "oxfmt --check",
|
|
47
|
+
"lint:eslint": "eslint",
|
|
48
|
+
"lint:knip": "knip",
|
|
49
|
+
"fix": "pnpm run fix:oxfmt && pnpm run fix:eslint",
|
|
50
|
+
"fix:oxfmt": "oxfmt",
|
|
51
|
+
"fix:eslint": "eslint --fix",
|
|
52
|
+
"test": "vitest",
|
|
53
|
+
"typecheck": "tsc -b"
|
|
54
|
+
}
|
|
55
|
+
}
|
package/src/index.ts
ADDED