Skip to content

Commit e54f3c2

Browse files
committed
Enable Prettier on YAML
1 parent 1ffb14e commit e54f3c2

File tree

22 files changed

+467
-479
lines changed

22 files changed

+467
-479
lines changed

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ jobs:
145145
paths:
146146
- node_modules
147147

148-
149148
# Install Node modules for dummy app with Yarn and save them to cache.
150149
install-dummy-app-node-packages:
151150
docker: *docker-image

.eslintrc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@ env:
1616
jest: true
1717

1818
overrides:
19-
- files: ["**/*.ts", "**/*.tsx"]
20-
parser: "@typescript-eslint/parser"
19+
- files: ['**/*.ts', '**/*.tsx']
20+
parser: '@typescript-eslint/parser'
2121
parserOptions:
2222
ecmaVersion: 2018
2323
sourceType: module
24-
project: "./tsconfig.json"
24+
project: './tsconfig.json'
2525
extends:
2626
- eslint:recommended
2727
- plugin:@typescript-eslint/eslint-recommended
2828
- plugin:@typescript-eslint/recommended
2929
plugins:
30-
- "@typescript-eslint"
30+
- '@typescript-eslint'
3131
rules:
32-
"@typescript-eslint/no-namespace": 0
33-
"@typescript-eslint/no-shadow": ["error"]
32+
'@typescript-eslint/no-namespace': 0
33+
'@typescript-eslint/no-shadow': ['error']
3434

3535
rules:
3636
no-shadow: 0
3737
no-console: 0
3838
function-paren-newline: 0
3939
object-curly-newline: 0
40-
no-restricted-syntax: ["error", "SequenceExpression"]
40+
no-restricted-syntax: ['error', 'SequenceExpression']
4141
# https://stackoverflow.com/a/59268871/5241481
42-
import/extensions: ['error', 'ignorePackages', {"js": 'never',"ts": "never"}]
42+
import/extensions: ['error', 'ignorePackages', { 'js': 'never', 'ts': 'never' }]
4343

4444
# https://github.com/benmosher/eslint-plugin-import/issues/340
4545
import/no-extraneous-dependencies: 0
@@ -49,4 +49,4 @@ settings:
4949
- react-redux
5050
import/resolver:
5151
node:
52-
extensions: [".js", ".ts", ".d.ts"]
52+
extensions: ['.js', '.ts', '.d.ts']

.github/workflows/examples.yml

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
pull_request:
88

99
jobs:
10-
examples:
10+
examples:
1111
env:
1212
SKIP_YARN_COREPACK_CHECK: 0
1313
strategy:
@@ -16,79 +16,79 @@ jobs:
1616
versions: ['oldest', 'newest']
1717
runs-on: ubuntu-22.04
1818
steps:
19-
- uses: actions/checkout@v4
20-
with:
21-
persist-credentials: false
22-
- name: Get changed files
23-
id: changed-files
24-
uses: tj-actions/changed-files@v44
25-
with:
26-
files: |
27-
lib/generators/**
28-
rakelib/example_type.rb
29-
rakelib/example_config.yml
30-
rakelib/examples.rake
31-
rakelib/run_rspec.rake
32-
- name: Setup Ruby
33-
uses: ruby/setup-ruby@v1
34-
with:
35-
ruby-version: ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
36-
bundler: 2.5.9
37-
- name: Setup Node
38-
uses: actions/setup-node@v4
39-
with:
40-
node-version: 20
41-
- name: Print system information
42-
run: |
43-
echo "Linux release: "; cat /etc/issue
44-
echo "Current user: "; whoami
45-
echo "Current directory: "; pwd
46-
echo "Ruby version: "; ruby -v
47-
echo "Node version: "; node -v
48-
echo "Yarn version: "; yarn --version
49-
echo "Bundler version: "; bundle --version
50-
- name: run conversion script to support shakapacker v6
51-
if: matrix.versions == 'oldest'
52-
run: script/convert
53-
- name: Save root node_modules to cache
54-
uses: actions/cache@v4
55-
with:
56-
path: node_modules
57-
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
58-
- name: Save root ruby gems to cache
59-
uses: actions/cache@v4
60-
with:
61-
path: vendor/bundle
62-
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
63-
- id: get-sha
64-
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
65-
- name: Install Node modules with Yarn for renderer package
66-
run: |
67-
yarn install --no-progress --no-emoji
68-
sudo yarn global add yalc
69-
- name: yalc publish for react-on-rails
70-
run: yalc publish
71-
- name: Install Ruby Gems for package
72-
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
73-
- name: Ensure minimum required Chrome version
74-
run: |
75-
echo -e "Already installed $(google-chrome --version)\n"
76-
MINIMUM_REQUIRED_CHROME_VERSION=75
77-
INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
78-
if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
79-
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
80-
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
81-
sudo apt-get update
82-
sudo apt-get install google-chrome-stable
83-
echo -e "\nInstalled $(google-chrome --version)"
84-
fi
85-
- name: Increase the amount of inotify watchers
86-
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
87-
- name: Main CI
88-
if: steps.changed-files.outputs.any_changed == 'true'
89-
run: bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples
90-
- name: Store test results
91-
uses: actions/upload-artifact@v4
92-
with:
93-
name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
94-
path: ~/rspec
19+
- uses: actions/checkout@v4
20+
with:
21+
persist-credentials: false
22+
- name: Get changed files
23+
id: changed-files
24+
uses: tj-actions/changed-files@v44
25+
with:
26+
files: |
27+
lib/generators/**
28+
rakelib/example_type.rb
29+
rakelib/example_config.yml
30+
rakelib/examples.rake
31+
rakelib/run_rspec.rake
32+
- name: Setup Ruby
33+
uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
36+
bundler: 2.5.9
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 20
41+
- name: Print system information
42+
run: |
43+
echo "Linux release: "; cat /etc/issue
44+
echo "Current user: "; whoami
45+
echo "Current directory: "; pwd
46+
echo "Ruby version: "; ruby -v
47+
echo "Node version: "; node -v
48+
echo "Yarn version: "; yarn --version
49+
echo "Bundler version: "; bundle --version
50+
- name: run conversion script to support shakapacker v6
51+
if: matrix.versions == 'oldest'
52+
run: script/convert
53+
- name: Save root node_modules to cache
54+
uses: actions/cache@v4
55+
with:
56+
path: node_modules
57+
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
58+
- name: Save root ruby gems to cache
59+
uses: actions/cache@v4
60+
with:
61+
path: vendor/bundle
62+
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
63+
- id: get-sha
64+
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
65+
- name: Install Node modules with Yarn for renderer package
66+
run: |
67+
yarn install --no-progress --no-emoji
68+
sudo yarn global add yalc
69+
- name: yalc publish for react-on-rails
70+
run: yalc publish
71+
- name: Install Ruby Gems for package
72+
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
73+
- name: Ensure minimum required Chrome version
74+
run: |
75+
echo -e "Already installed $(google-chrome --version)\n"
76+
MINIMUM_REQUIRED_CHROME_VERSION=75
77+
INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
78+
if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
79+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
80+
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
81+
sudo apt-get update
82+
sudo apt-get install google-chrome-stable
83+
echo -e "\nInstalled $(google-chrome --version)"
84+
fi
85+
- name: Increase the amount of inotify watchers
86+
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
87+
- name: Main CI
88+
if: steps.changed-files.outputs.any_changed == 'true'
89+
run: bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples
90+
- name: Store test results
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
94+
path: ~/rspec
Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Lint JS and Ruby
22

3-
43
on:
54
push:
65
branches:
@@ -11,47 +10,47 @@ jobs:
1110
build:
1211
runs-on: ubuntu-22.04
1312
steps:
14-
- uses: actions/checkout@v4
15-
with:
16-
persist-credentials: false
17-
- name: Setup Ruby
18-
uses: ruby/setup-ruby@v1
19-
with:
20-
ruby-version: 3
21-
bundler: 2.5.9
22-
- name: Setup Node
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: 20
26-
- name: Print system information
27-
run: |
28-
echo "Linux release: "; cat /etc/issue
29-
echo "Current user: "; whoami
30-
echo "Current directory: "; pwd
31-
echo "Ruby version: "; ruby -v
32-
echo "Node version: "; node -v
33-
echo "Yarn version: "; yarn --version
34-
echo "Bundler version: "; bundle --version
35-
- name: Save root node_modules to cache
36-
uses: actions/cache@v4
37-
with:
38-
path: node_modules
39-
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
40-
- name: Save root ruby gems to cache
41-
uses: actions/cache@v4
42-
with:
43-
path: vendor/bundle
44-
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-oldest
45-
- name: Install Node modules with Yarn for renderer package
46-
run: |
47-
yarn install --no-progress --no-emoji
48-
- name: Install Ruby Gems for package
49-
run: bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
50-
- name: Linting of Ruby
51-
run: bundle exec rubocop
52-
- name: Linting of JS
53-
run: yarn start lint
54-
- name: Check formatting
55-
run: yarn start format.listDifferent
56-
- name: Type-check TypeScript
57-
run: yarn run type-check
13+
- uses: actions/checkout@v4
14+
with:
15+
persist-credentials: false
16+
- name: Setup Ruby
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 3
20+
bundler: 2.5.9
21+
- name: Setup Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
- name: Print system information
26+
run: |
27+
echo "Linux release: "; cat /etc/issue
28+
echo "Current user: "; whoami
29+
echo "Current directory: "; pwd
30+
echo "Ruby version: "; ruby -v
31+
echo "Node version: "; node -v
32+
echo "Yarn version: "; yarn --version
33+
echo "Bundler version: "; bundle --version
34+
- name: Save root node_modules to cache
35+
uses: actions/cache@v4
36+
with:
37+
path: node_modules
38+
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
39+
- name: Save root ruby gems to cache
40+
uses: actions/cache@v4
41+
with:
42+
path: vendor/bundle
43+
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-oldest
44+
- name: Install Node modules with Yarn for renderer package
45+
run: |
46+
yarn install --no-progress --no-emoji
47+
- name: Install Ruby Gems for package
48+
run: bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
49+
- name: Linting of Ruby
50+
run: bundle exec rubocop
51+
- name: Linting of JS
52+
run: yarn start lint
53+
- name: Check formatting
54+
run: yarn start format.listDifferent
55+
- name: Type-check TypeScript
56+
run: yarn run type-check

0 commit comments

Comments
 (0)