diff --git a/.eslintrc.cjs b/.eslintrc.cjs index e7ab8f68..fece8743 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -12,4 +12,5 @@ module.exports = { parserOptions: { ecmaVersion: "latest", }, + ignorePatterns: ["/storybook-static", "/dist"], // Ignoriere die Ordner foo und bar }; diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d0c9b7f6..d681da19 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,19 +1,37 @@ name: build and deploy +env: + NODE_VERSION: "20" + on: [push] jobs: + lint: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: "npm" + - name: Install dependencies + run: npm ci + - name: Run formater and linter + run: npm run lint + build: runs-on: ubuntu-latest + needs: lint permissions: - contents: read # to be able to publish a GitHub release + contents: read steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: ${{ env.NODE_VERSION }} cache: "npm" - registry-url: "https://registry.npmjs.org" - run: npm ci # install dependencies - run: npm run build # build library - run: npm run build-storybook # build docs @@ -41,9 +59,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: ${{ env.NODE_VERSION }} cache: "npm" - registry-url: "https://registry.npmjs.org" - run: npm ci # install dependencies - name: Download build-results uses: actions/download-artifact@v4 diff --git a/package.json b/package.json index ca3ee3bf..bc452b26 100644 --- a/package.json +++ b/package.json @@ -33,12 +33,11 @@ "dist" ], "scripts": { - "build": "rimraf dist && npm run type-check && npm run build-only", + "build": "rimraf dist && npm run build-only", "test:unit": "vitest", "build-only": "vite build", - "type-check": "vue-tsc --build --force", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", - "format": "prettier --write ./", + "lint": "prettier . --check && eslint . --ignore-path .gitignore && vue-tsc -p tsconfig.json --emitDeclarationOnly --skipLibCheck --composite false", + "fix": "prettier . --write && eslint . --fix --ignore-path .gitignore", "semantic-release": "semantic-release", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build" diff --git a/src/components/Button/MucButton.vue b/src/components/Button/MucButton.vue index 4e2026e1..a3a19782 100644 --- a/src/components/Button/MucButton.vue +++ b/src/components/Button/MucButton.vue @@ -79,7 +79,9 @@ const buttonVariantClass = computed(() => { } }); -const iconAnimatedClass = computed(() => props.iconAnimated ? 'm-button--animated-right' : ''); +const iconAnimatedClass = computed(() => + props.iconAnimated ? "m-button--animated-right" : "" +); const handleClick = () => { emit("click");