-
-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format all file types supported by Prettier #1686
base: master
Are you sure you want to change the base?
Changes from all commits
0a45ff8
34167a1
5c1e914
e6da0a7
a4de0a8
b8937f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
extends: | ||
- eslint-config-shakacode | ||
- prettier | ||
- prettier/react | ||
|
||
plugins: | ||
- import | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -7,7 +7,7 @@ on: | |||||||||||||||||||||||||||||||||||||||||||||
pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
jobs: | ||||||||||||||||||||||||||||||||||||||||||||||
examples: | ||||||||||||||||||||||||||||||||||||||||||||||
examples: | ||||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||||
SKIP_YARN_COREPACK_CHECK: 0 | ||||||||||||||||||||||||||||||||||||||||||||||
strategy: | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -16,79 +16,79 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||
versions: ['oldest', 'newest'] | ||||||||||||||||||||||||||||||||||||||||||||||
runs-on: ubuntu-22.04 | ||||||||||||||||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||||||||||||||||
- uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You may prefer to hide whitespace while reviewing. |
||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
persist-credentials: false | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Get changed files | ||||||||||||||||||||||||||||||||||||||||||||||
id: changed-files | ||||||||||||||||||||||||||||||||||||||||||||||
uses: tj-actions/changed-files@v44 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
files: | | ||||||||||||||||||||||||||||||||||||||||||||||
lib/generators/** | ||||||||||||||||||||||||||||||||||||||||||||||
rakelib/example_type.rb | ||||||||||||||||||||||||||||||||||||||||||||||
rakelib/example_config.yml | ||||||||||||||||||||||||||||||||||||||||||||||
rakelib/examples.rake | ||||||||||||||||||||||||||||||||||||||||||||||
rakelib/run_rspec.rake | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Setup Ruby | ||||||||||||||||||||||||||||||||||||||||||||||
uses: ruby/setup-ruby@v1 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
ruby-version: ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }} | ||||||||||||||||||||||||||||||||||||||||||||||
bundler: 2.5.9 | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Setup Node | ||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
node-version: 20 | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Print system information | ||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Linux release: "; cat /etc/issue | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Current user: "; whoami | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Current directory: "; pwd | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Ruby version: "; ruby -v | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Node version: "; node -v | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Yarn version: "; yarn --version | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Bundler version: "; bundle --version | ||||||||||||||||||||||||||||||||||||||||||||||
- name: run conversion script to support shakapacker v6 | ||||||||||||||||||||||||||||||||||||||||||||||
if: matrix.versions == 'oldest' | ||||||||||||||||||||||||||||||||||||||||||||||
run: script/convert | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Save root node_modules to cache | ||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/cache@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
path: node_modules | ||||||||||||||||||||||||||||||||||||||||||||||
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }} | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Save root ruby gems to cache | ||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/cache@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
path: vendor/bundle | ||||||||||||||||||||||||||||||||||||||||||||||
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }} | ||||||||||||||||||||||||||||||||||||||||||||||
- id: get-sha | ||||||||||||||||||||||||||||||||||||||||||||||
run: echo "::set-output name=sha::$(git rev-parse HEAD)" | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Install Node modules with Yarn for renderer package | ||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||
yarn install --no-progress --no-emoji | ||||||||||||||||||||||||||||||||||||||||||||||
sudo yarn global add yalc | ||||||||||||||||||||||||||||||||||||||||||||||
- name: yalc publish for react-on-rails | ||||||||||||||||||||||||||||||||||||||||||||||
run: yalc publish | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Install Ruby Gems for package | ||||||||||||||||||||||||||||||||||||||||||||||
run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3 | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Ensure minimum required Chrome version | ||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||
echo -e "Already installed $(google-chrome --version)\n" | ||||||||||||||||||||||||||||||||||||||||||||||
MINIMUM_REQUIRED_CHROME_VERSION=75 | ||||||||||||||||||||||||||||||||||||||||||||||
INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)" | ||||||||||||||||||||||||||||||||||||||||||||||
if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||||||||||||||||||||||||||||||||||||||||||||||
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | ||||||||||||||||||||||||||||||||||||||||||||||
sudo apt-get update | ||||||||||||||||||||||||||||||||||||||||||||||
sudo apt-get install google-chrome-stable | ||||||||||||||||||||||||||||||||||||||||||||||
echo -e "\nInstalled $(google-chrome --version)" | ||||||||||||||||||||||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Increase the amount of inotify watchers | ||||||||||||||||||||||||||||||||||||||||||||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Main CI | ||||||||||||||||||||||||||||||||||||||||||||||
if: steps.changed-files.outputs.any_changed == 'true' | ||||||||||||||||||||||||||||||||||||||||||||||
run: bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Store test results | ||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }} | ||||||||||||||||||||||||||||||||||||||||||||||
path: ~/rspec | ||||||||||||||||||||||||||||||||||||||||||||||
- uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
persist-credentials: false | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Get changed files | ||||||||||||||||||||||||||||||||||||||||||||||
id: changed-files | ||||||||||||||||||||||||||||||||||||||||||||||
uses: tj-actions/changed-files@v44 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
files: | | ||||||||||||||||||||||||||||||||||||||||||||||
lib/generators/** | ||||||||||||||||||||||||||||||||||||||||||||||
rakelib/example_type.rb | ||||||||||||||||||||||||||||||||||||||||||||||
rakelib/example_config.yml | ||||||||||||||||||||||||||||||||||||||||||||||
rakelib/examples.rake | ||||||||||||||||||||||||||||||||||||||||||||||
rakelib/run_rspec.rake | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Setup Ruby | ||||||||||||||||||||||||||||||||||||||||||||||
uses: ruby/setup-ruby@v1 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
ruby-version: ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }} | ||||||||||||||||||||||||||||||||||||||||||||||
bundler: 2.5.9 | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Setup Node | ||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
node-version: 20 | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Print system information | ||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Linux release: "; cat /etc/issue | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Current user: "; whoami | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Current directory: "; pwd | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Ruby version: "; ruby -v | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Node version: "; node -v | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Yarn version: "; yarn --version | ||||||||||||||||||||||||||||||||||||||||||||||
echo "Bundler version: "; bundle --version | ||||||||||||||||||||||||||||||||||||||||||||||
- name: run conversion script to support shakapacker v6 | ||||||||||||||||||||||||||||||||||||||||||||||
if: matrix.versions == 'oldest' | ||||||||||||||||||||||||||||||||||||||||||||||
run: script/convert | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Save root node_modules to cache | ||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/cache@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
path: node_modules | ||||||||||||||||||||||||||||||||||||||||||||||
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }} | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Save root ruby gems to cache | ||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/cache@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
path: vendor/bundle | ||||||||||||||||||||||||||||||||||||||||||||||
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }} | ||||||||||||||||||||||||||||||||||||||||||||||
- id: get-sha | ||||||||||||||||||||||||||||||||||||||||||||||
run: echo "::set-output name=sha::$(git rev-parse HEAD)" | ||||||||||||||||||||||||||||||||||||||||||||||
alexeyr-ci marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||
- name: Install Node modules with Yarn for renderer package | ||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||
yarn install --no-progress --no-emoji | ||||||||||||||||||||||||||||||||||||||||||||||
sudo yarn global add yalc | ||||||||||||||||||||||||||||||||||||||||||||||
- name: yalc publish for react-on-rails | ||||||||||||||||||||||||||||||||||||||||||||||
run: yalc publish | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Install Ruby Gems for package | ||||||||||||||||||||||||||||||||||||||||||||||
run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3 | ||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Improve shell script reliability. The pattern - run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
+ run: |
+ bundle lock --add-platform 'x86_64-linux'
+ if bundle check --path=vendor/bundle; then
+ echo "Bundle check passed"
+ else
+ bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
+ fi 📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.4)72-72: shellcheck reported issue in this script: SC2015:info:1:43: Note that A && B || C is not if-then-else. C may run when A is true (shellcheck) |
||||||||||||||||||||||||||||||||||||||||||||||
- name: Ensure minimum required Chrome version | ||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||
echo -e "Already installed $(google-chrome --version)\n" | ||||||||||||||||||||||||||||||||||||||||||||||
MINIMUM_REQUIRED_CHROME_VERSION=75 | ||||||||||||||||||||||||||||||||||||||||||||||
INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)" | ||||||||||||||||||||||||||||||||||||||||||||||
if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||||||||||||||||||||||||||||||||||||||||||||||
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | ||||||||||||||||||||||||||||||||||||||||||||||
sudo apt-get update | ||||||||||||||||||||||||||||||||||||||||||||||
sudo apt-get install google-chrome-stable | ||||||||||||||||||||||||||||||||||||||||||||||
echo -e "\nInstalled $(google-chrome --version)" | ||||||||||||||||||||||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+74
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix numeric comparison in shell script. Use - if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
+ if [[ $INSTALLED_CHROME_MAJOR_VERSION -lt $MINIMUM_REQUIRED_CHROME_VERSION ]]; then 📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.4)74-74: shellcheck reported issue in this script: SC2071:error:4:39: < is for string comparisons. Use -lt instead (shellcheck) |
||||||||||||||||||||||||||||||||||||||||||||||
- name: Increase the amount of inotify watchers | ||||||||||||||||||||||||||||||||||||||||||||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Main CI | ||||||||||||||||||||||||||||||||||||||||||||||
if: steps.changed-files.outputs.any_changed == 'true' | ||||||||||||||||||||||||||||||||||||||||||||||
run: bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples | ||||||||||||||||||||||||||||||||||||||||||||||
- name: Store test results | ||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||
name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }} | ||||||||||||||||||||||||||||||||||||||||||||||
path: ~/rspec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in
eslint-prettier-config
.