Skip to content

Commit

Permalink
Remove prettier and re-run bin/lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitemaeric committed Jan 2, 2024
1 parent d933d2b commit 235e8d3
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 89 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ jobs:
strategy:
fail-fast: false
matrix:
tests: [rubocop, erblint, prettier]
tests: [rubocop, erblint]
include:
- tests: rubocop
command: bundle exec rubocop
- tests: erblint
command: bundle exec erblint app
- tests: prettier
command: yarn prettier --check --ignore-unknown '**/*'
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
33 changes: 0 additions & 33 deletions .prettierignore

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

9 changes: 6 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ inherit_gem:
- config/default.yml
- config/rails.yml

inherit_from:
- node_modules/@prettier/plugin-ruby/rubocop.yml

inherit_mode:
merge:
- Exclude

Style/NumericLiterals:
Exclude:
- db/schema.rb

Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes

Layout/AccessModifierIndentation:
EnforcedStyle: indent
1 change: 1 addition & 0 deletions app/controllers/errors_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

class ErrorsController < ApplicationController
skip_before_action :verify_authenticity_token

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
class PagesController < ApplicationController
def home
end
end
2 changes: 1 addition & 1 deletion app/mailers/test_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class TestMailer < ApplicationMailer
#TestMailer.dummy_email.deliver_now
# TestMailer.dummy_email.deliver_now
def dummy_email
@user_name = "Bob"
mailer_options = { to: "[email protected]", subject: "test" }
Expand Down
18 changes: 10 additions & 8 deletions app/views/claims/pages/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@
<%= govuk_summary_list(
rows: [
{ key: { text: "Service" }, value: { text: "Claims" } },
{ key: { text: "Rails version" }, value: { text: Rails.version } },
{ key: { text: "Ruby version" }, value: { text: RUBY_VERSION } },
{ key: {
text: "GOV.UK Frontend" },
{ key: { text: "Rails version" }, value: { text: Rails.version } },
{ key: { text: "Ruby version" }, value: { text: RUBY_VERSION } },
{
key: {
text: "GOV.UK Frontend",
},
value: {
text: JSON
.parse(File.read(Rails.root.join("package.json")))
.dig("dependencies", "govuk-frontend")
.tr("^", "")
}
}
]
.tr("^", ""),
},
},
],
) %>
</div>
</div>
18 changes: 10 additions & 8 deletions app/views/pages/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@

<%= govuk_summary_list(
rows: [
{ key: { text: "Rails version" }, value: { text: Rails.version } },
{ key: { text: "Ruby version" }, value: { text: RUBY_VERSION } },
{ key: {
text: "GOV.UK Frontend" },
{ key: { text: "Rails version" }, value: { text: Rails.version } },
{ key: { text: "Ruby version" }, value: { text: RUBY_VERSION } },
{
key: {
text: "GOV.UK Frontend",
},
value: {
text: JSON
.parse(File.read(Rails.root.join("package.json")))
.dig("dependencies", "govuk-frontend")
.tr("^", "")
}
}
]
.tr("^", ""),
},
},
],
) %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/personas/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ul>
<% end %>

<%= form_tag("/auth/developer/callback", method: "post", data: {turbo: false}) do %>
<%= form_tag("/auth/developer/callback", method: "post", data: { turbo: false }) do %>
<%= hidden_field_tag "email", persona.email %>
<%= hidden_field_tag "first_name", persona.first_name %>
<%= hidden_field_tag "last_name", persona.last_name %>
Expand Down
18 changes: 10 additions & 8 deletions app/views/placements/pages/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@
<%= govuk_summary_list(
rows: [
{ key: { text: "Service" }, value: { text: "Placements" } },
{ key: { text: "Rails version" }, value: { text: Rails.version } },
{ key: { text: "Ruby version" }, value: { text: RUBY_VERSION } },
{ key: {
text: "GOV.UK Frontend" },
{ key: { text: "Rails version" }, value: { text: Rails.version } },
{ key: { text: "Ruby version" }, value: { text: RUBY_VERSION } },
{
key: {
text: "GOV.UK Frontend",
},
value: {
text: JSON
.parse(File.read(Rails.root.join("package.json")))
.dig("dependencies", "govuk-frontend")
.tr("^", "")
}
}
]
.tr("^", ""),
},
},
],
) %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/placements/support/providers/check.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with(model: @provider, url: placements_support_providers_path, method: "post", data: {turbo: false}) do |f| %>
<%= form_with(model: @provider, url: placements_support_providers_path, method: "post", data: { turbo: false }) do |f| %>
<%= f.hidden_field :provider_code, value: @provider_details.dig("attributes", "code") %>

<label class="govuk-label govuk-label--l">
Expand Down
2 changes: 1 addition & 1 deletion app/views/placements/support/providers/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%= govuk_back_link(href: root_path) %>
<% end %>

<%= form_with(model: @provider, url: check_placements_support_providers_path, method: "get", data: {turbo: false}) do |f| %>
<%= form_with(model: @provider, url: check_placements_support_providers_path, method: "get", data: { turbo: false }) do |f| %>
<%= f.govuk_error_summary %>

<div class="govuk-grid-row">
Expand Down
1 change: 0 additions & 1 deletion bin/lint
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh

bin/bundle exec rubocop --autocorrect-all
yarn prettier --write --ignore-unknown '**/*'
bin/bundle exec erblint --lint-all --autocorrect
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,5 @@
"scripts": {
"build:css": "sass ./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules --quiet-deps",
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets"
},
"devDependencies": {
"@prettier/plugin-ruby": "^4.0.4",
"prettier": "^3.1.1"
}
}
4 changes: 2 additions & 2 deletions spec/models/school_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
context "associations" do
it do
should belong_to(:gias_school).with_foreign_key(:urn).with_primary_key(
:urn,
)
:urn,
)
should have_many(:memberships)
end
end
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz#a5d300008960bb39677c46bf16f53ec70d8dee04"
integrity sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==

"@prettier/plugin-ruby@^4.0.4":
version "4.0.4"
resolved "https://registry.yarnpkg.com/@prettier/plugin-ruby/-/plugin-ruby-4.0.4.tgz#73d85fc2a1731a3f62b57ac3116cf1c234027cb6"
integrity sha512-lCpvfS/dQU5WrwN3AQ5vR8qrvj2h5gE41X08NNzAAXvHdM4zwwGRcP2sHSxfu6n6No+ljWCVx95NvJPFTTjCTg==

accessible-autocomplete@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/accessible-autocomplete/-/accessible-autocomplete-2.0.4.tgz#e295256c8d268b97c5ab456a1cb084b553ed3eb0"
Expand Down Expand Up @@ -266,11 +261,6 @@ preact@^8.3.1:
resolved "https://registry.yarnpkg.com/preact/-/preact-8.5.3.tgz#78c2a5562fcecb1fed1d0055fa4ac1e27bde17c1"
integrity sha512-O3kKP+1YdgqHOFsZF2a9JVdtqD+RPzCQc3rP+Ualf7V6rmRDchZ9MJbiGTT7LuyqFKZqlHSOyO/oMFmI2lVTsw==

prettier@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==

readdirp@~3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
Expand Down

0 comments on commit 235e8d3

Please sign in to comment.