Skip to content

Commit 4761456

Browse files
committed
Lint setup
1 parent be157d2 commit 4761456

File tree

4 files changed

+352
-0
lines changed

4 files changed

+352
-0
lines changed

.gherkin-lintrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"indentation": [
3+
"on",
4+
{
5+
"Feature": 0,
6+
"Background": 2,
7+
"Scenario": 2,
8+
"Step": 4,
9+
"given": 4,
10+
"and": 4
11+
}
12+
],
13+
"no-dupe-feature-names": "on",
14+
"no-dupe-scenario-names": "off",
15+
"no-empty-file": "on",
16+
"no-files-without-scenarios": "on",
17+
"no-multiple-empty-lines": "on",
18+
"no-partially-commented-tag-lines": "on",
19+
"no-trailing-spaces": "on",
20+
"no-unnamed-features": "on",
21+
"no-unnamed-scenarios": "on",
22+
"no-scenario-outlines-without-examples": "on"
23+
}

.github/workflows/lint-gherkin.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Gherkin Linting
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- master
8+
workflow_dispatch:
9+
workflow_call:
10+
11+
jobs:
12+
13+
gherkin-lint:
14+
name: Lint Gherkin Feature files
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: bahmutov/npm-install@v1
19+
- run: npm run lint

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "database-command",
3+
"version": "1.0.0",
4+
"description": "ernilambar/database-command",
5+
"main": "index.js",
6+
"scripts": {
7+
"lint": "node ./node_modules/gherkin-lint/dist/main.js -i \"vendor/**\""
8+
},
9+
"keywords": [],
10+
"author": "",
11+
"license": "ISC",
12+
"devDependencies": {
13+
"gherkin-lint": "^4.2.4"
14+
}
15+
}

pnpm-lock.yaml

Lines changed: 295 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)