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

Eslint & prettier #271

Merged
merged 4 commits into from
Jan 19, 2024
Merged
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
17 changes: 17 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
},
env: {
node: true
}
}
26 changes: 26 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PhpSchool.io

on:
push:
branches: [ master ]
pull_request:
branches: [ master, online ]

jobs:
build:
runs-on: ubuntu-latest
name: Eslint
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install NPM Dependencies
run: npm ci --no-audit --no-fund --prefer-offline

- name: Eslint
run: npm run lint
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
name: PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2

- name: Install Dependencies
- name: Install PHP Dependencies
run: composer install --prefer-dist

- name: Run phpunit tests
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PhpSchool.io

on:
push:
branches: [ master ]
pull_request:
branches: [ master, online ]

jobs:
build:
runs-on: ubuntu-latest
name: Eslint
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install NPM Dependencies
run: npm ci --no-audit --no-fund --prefer-offline

- name: Prettier
run: npm run prettier:ci
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 4,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
Loading