From c69914effc1f222d2b31d2ed14d1efda90575c9f Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 24 Nov 2024 02:08:13 +0800 Subject: [PATCH] ci: avoid repeated runs of stylelint (#2057) --- .github/workflows/style-lint.yml | 25 ----------------------- .stylelintrc.json | 30 +++++++++++++++++++++++++++ package.json | 35 -------------------------------- 3 files changed, 30 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/style-lint.yml create mode 100644 .stylelintrc.json diff --git a/.github/workflows/style-lint.yml b/.github/workflows/style-lint.yml deleted file mode 100644 index 5cb38a7..0000000 --- a/.github/workflows/style-lint.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Style Lint - -on: - push: - branches: - - master - - "hotfix/*" - paths: ["_sass/**/*.scss"] - pull_request: - paths: ["_sass/**/*.scss"] - -jobs: - stylelint: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: lts/* - - run: npm i - - run: npm test diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..57dd7d6 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,30 @@ +{ + "extends": "stylelint-config-standard-scss", + "rules": { + "no-descending-specificity": null, + "shorthand-property-no-redundant-values": null, + "at-rule-no-vendor-prefix": null, + "property-no-vendor-prefix": null, + "selector-no-vendor-prefix": null, + "value-no-vendor-prefix": null, + "color-function-notation": "legacy", + "alpha-value-notation": "number", + "selector-not-notation": "simple", + "color-hex-length": "long", + "declaration-block-single-line-max-declarations": 3, + "scss/operator-no-newline-after": null, + "rule-empty-line-before": [ + "always", + { + "ignore": ["after-comment", "first-nested"] + } + ], + "value-keyword-case": [ + "lower", + { + "ignoreProperties": ["/^\\$/"] + } + ], + "media-feature-range-notation": "prefix" + } +} diff --git a/package.json b/package.json index 3447784..d6beea0 100644 --- a/package.json +++ b/package.json @@ -68,41 +68,6 @@ ] } }, - "stylelint": { - "extends": "stylelint-config-standard-scss", - "rules": { - "no-descending-specificity": null, - "shorthand-property-no-redundant-values": null, - "at-rule-no-vendor-prefix": null, - "property-no-vendor-prefix": null, - "selector-no-vendor-prefix": null, - "value-no-vendor-prefix": null, - "color-function-notation": "legacy", - "alpha-value-notation": "number", - "selector-not-notation": "simple", - "color-hex-length": "long", - "declaration-block-single-line-max-declarations": 3, - "scss/operator-no-newline-after": null, - "rule-empty-line-before": [ - "always", - { - "ignore": [ - "after-comment", - "first-nested" - ] - } - ], - "value-keyword-case": [ - "lower", - { - "ignoreProperties": [ - "/^\\$/" - ] - } - ], - "media-feature-range-notation": "prefix" - } - }, "release": { "branches": [ "production"