Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ on:
branches:
- main
- 'renovate/*'

permissions:
contents: read

jobs:
test:
uses: tryghost/actions/.github/workflows/lint-only.yml@22030a4f6255c29d15cb420287e68454a010e926 # main
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
strategy:
fail-fast: false
matrix:
node: [20, 22]
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false

- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
env:
FORCE_COLOR: 0
with:
node-version: ${{ matrix.node }}
cache: pnpm

- run: pnpm install --frozen-lockfile
- run: pnpm lint
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ rules you add come with an explanation!
## Basic setup
1. Make sure that `gstenv` is green. See our [Dev Environment](https://github.com/TryGhost/Team/blob/master/Engineering/Dev%20Environment.md) docs.
2. `git clone` this repo & `cd` into it as usual
3. Run `yarn install` to install dependencies.
3. Run `pnpm install` to install dependencies.

## Testing

Run `yarn link` inside of me, and then run `yarn link eslint-plugin-ghost`
Run `pnpm link --global` inside of me, and then run
`pnpm link --global eslint-plugin-ghost`
inside of the project you want to lint.

## Usage
Expand Down Expand Up @@ -46,7 +47,8 @@ module.exports = {

## Publishing

- `yarn ship` - `yarn ship`
- `pnpm ship` — choose a version interactively, publish it, and push the release commit and tag.
- `pnpm ship patch` — publish a specified release type (`patch`, `minor`, or `major`) non-interactively.

# Copyright & License

Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "eslint-plugin-ghost",
"version": "3.5.0",
"packageManager": "pnpm@10.34.5+sha512.a4ee05f2f73658255bd6a89859c065a45c28a57daefae2c893a168ee2b73168c37b91e83e57ea67654ad03f03031746430e8bce38e362e042605fb8abc80192e",
"description": "Shared eslint configurations",
"author": "Ghost Foundation",
"homepage": "https://github.com/TryGhost/eslint-plugin-ghost",
Expand All @@ -15,18 +16,19 @@
],
"scripts": {
"lint:code": "eslint *.js lib/ --ext .js --cache",
"lint": "yarn lint:code && yarn lint:test",
"lint": "pnpm lint:code && pnpm lint:test",
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache",
"test": "node --test 'test/*.test.js'",
"posttest": "yarn lint",
"preship": "yarn test",
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn publish && git push ${GHOST_UPSTREAM:-upstream} main --follow-tags; fi"
"test": "node --test test/*.test.js",
"posttest": "pnpm lint",
"preship": "pnpm test",
"ship": "pro-ship --publish"
},
"main": "lib/index.js",
"peerDependencies": {
"eslint": ">=5.11.0"
},
"devDependencies": {
"@tryghost/pro-ship": "1.1.7",
"eslint": "8.57.1",
"eslint-plugin-self": "1.2.1"
},
Expand Down
Loading