Skip to content

Commit

Permalink
feat: generate provenance statements for publish (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfield550 authored Jan 3, 2025
1 parent 95a9f34 commit 8b4454c
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 25 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ jobs:
- run: pnpm typegen
if: ${{steps.release.outputs['packages/eslint-config--release_created'] || steps.release.outputs['packages/eslint-parser-plain--release_created'] || steps.release.outputs['packages/eslint-plugin-format--release_created']}}

- run: pnpm build
if: ${{steps.release.outputs['packages/eslint-config--release_created'] || steps.release.outputs['packages/eslint-parser-plain--release_created'] || steps.release.outputs['packages/eslint-plugin-format--release_created']}}

- run: pnpm exec jiek publish --no-bumper --filter @biscuittin/eslint-config
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Expand Down
1 change: 1 addition & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dictionaries: []
words:
- arthurgeron
- auvred
- biscuittin
- bttin
- callees
- cjsx
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/BiscuitTin/eslint-config.git"
"url": "git+https://github.com/BiscuitTin/eslint-config.git"
},
"engines": {
"node": ">=22.12.0 <23",
Expand Down
12 changes: 8 additions & 4 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/BiscuitTin/eslint-config.git",
"url": "git+https://github.com/BiscuitTin/eslint-config.git",
"directory": "packages/eslint-config"
},
"bugs": "https://github.com/BiscuitTin/eslint-config/issues",
Expand All @@ -16,13 +16,17 @@
".": "./src/index.ts"
},
"files": [
"dist",
"src"
"LICENSE",
"README.md",
"dist"
],
"publishConfig": {
"provenance": true
},
"scripts": {
"build:inspector": "eslint-config-inspector build --config eslint-inspector.config.ts",
"dev": "eslint-config-inspector --config eslint-inspector.config.ts",
"prepublish": "jiek build && jiek",
"prepublish": "jiek build --noMin && jiek",
"postpublish": "jiek"
},
"peerDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/src/configs/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export function json(options: OptionsJson = {}): TypedFlatConfigItem[] {
'engines',
'activationEvents',
'contributes',
'publishConfig',
'scripts',
'peerDependencies',
'peerDependenciesMeta',
Expand Down
22 changes: 12 additions & 10 deletions packages/eslint-parser-plain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Allow you to parse various types of files with ESLint, a fork of [Ray's](https://github.com/so1ve/eslint-parser-plain) ([@so1ve](https://github.com/so1ve)).

The difference from the original package is that this package fixes [issues with ESLint errors in specific cases caused by missing meta data](https://github.com/so1ve/eslint-parser-plain/pull/79).

## Usages

### Install
Expand All @@ -22,34 +24,34 @@ pnpm add -D @biscuittin/eslint-parser-plain

We recommend using [ESLint's Flat Config format](https://eslint.org/docs/latest/use/configure/configuration-files-new).

```typescript
import parserPlain from "@biscuittin/eslint-parser-plain"
```javascript
import parserPlain from '@biscuittin/eslint-parser-plain'

export default [
{
files: ["*.md"],
files: ['*.md'],
parser: parserPlain,
rules: {
"prettier/prettier": ["error", { parser: "markdown" }],
'prettier/prettier': ['error', { parser: 'markdown' }],
},
},
];
]
```

Or legacy config format:

```typescript
```javascript
module.exports = {
overrides: [
{
files: ["*.md"],
parser: "eslint-parser-plain",
files: ['*.md'],
parser: 'eslint-parser-plain',
rules: {
"prettier/prettier": ["error", { parser: "markdown" }],
'prettier/prettier': ['error', { parser: 'markdown' }],
},
},
],
};
}
```

## Credits
Expand Down
12 changes: 9 additions & 3 deletions packages/eslint-parser-plain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,29 @@
"homepage": "https://github.com/BiscuitTin/eslint-config/tree/main/packages/eslint-parser-plain#readme",
"repository": {
"type": "git",
"url": "https://github.com/BiscuitTin/eslint-config.git",
"url": "git+https://github.com/BiscuitTin/eslint-config.git",
"directory": "packages/eslint-parser-plain"
},
"bugs": "https://github.com/BiscuitTin/eslint-config/issues",
"keywords": [
"eslint",
"eslint-parser"
"eslint-parser",
"eslint-parser-plain"
],
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
},
"files": [
"LICENSE",
"README.md",
"dist"
],
"publishConfig": {
"provenance": true
},
"scripts": {
"prepublish": "jiek build && jiek",
"prepublish": "jiek build --noMin && jiek",
"postpublish": "jiek"
},
"peerDependencies": {
Expand Down
13 changes: 9 additions & 4 deletions packages/eslint-plugin-format/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
"description": "Format various languages with formatters in ESLint, a fork of Antfu's, with support for configuration files.",
"author": "Biscuit Tin <[email protected]>",
"license": "MIT",
"homepage": "https://github.com/BiscuitTin/eslint-config/tree/main/packages/eslint-plugin-format#readme",
"repository": {
"type": "git",
"url": "https://github.com/BiscuitTin/eslint-config.git",
"url": "git+https://github.com/BiscuitTin/eslint-config.git",
"directory": "packages/eslint-plugin-format"
},
"bugs": "https://github.com/BiscuitTin/eslint-config/issues",
Expand All @@ -27,11 +28,15 @@
"./rule-options": "./src/rule-options.ts"
},
"files": [
"dist",
"src"
"LICENSE",
"README.md",
"dist"
],
"publishConfig": {
"provenance": true
},
"scripts": {
"prepublish": "jiek build && jiek",
"prepublish": "jiek build --noMin && jiek",
"postpublish": "jiek"
},
"peerDependencies": {
Expand Down

0 comments on commit 8b4454c

Please sign in to comment.