Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Formatter
on:
push:
pull_request:
branches: [master, main]
branches: [main, master]

jobs:
changes:
Expand Down
36 changes: 21 additions & 15 deletions .github/workflows/eslint.yml → .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: ESLint
name: Linter

on:
push:
Expand All @@ -21,6 +21,8 @@ jobs:
filters: |
eslint:
- '**.js,**.jsx,**.ts,**.tsx'
stylelint:
- '**.css'

eslint:
name: ESLint
Expand All @@ -33,21 +35,25 @@ jobs:
with:
ref: ${{ github.head_ref }}

- name: Cache Node Modules
uses: actions/cache@v3
id: node_modules_cache_id
with:
path: "**/node_modules"
key: ${{ runner.os }}-eslint

- name: Install Node Mudules
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: npm install \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser eslint \
eslint-config-prettier \
eslint-plugin-react
shell: bash
uses: ./.github/actions/install_node_modules

- name: Run ESLint
run: npx eslint . --ext .js,.jsx,.ts,.tsx

stylelint:
name: Stylelint
needs: changes
if: needs.changes.outputs.stylelint == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Install Node Mudules
uses: ./.github/actions/install_node_modules

- name: Run Stylelint
run: npx stylelint "**/*.css"
5 changes: 5 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/my-website
/src/components/InteractiveCodeEditor/styles.module.css
/src/components/BrowserWindow/styles.module.css

build
6 changes: 6 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-prettier"],
"rules": {
"selector-class-pattern": null
}
}
Loading