Skip to content

Commit

Permalink
Merge pull request #574 from Extended-Thunder/prettier-workflow
Browse files Browse the repository at this point in the history
Prettier workflow
  • Loading branch information
jikamens authored Aug 9, 2023
2 parents fe40b94 + 9564462 commit bba6d73
Show file tree
Hide file tree
Showing 31 changed files with 3,773 additions and 2,579 deletions.
4 changes: 3 additions & 1 deletion .dir-locals.el
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
((js-mode . ((js-indent-level . 2))))
((js-mode . ((js-indent-level . 2)
(js-switch-indent-offset . 2)
(mode . prettier-js))))
12 changes: 6 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main ]
schedule:
- cron: '18 14 * * 1'

Expand All @@ -35,11 +35,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3.5.3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
23 changes: 23 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Prettier PR checker

# This action works with pull requests and pushes
on:
pull_request:
push:
branches:
- main

jobs:
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3.5.3

- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
# This part is also where you can pass other options, for example:
dry: True
prettier_options: --check .
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.html
*.md
*.yml
_locales
.github
contrib
package.json
test/diff_match_patch.js
utils/sugar-custom.js
utils/varNameValidator.js
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit bba6d73

Please sign in to comment.