Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Squash merge branch linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Rumperuu committed Apr 26, 2021
1 parent 0c7c0d1 commit c8950e6
Show file tree
Hide file tree
Showing 35 changed files with 23,564 additions and 9,450 deletions.
33 changes: 0 additions & 33 deletions .distignore

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc.js

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Code Linting

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
lint:
name: Lint all code
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-reqs

- name: Validate workflow files (YAML)
run: npm run validate:yaml

- name: Lint Plugin code (PHP)
run: composer run lint:php

- name: Lint Plugin scripts (JS)
run: composer run format:js:fix && composer run lint:js

#- name: Lint stylesheets (CSS)
# run: composer run lint:css

#- name: Lint templates (HTML)
# run: composer run lint:html

- name: Lint documentation (Markdown)
run: composer run lint:md
1 change: 1 addition & 0 deletions .github/workflows/ossar-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
OSSAR-Scan:
# OSSAR runs on windows-latest.
# ubuntu-latest and macos-latest support coming soon
name: Scan code with OSSAR
runs-on: windows-latest

steps:
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/php.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Release Handler
name: Pre-release Handler

# Action runs when a new release is published.
on:
release:
types: [published]

jobs:
release-new:
name: Issue new release
build:
name: Build the Plugin for pre-release
if: "github.event.release.prerelease"
runs-on: ubuntu-latest

steps:
Expand All @@ -16,7 +16,7 @@ jobs:

- name: Install dependencies
run: |
composer install --no-dev --optimize-autoloader
composer install --no-dev --optimize-autoloader --no-progress
- name: Build Plugin
run: |
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
name: Snyk

on: push

jobs:
security:
name: Scan for vulnerabilities
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/php@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --all-projects
- name: Checkout code
uses: actions/checkout@master

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/php@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --all-projects
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,8 @@ tmp/

!.editorconfig
!.phpcs.xml.dist
!.eslintrc.js
!.eslintignore
!.php-commitizen.php
!.prettierignore
!.prettierrc
!.stylelintignore
!.stylelintrc.json
!.htmlhintrc

# Track favicon files, if they exist.
!android-chrome-*.png
Expand Down
22 changes: 22 additions & 0 deletions .htmlhintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"style-disabled": true,
"head-script-disabled": true,
"attr-lowercase": true,
"attr-no-duplication": true,
"attr-no-unnecessary-whitespace": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"alt-require": true,
"input-requires-label": true,
"href-abs-or-rel": "rel",
"tagname-lowercase": true,
"empty-tag-not-self-closed": true,
"src-not-empty": true,
"id-class-ad-disabled": true,
"id_class_value": "underline",
"id-unique": true,
"inline-script-disabled": true,
"inline-style-disabled": true,
"space-tab-mixed-disabled": true
}
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

2 changes: 0 additions & 2 deletions .stylelintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .stylelintrc.json

This file was deleted.

Loading

0 comments on commit c8950e6

Please sign in to comment.