From 525ef7722859b6d61e6a2d6e159261b115fc7d4a Mon Sep 17 00:00:00 2001 From: Antonio Vivone Date: Thu, 16 May 2024 16:19:16 +0200 Subject: [PATCH] [14] Added lint action + added examples to eslint ignores (#15) * added lint action + added examples to eslint ignores * jobs, actions and files renamed * testing linting action * Revert "testing linting action" This reverts commit 212b19fd4866f33e318447d9be2c83776032fb2e. --- .eslintrc.cjs | 3 ++- .github/workflows/{storybook.yml => docs.yml} | 4 ++-- .github/workflows/rules.yml | 13 +++++++++++++ package.json | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) rename .github/workflows/{storybook.yml => docs.yml} (90%) create mode 100644 .github/workflows/rules.yml diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 72d66d2..eaf9054 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -15,5 +15,6 @@ module.exports = { }, rules: { 'vue/no-deprecated-slot-attribute': 0 - } + }, + ignorePatterns: ['src/components/examples/'] } diff --git a/.github/workflows/storybook.yml b/.github/workflows/docs.yml similarity index 90% rename from .github/workflows/storybook.yml rename to .github/workflows/docs.yml index 9960472..1f85469 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: Build and Deploy Storybook +name: Docs on: push: branches: @@ -7,7 +7,7 @@ permissions: contents: write jobs: - build-and-deploy: + build-and-deploy-storybook: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ diff --git a/.github/workflows/rules.yml b/.github/workflows/rules.yml new file mode 100644 index 0000000..136c1a0 --- /dev/null +++ b/.github/workflows/rules.yml @@ -0,0 +1,13 @@ +name: Rules +on: pull_request + +jobs: + check-linting: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v4 + - name: Clean install + run: npm ci + - name: Run lint + run: npm run lint diff --git a/package.json b/package.json index 07647bd..2cbb7d2 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "preview": "vite preview", "build-only": "vite build", "type-check": "vue-tsc --project .", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", + "lint": "eslint ./src --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore ", "format": "prettier --write src/", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build -o docs",