Skip to content

Commit

Permalink
Update scripts and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
binos30 committed Jul 30, 2024
1 parent b3b9ad6 commit 02510ae
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
key: prettier-main-cache

- name: Run prettier
run: yarn prettier-ci
run: yarn prettier

- name: Remove prettier cache
if: github.event_name == 'push'
Expand All @@ -103,7 +103,10 @@ jobs:
run: yarn rubocop-ci

- name: Run Syntax Tree
run: yarn stree-ci
run: yarn stree

- name: Run Slim-Lint
run: yarn slim-lint

- name: Run zeitwerk check
run: bin/rails zeitwerk:check
Expand Down
2 changes: 1 addition & 1 deletion .slim-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
linters:
LineLength:
enabled: true
max: 130
max: 135
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@
"eslint": "eslint . --cache --cache-location .cache/eslint --report-unused-disable-directives",
"eslint-fix": "eslint --cache --cache-location .cache/eslint --fix . --report-unused-disable-directives",
"eslint-ci": "eslint . --cache --cache-strategy content --cache-location .cache/eslint --format gha",
"prettier-fix": "prettier --write --cache --cache-location .cache/prettier --ignore-unknown '**/*.{css,html,js,json,md,mjs,yml}'",
"prettier-ci": "prettier --check --cache --cache-location .cache/prettier --ignore-unknown '**/*.{css,html,js,json,md,mjs,yml}'",
"prettier-fix": "prettier --write --cache --cache-location .cache/prettier '**/*.{css,html,js,json,md,mjs,yml}'",
"prettier": "prettier --check --cache --cache-location .cache/prettier '**/*.{css,html,js,json,md,mjs,yml}'",
"rubocop": "bin/rubocop",
"rubocop-fix": "bin/rubocop -a",
"rubocop-ci": "bin/rubocop -f github",
"slim-lint": "slim-lint 'app/views/**/*.slim'",
"stree-fix": "bin/bundle exec stree write '**/*.rb'",
"stree-ci": "bin/bundle exec stree check '**/*.rb'",
"stree": "bin/bundle exec stree check '**/*.rb'",
"postinstall": "husky"
},
"lint-staged": {
Expand All @@ -73,7 +75,8 @@
"./bin/rubocop -a"
],
"spec/**/*_spec.rb": "./bin/rspec",
"**/*.{css,html,js,json,md,mjs,yml}": "./node_modules/.bin/prettier --write --cache --cache-location .cache/prettier --ignore-unknown",
"app/views/**/*.slim": "slim-lint",
"**/*.{css,html,js,json,md,mjs,yml}": "./node_modules/.bin/prettier --write --cache --cache-location .cache/prettier",
"**/*.{cjs,js,mjs}": "./node_modules/.bin/eslint --cache --cache-location .cache/eslint --fix --report-unused-disable-directives"
},
"packageManager": "yarn@4.3.1"
Expand Down

0 comments on commit 02510ae

Please sign in to comment.