Skip to content

Commit

Permalink
Downgrade stylelint (#3197)
Browse files Browse the repository at this point in the history
* Downgrade stylelint

* typo

* [MegaLinter] Apply linters fixes

* Downgrade stylelint-config-standard

* Add phpcs GPG key

---------

Co-authored-by: nvuillam <nicolas.vuillamy@cloudity.com>
Co-authored-by: nvuillam <nvuillam@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 9, 2023
1 parent bc9e5c7 commit 913d5d2
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 44 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-linter.yml file, or with `oxsecurity/megalinter:beta` docker image

- Core
- Update base java apk package to openjdk 17 by @nvuillam in <https://github.com/oxsecurity/megalinter/pull/3160>
- Update dotnet linters to .NET 7 by @bdovaz in <https://github.com/oxsecurity/megalinter/pull/2402>

- Media
- [Try using MegaLinter (article in japanese)](https://future-architect.github.io/articles/20231129a/?s=03) by [Takashi Minayaga](https://future-architect.github.io/authors/%E5%AE%AE%E6%B0%B8%E5%B4%87%E5%8F%B2)


- New linters
- Add [clang-format](https://releases.llvm.org/16.0.0/tools/clang/docs/ClangFormat.html) c & cpp formatting linter including "apply fix" support
- Add [Roslynator](https://github.com/dotnet/roslynator) C# linter by @bdovaz in <https://github.com/oxsecurity/megalinter/pull/3155>

- Fixes
- Call jscpd with `--gitignore` to ignore copy-pastes in files matching `.gitignore`
- cpplint: Dynamically add the list of extensions from list of files in --extensions parameter

- Doc
- Fix mkdocs generation + CI control job by @nvuillam in <https://github.com/oxsecurity/megalinter/pull/3135>
- Add semgrep ruleset to validation schema by @wesley-dean-flexion in <https://github.com/oxsecurity/megalinter/pull/3164>
- Downgrade stylelint to avoid crash with not v16 compliant dependencies

- CI
- Add arguments to make use of pytest-xdist, by @echoix
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
typescript \
@coffeelint/cli \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
gherkin-lint \
Expand Down Expand Up @@ -625,7 +625,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P


# phpcs installation
RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192
RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192,95DE904AB800754A11D80B605E6DDE998AB73B8E


# phpstan installation
Expand Down
4 changes: 2 additions & 2 deletions flavors/c_cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
6 changes: 3 additions & 3 deletions flavors/cupcake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
typescript \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down Expand Up @@ -453,7 +453,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P
# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake

# phpcs installation
RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192
RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192,95DE904AB800754A11D80B605E6DDE998AB73B8E


# phpstan installation
Expand Down
4 changes: 2 additions & 2 deletions flavors/documentation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
4 changes: 2 additions & 2 deletions flavors/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
gherkin-lint \
Expand Down
4 changes: 2 additions & 2 deletions flavors/dotnetweb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
typescript \
@coffeelint/cli \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
gherkin-lint \
Expand Down
4 changes: 2 additions & 2 deletions flavors/go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
4 changes: 2 additions & 2 deletions flavors/java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
4 changes: 2 additions & 2 deletions flavors/javascript/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
typescript \
@coffeelint/cli \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
6 changes: 3 additions & 3 deletions flavors/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down Expand Up @@ -308,7 +308,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil


# phpcs installation
RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192
RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192,95DE904AB800754A11D80B605E6DDE998AB73B8E


# phpstan installation
Expand Down
4 changes: 2 additions & 2 deletions flavors/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
4 changes: 2 additions & 2 deletions flavors/ruby/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
4 changes: 2 additions & 2 deletions flavors/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
4 changes: 2 additions & 2 deletions flavors/salesforce/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
@salesforce/cli \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
4 changes: 2 additions & 2 deletions flavors/swift/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
4 changes: 2 additions & 2 deletions flavors/terraform/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss \
graphql \
Expand Down
4 changes: 2 additions & 2 deletions linters/css_stylelint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
#NPM__START
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
stylelint \
stylelint-config-standard \
stylelint@15.11.0 \
stylelint-config-standard@34.0.0 \
stylelint-config-sass-guidelines \
stylelint-scss && \
echo "Cleaning npm cache…" \
Expand Down
2 changes: 1 addition & 1 deletion linters/php_phpcs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI


# phpcs installation
RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192
RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192,95DE904AB800754A11D80B605E6DDE998AB73B8E


#OTHER__END
Expand Down
6 changes: 4 additions & 2 deletions megalinter/descriptors/css.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ linters:
- "stylelint myfile.css"
- "stylelint --config .stylelintrc.json myfile.css myfile2.css myfile3.css"
- "stylelint --fix --config .stylelintrc.json myfile.css myfile2.css myfile3.css"
downgraded_version: true
downgraded_reason: Dependencies not compliant yet with stylelint 16, we'll upgrade when they are ready :)
install:
npm:
- stylelint
- stylelint-config-standard
- stylelint@15.11.0
- stylelint-config-standard@34.0.0
- stylelint-config-sass-guidelines
- stylelint-scss
ide:
Expand Down
2 changes: 1 addition & 1 deletion megalinter/descriptors/php.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ linters:
install:
dockerfile:
- |
RUN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192
RUN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192,95DE904AB800754A11D80B605E6DDE998AB73B8E
ide:
atom:
- name: linter-phpcs
Expand Down

0 comments on commit 913d5d2

Please sign in to comment.