Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/eslint-yml #75

Merged
merged 8 commits into from
Nov 3, 2024
Merged
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
10 changes: 10 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -90,6 +90,16 @@ module.exports = {
'no-unsanitized/property': 'error',
},
},
{
extends: ['plugin:yml/prettier', 'plugin:yml/standard'],
files: ['*.yaml', '*.yml'],
parser: 'yaml-eslint-parser',
plugins: ['yml'],
rules: {
'yml/quotes': ['error', { prefer: 'single' }],
'yml/sort-keys': 'error',
},
},
],
parser: '@babel/eslint-parser',
parserOptions: {
1 change: 1 addition & 0 deletions .github/workflows/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('../../.eslintrc.cjs')
12 changes: 6 additions & 6 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
name: Continuous delivery (CD)

on:
pull_request:
types: [ closed ]

jobs:
publish-npm:
env:
@@ -36,3 +30,9 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Publish to npm
run: npm publish --provenance --access public

name: Continuous delivery (CD)

on:
pull_request:
types: [closed]
26 changes: 13 additions & 13 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
name: Continuous integration (CI)

on:
pull_request:
branches: [ main ]
push:
branches: [ main, feature/** ]

jobs:
test:
env:
@@ -15,11 +7,6 @@ jobs:
name: Test
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [ 18.20.4, 20.18.0 ]
os: [ macos-latest, ubuntu-latest, windows-latest ]

steps:
- name: Repository checkout
uses: actions/checkout@v4.2.2
@@ -36,3 +23,16 @@ jobs:

- name: Test
run: npm test

strategy:
matrix:
node-version: [18.20.4, 20.18.0]
os: [macos-latest, ubuntu-latest, windows-latest]

name: Continuous integration (CI)

on:
pull_request:
branches: [main]
push:
branches: [main, feature/**]
26 changes: 13 additions & 13 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
name: Security

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
schedule:
- cron: '25 16 * * 4'

jobs:
codeql:
env:
@@ -40,7 +30,7 @@ jobs:
- name: Initialization
uses: github/codeql-action/init@v3.27.0
with:
languages: 'javascript-typescript'
languages: javascript-typescript

- name: Analysis
uses: github/codeql-action/analyze@v3.27.0
@@ -70,10 +60,10 @@ jobs:
- name: Dependencies installation
run: npm ci

- name: Analysis
continue-on-error: true
- continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
name: Analysis
uses: snyk/actions/node@0.4.0
with:
args: --sarif-file-output=snyk.sarif
@@ -83,3 +73,13 @@ jobs:
with:
category: snyk-analysis
sarif_file: snyk.sarif

name: Security

on:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
- cron: 25 16 * * 4
75 changes: 72 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stassi/leaf",
"version": "0.0.74",
"version": "0.0.75",
"description": "Leaflet adapter.",
"keywords": [
"cartography",
@@ -32,7 +32,7 @@
"import:leaflet": "shx cp -r node_modules/leaflet/dist/* public/leaflet",
"preimport:leaflet:fullscreen": "shx mkdir -p public/leaflet/fullscreen",
"import:leaflet:fullscreen": "shx cp -r node_modules/leaflet-fullscreen/dist/* public/leaflet/fullscreen",
"lint": "eslint .",
"lint": "eslint . && eslint .github/workflows",
"prepublishOnly": "npm test",
"serve": "serve",
"serve:test": "serve -p 3001",
@@ -89,6 +89,7 @@
"eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-no-unsanitized": "^4.1.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-yml": "^1.15.0",
"expect-puppeteer": "^10.1.4",
"jest": "^29.7.0",
"jest-environment-puppeteer": "^10.1.4",
@@ -101,7 +102,8 @@
"shx": "^0.3.4",
"ts-jest": "^29.2.5",
"turbo": "^2.2.3",
"typescript": "^5.6.3"
"typescript": "^5.6.3",
"yaml-eslint-parser": "^1.2.3"
},
"packageManager": "npm@10.7.0",
"engines": {
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -2,9 +2,10 @@
"$schema": "https://turbo.build/schema.json",
"globalDependencies": [
".eslintrc.cjs",
".github/workflows/**",
".npmrc",
"package.json",
"package-lock.json",
"package.json",
"rollup.config.ts",
"tsconfig.json"
],