Skip to content

Commit

Permalink
chore: include provenance when publishing and update README
Browse files Browse the repository at this point in the history
- Rename from `release.yml` to `npm-publish.yml`
- Include provenance when publishing with GH Actions
- Update README.md for `files`
  • Loading branch information
jeremy-code committed Apr 28, 2024
1 parent e3ea74e commit 41d036b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: Check out code
Expand All @@ -29,6 +32,7 @@ jobs:
- name: Build
run: pnpm build

- run: npm publish
- name: Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = [
js.configs.recommended,
next,
{
files: ["**/*.js", "**/*.mjs"],
files: ["**/*.js", "**/*.jsx"],
languageOptions: {
parser,
parserOptions: {
Expand All @@ -60,6 +60,23 @@ module.exports = [
];
```

Depending on your project, you may need to adjust the `files` and `ignore` properties such as:

```js
const js = require("@eslint/js");
const next = require("eslint-config-next-flat");
const parser = require("next/dist/compiled/babel/eslint-parser");

module.exports = [
{ ignore: [".next"] }, // Change if `distDir` in Next.js config is different
js.configs.recommended,
{
files: ["src", "pages", "components", "lib", "utils"], // Add your Next.js project directories
...next,
},
];
```

## License

`next-config-next-flat` is licensed under the [MIT license](LICENSE).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next-flat",
"version": "0.1.1",
"version": "0.1.2",
"description": "(Tentative) ESLint Flat Config for Next.js",
"keywords": [
"eslint",
Expand Down

0 comments on commit 41d036b

Please sign in to comment.