Skip to content

Commit 4a2f39c

Browse files
authored
fix: remove src on publish package (#9)
use npm trusted publisher node-modules/github-actions#14 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated workflow configuration for releases and adjusted secrets used during publishing. * Simplified linting configuration to use an external shared config and removed local linting rules. * Added a new development dependency for linting configuration. * Modified package contents to include only the distribution folder in published packages. * **Documentation** * Rearranged badge order in the README for improved clarity. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 983da2f commit 4a2f39c

File tree

4 files changed

+9
-127
lines changed

4 files changed

+9
-127
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ on:
77
jobs:
88
release-to-npm:
99
name: NPM
10-
uses: node-modules/github-actions/.github/workflows/node-release.yml@master
10+
uses: node-modules/github-actions/.github/workflows/npm-release.yml@master
1111
secrets:
12-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1312
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
1413

1514
release-to-jsr:

.oxlintrc.json

Lines changed: 4 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"$schema": "./node_modules/oxlint/configuration_schema.json",
33
"env": {
4-
"node": true,
5-
"mocha": true
4+
"node": true
65
},
76
"categories": {
87
"correctness": "error",
@@ -22,123 +21,7 @@
2221
"promise",
2322
"oxc"
2423
],
25-
"rules": {
26-
// eslint
27-
"constructor-super": "error",
28-
"getter-return": "error",
29-
"no-undef": "error",
30-
"no-unreachable": "error",
31-
"no-var": "error",
32-
"no-eq-null": "error",
33-
"no-await-in-loop": "allow",
34-
"eqeqeq": ["error", "smart"],
35-
"init-declarations": "allow",
36-
"curly": "allow",
37-
"no-ternary": "allow",
38-
"max-params": ["error", 5],
39-
"no-await-expression-member": "error",
40-
"no-continue": "allow",
41-
"guard-for-in": "allow",
42-
"func-style": "allow",
43-
"sort-imports": "allow",
44-
"yoda": "allow",
45-
"sort-keys": "allow",
46-
"no-magic-numbers": "allow",
47-
"no-duplicate-imports": "error",
48-
"no-multi-assign": "error",
49-
"func-names": "error",
50-
"default-param-last": "error",
51-
"prefer-object-spread": "error",
52-
"no-undefined": "allow",
53-
"no-plusplus": "allow",
54-
// maybe warn
55-
"no-console": "warn",
56-
"no-extraneous-class": "allow",
57-
"no-empty-function": "allow",
58-
"max-depth": ["error", 6],
59-
"max-lines-per-function": "allow",
60-
"no-lonely-if": "error",
61-
"max-lines": "allow",
62-
"require-await": "allow",
63-
"max-nested-callbacks": ["error", 5],
64-
"max-classes-per-file": "allow",
65-
"radix": "allow",
66-
"no-negated-condition": "error",
67-
"no-else-return": "error",
68-
"no-throw-literal": "error",
69-
70-
// import
71-
"import/exports-last": "allow",
72-
"import/max-dependencies": "allow",
73-
"import/no-cycle": "error",
74-
"import/no-anonymous-default-export": "allow",
75-
"import/no-namespace": "error",
76-
"import/named": "error",
77-
"import/export": "error",
78-
"import/no-default-export": "allow",
79-
"import/unambiguous": "error",
80-
"import/group-exports": "allow",
81-
"import/consistent-type-specifier-style": "allow",
82-
83-
// promise
84-
"promise/no-return-wrap": "error",
85-
"promise/param-names": "error",
86-
"promise/prefer-await-to-callbacks": "error",
87-
"promise/prefer-await-to-then": "error",
88-
"promise/prefer-catch": "error",
89-
"promise/no-return-in-finally": "error",
90-
"promise/avoid-new": "error",
91-
92-
// unicorn
93-
"unicorn/error-message": "error",
94-
"unicorn/no-null": "allow",
95-
"unicorn/filename-case": "allow",
96-
"unicorn/prefer-structured-clone": "error",
97-
"unicorn/prefer-logical-operator-over-ternary": "error",
98-
"unicorn/prefer-number-properties": "error",
99-
"unicorn/prefer-array-some": "error",
100-
"unicorn/prefer-string-slice": "error",
101-
// "unicorn/no-null": "error",
102-
"unicorn/throw-new-error": "error",
103-
"unicorn/catch-error-name": "allow",
104-
"unicorn/prefer-spread": "allow",
105-
"unicorn/numeric-separators-style": "error",
106-
"unicorn/prefer-string-raw": "error",
107-
"unicorn/text-encoding-identifier-case": "error",
108-
"unicorn/no-array-for-each": "error",
109-
"unicorn/explicit-length-check": "error",
110-
"unicorn/no-lonely-if": "error",
111-
"unicorn/no-useless-undefined": "allow",
112-
"unicorn/prefer-date-now": "error",
113-
"unicorn/no-static-only-class": "allow",
114-
"unicorn/no-typeof-undefined": "error",
115-
"unicorn/prefer-negative-index": "error",
116-
"unicorn/no-anonymous-default-export": "allow",
117-
118-
// oxc
119-
"oxc/no-map-spread": "error",
120-
"oxc/no-rest-spread-properties": "allow",
121-
"oxc/no-optional-chaining": "allow",
122-
"oxc/no-async-await": "allow",
123-
124-
// typescript
125-
"typescript/explicit-function-return-type": "allow",
126-
"typescript/consistent-type-imports": "error",
127-
"typescript/consistent-type-definitions": "error",
128-
"typescript/consistent-indexed-object-style": "allow",
129-
"typescript/no-inferrable-types": "error",
130-
"typescript/array-type": "error",
131-
"typescript/no-non-null-assertion": "error",
132-
"typescript/no-explicit-any": "error",
133-
"typescript/no-import-type-side-effects": "error",
134-
"typescript/no-dynamic-delete": "error",
135-
"typescript/prefer-ts-expect-error": "error",
136-
"typescript/ban-ts-comment": "error",
137-
"typescript/prefer-enum-initializers": "error",
138-
139-
// jsdoc
140-
"jsdoc/require-returns": "allow",
141-
"jsdoc/require-param": "allow"
142-
},
143-
"ignorePatterns": ["index.d.ts", "test/fixtures/**", "__snapshots__"]
24+
"ignorePatterns": ["index.d.ts", "test/fixtures/**", "__snapshots__"],
25+
"rules": {},
26+
"extends": ["./node_modules/@eggjs/oxlint-config/.oxlintrc.json"]
14427
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# read-env-value
22

3-
[![JSR](https://jsr.io/badges/@nm/read-env-value)](https://jsr.io/@nm/read-env-value)
4-
[![JSR Score](https://jsr.io/badges/@nm/read-env-value/score)](https://jsr.io/@nm/read-env-value)
53
[![NPM Version](https://img.shields.io/npm/v/read-env-value)](https://www.npmjs.com/package/read-env-value)
64
[![NPM Downloads](https://img.shields.io/npm/dm/read-env-value)](https://www.npmjs.com/package/read-env-value)
75
[![NPM License](https://img.shields.io/npm/l/read-env-value)](https://github.com/node-modules/read-env-value/blob/master/LICENSE)
6+
[![JSR](https://jsr.io/badges/@nm/read-env-value)](https://jsr.io/@nm/read-env-value)
7+
[![JSR Score](https://jsr.io/badges/@nm/read-env-value/score)](https://jsr.io/@nm/read-env-value)
88
[![codecov](https://codecov.io/gh/node-modules/read-env-value/branch/master/graph/badge.svg)](https://codecov.io/gh/node-modules/read-env-value)
99
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/node-modules/read-env-value/ci.yml?branch=master)](https://github.com/node-modules/read-env-value/actions/workflows/ci.yml?query=branch%3Amaster)
1010
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"node": ">= 22.18.0"
2121
},
2222
"devDependencies": {
23+
"@eggjs/oxlint-config": "^1.0.0",
2324
"@eggjs/tsconfig": "3",
2425
"@types/node": "24",
2526
"c8": "10",
@@ -48,8 +49,7 @@
4849
]
4950
},
5051
"files": [
51-
"dist",
52-
"src"
52+
"dist"
5353
],
5454
"type": "module",
5555
"exports": "./dist/index.js",

0 commit comments

Comments
 (0)