forked from fedi/mastodon
Separate Stylelint from Superlinter (#23303)
This commit is contained in:
parent
d9088ef327
commit
4917e38d94
48
.github/workflows/lint-css.yml
vendored
Normal file
48
.github/workflows/lint-css.yml
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
name: CSS Linting
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- 'stylelint.config.js'
|
||||||
|
- '**/*.css'
|
||||||
|
- '**/*.scss'
|
||||||
|
- '.github/workflows/lint-css.yml'
|
||||||
|
- '.github/stylelint-matcher.json'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- 'stylelint.config.js'
|
||||||
|
- '**/*.css'
|
||||||
|
- '**/*.scss'
|
||||||
|
- '.github/workflows/lint-css.yml'
|
||||||
|
- '.github/stylelint-matcher.json'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
|
||||||
|
- name: Install all yarn packages
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- uses: xt0rted/stylelint-problem-matcher@v1
|
||||||
|
|
||||||
|
- run: echo "::add-matcher::.github/stylelint-matcher.json"
|
||||||
|
|
||||||
|
- name: Stylelint
|
||||||
|
run: yarn test:lint:sass
|
13
.github/workflows/linter.yml
vendored
13
.github/workflows/linter.yml
vendored
|
@ -50,19 +50,8 @@ jobs:
|
||||||
# Full git history is needed to get a proper list of changed files within `super-linter`
|
# Full git history is needed to get a proper list of changed files within `super-linter`
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set-up Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version-file: .nvmrc
|
|
||||||
cache: yarn
|
|
||||||
- name: Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile
|
|
||||||
- name: Set-up RuboCop Problem Mathcher
|
- name: Set-up RuboCop Problem Mathcher
|
||||||
uses: r7kamura/rubocop-problem-matchers-action@v1
|
uses: r7kamura/rubocop-problem-matchers-action@v1
|
||||||
- name: Set-up Stylelint Problem Matcher
|
|
||||||
uses: xt0rted/stylelint-problem-matcher@v1
|
|
||||||
# https://github.com/xt0rted/stylelint-problem-matcher/issues/360
|
|
||||||
- run: echo "::add-matcher::.github/stylelint-matcher.json"
|
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# Run Linter against code base #
|
# Run Linter against code base #
|
||||||
|
@ -70,12 +59,10 @@ jobs:
|
||||||
- name: Lint Code Base
|
- name: Lint Code Base
|
||||||
uses: github/super-linter@v4
|
uses: github/super-linter@v4
|
||||||
env:
|
env:
|
||||||
CSS_FILE_NAME: stylelint.config.js
|
|
||||||
DEFAULT_BRANCH: main
|
DEFAULT_BRANCH: main
|
||||||
NO_COLOR: 1 # https://github.com/xt0rted/stylelint-problem-matcher/issues/360
|
NO_COLOR: 1 # https://github.com/xt0rted/stylelint-problem-matcher/issues/360
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
LINTER_RULES_PATH: .
|
LINTER_RULES_PATH: .
|
||||||
RUBY_CONFIG_FILE: .rubocop.yml
|
RUBY_CONFIG_FILE: .rubocop.yml
|
||||||
VALIDATE_ALL_CODEBASE: false
|
VALIDATE_ALL_CODEBASE: false
|
||||||
VALIDATE_CSS: true
|
|
||||||
VALIDATE_RUBY: true
|
VALIDATE_RUBY: true
|
||||||
|
|
Loading…
Reference in a new issue