Skip to content

Commit

Permalink
fix slim-lint offences
Browse files Browse the repository at this point in the history
  • Loading branch information
vast committed Aug 26, 2015
1 parent 263caf3 commit 5b68734
Show file tree
Hide file tree
Showing 22 changed files with 58 additions and 57 deletions.
2 changes: 1 addition & 1 deletion app/views/application/_footer.html.slim
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
footer.row
.columns
p © FlatStack #{Date.today.year}
p © FlatStack #{Time.zone.today.year}
8 changes: 4 additions & 4 deletions app/views/application/_navigation.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ nav.top-bar( data-topbar )

ul.title-area
li.name
h1 = link_to 'Rails Base example site', root_path
h1 = link_to "Rails Base example site", root_path
li.toggle-topbar
a(href='#')
a(href="#")
i.fi-list

section.top-bar-section
= render 'navigation_main'
= render 'navigation_user'
= render "navigation_main"
= render "navigation_user"
2 changes: 1 addition & 1 deletion app/views/application/_navigation_main.html.slim
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ul.left
- if user_signed_in?
= active_link_to 'Home', root_path, active: :exclusive, wrap_tag: :li
= active_link_to "Home", root_path, active: :exclusive, wrap_tag: :li
6 changes: 3 additions & 3 deletions app/views/application/_navigation_user.html.slim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ul.right
- if user_signed_in?
li.has-dropdown
a.user-dropdown(href='#') = current_user.full_name_with_email
a.user-dropdown(href="#") = current_user.full_name_with_email
ul.dropdown
new_user_registration_path
li
Expand All @@ -11,5 +11,5 @@ ul.right
a href = destroy_user_session_path
| Sign out
- else
= active_link_to 'Sign in', new_user_session_path, active: :exclusive, wrap_tag: :li
= active_link_to 'Sign up', new_user_registration_path, active: :exclusive, wrap_tag: :li
= active_link_to "Sign in", new_user_session_path, active: :exclusive, wrap_tag: :li
= active_link_to "Sign up", new_user_registration_path, active: :exclusive, wrap_tag: :li
2 changes: 1 addition & 1 deletion app/views/kaminari/_first_page.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
li
= link_to_unless(current_page.first?,
raw(t('views.pagination.first')),
raw(t("views.pagination.first")),
url,
remote: remote)
2 changes: 1 addition & 1 deletion app/views/kaminari/_gap.html.slim
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
li.unavailable
= link_to(raw(t('views.pagination.truncate')), '#')
= link_to(raw(t("views.pagination.truncate")), "#")
2 changes: 1 addition & 1 deletion app/views/kaminari/_last_page.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
li
= link_to_unless(current_page.last?,
raw(t('views.pagination.last')),
raw(t("views.pagination.last")),
url,
remote: remote)
4 changes: 2 additions & 2 deletions app/views/kaminari/_next_page.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
li
= link_to_unless(current_page.last?,
raw(t('views.pagination.next')),
raw(t("views.pagination.next")),
url,
rel: 'next',
rel: "next",
remote: remote)
6 changes: 3 additions & 3 deletions app/views/kaminari/_page.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
li[class="#{'current' if page.current?}"]
li[class="#{"current" if page.current?}"]
= link_to(page,
page.current? ? '#' : url,
page.current? ? "#" : url,
remote: remote,
rel: page.next? ? 'next' : (page.prev? ? 'prev' : nil))
rel: page.next? ? "next" : (page.prev? ? "prev" : nil))
4 changes: 2 additions & 2 deletions app/views/kaminari/_prev_page.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
li
= link_to_unless(current_page.first?,
raw(t('views.pagination.previous')),
raw(t("views.pagination.previous")),
url,
rel: 'prev',
rel: "prev",
remote: remote)
20 changes: 10 additions & 10 deletions app/views/layouts/application.html.slim
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
doctype html

html class='no-js' lang='en'
html class="no-js" lang="en"

head
meta charset='utf-8'
meta name='viewport' content='width=device-width, initial-scale=1.0'
meta name='robots' content='NOODP,NOYDIR'
meta charset="utf-8"
meta name="viewport" content="width=device-width, initial-scale=1.0"
meta name="robots" content="NOODP,NOYDIR"

= metamagic site: 'RailsBase', title: [:title, :site], separator: ' - '
= metamagic site: "RailsBase", title: %i(title site), separator: " - "
= csrf_meta_tags

= stylesheet_link_tag :application

= javascript_include_tag 'vendor/modernizr'
= javascript_include_tag "vendor/modernizr"

= javascript_tag 'window.App = {}'
= javascript_tag "window.App = {}"

== analytics_init if GA.tracker

body
#root
= render 'navigation'
= render 'messages'
= render "navigation"
= render "messages"

= yield

= render 'footer'
= render "footer"

javascript:
App.currentUserData = #{raw current_user.to_json};
Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/home.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.row
.columns
h2
= title('Home')
= title("Home")
2 changes: 1 addition & 1 deletion app/views/user_mailer/confirmation_instructions.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ p
p
| You can confirm your account email through the link below:
p
= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token)
= link_to "Confirm my account", confirmation_url(@resource, confirmation_token: @token)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ p
p
| Someone has requested a link to change your password, and you can do this through the link below.
p
= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token)
= link_to "Change my password", edit_password_url(@resource, reset_password_token: @token)
p
| If you didn't request this, please ignore this email.
p
Expand Down
4 changes: 2 additions & 2 deletions app/views/users/confirmations/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
= f.input :email, required: true

.form-actions
= f.button :submit, 'Resend confirmation instructions'
= f.button :submit, "Resend confirmation instructions"

.medium-6.columns.end
= render 'users/shared/links'
= render "users/shared/links"
6 changes: 3 additions & 3 deletions app/views/users/passwords/edit.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.row
.columns
h2 = title('Change password')
h2 = title("Change password")

.row
.medium-6.columns
Expand All @@ -17,7 +17,7 @@
= f.input :password_confirmation, required: true

.form-actions
= f.button :submit, 'Update password'
= f.button :submit, "Update password"

.medium-6.columns.end
= render 'users/shared/links'
= render "users/shared/links"
6 changes: 3 additions & 3 deletions app/views/users/passwords/new.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.row
.columns
h2 = title('Forgot your password?')
h2 = title("Forgot your password?")

.row
.medium-6.columns
Expand All @@ -12,7 +12,7 @@
.form-inputs
= f.input :email, required: true
.form-actions
= f.button :submit, 'Send me reset password instructions'
= f.button :submit, "Send me reset password instructions"

.medium-6.columns.end
= render 'users/shared/links'
= render "users/shared/links"
6 changes: 3 additions & 3 deletions app/views/users/registrations/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
required: true

.form-actions
= f.button :submit, 'Update'
= f.button :submit, "Update"

.medium-6.columns.end
h6
b Cancel my account
p
| Unhappy?
'
= link_to 'Cancel my account.',
= link_to "Cancel my account.",
registration_path(resource_name),
data: { confirm: 'Are you sure?' },
data: { confirm: "Are you sure?" },
method: :delete
6 changes: 3 additions & 3 deletions app/views/users/registrations/new.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.row
.columns
h2 = title('Sign up')
h2 = title("Sign up")

.row
.medium-6.columns
Expand All @@ -22,7 +22,7 @@
= f.input :password_confirmation, required: true

.form-actions
= f.button :submit, 'Sign up'
= f.button :submit, "Sign up"

.medium-6.columns.end
= render 'users/shared/links'
= render "users/shared/links"
6 changes: 3 additions & 3 deletions app/views/users/sessions/new.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.row
.columns
h2 = title('Sign in')
h2 = title("Sign in")

.row
.medium-6.columns
Expand All @@ -21,7 +21,7 @@
= f.input :remember_me, as: :boolean

.form-actions
= f.button :submit, 'Sign in'
= f.button :submit, "Sign in"

.medium-6.columns.end
= render 'users/shared/links'
= render "users/shared/links"
16 changes: 8 additions & 8 deletions app/views/users/shared/_links.html.slim
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
h6 Anything else?
ul.links
- if controller_name != 'sessions'
li = link_to 'Sign in', new_session_path(resource_name)
- if controller_name != "sessions"
li = link_to "Sign in", new_session_path(resource_name)

- if devise_mapping.registerable? && controller_name != 'registrations'
li = link_to 'Create a new account', new_registration_path(resource_name)
- if devise_mapping.registerable? && controller_name != "registrations"
li = link_to "Create a new account", new_registration_path(resource_name)

- if devise_mapping.recoverable? && controller_name != 'passwords'
li = link_to 'Forgot your password?', new_password_path(resource_name)
- if devise_mapping.recoverable? && controller_name != "passwords"
li = link_to "Forgot your password?", new_password_path(resource_name)

- if devise_mapping.confirmable? && controller_name != 'confirmations'
- if devise_mapping.confirmable? && controller_name != "confirmations"
li = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)

- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != "unlocks"
li = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)

- if devise_mapping.omniauthable?
Expand Down
1 change: 1 addition & 0 deletions config/slim-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ linters:
- Style/TrailingBlankLines
- Style/TrailingWhitespace
- Style/WhileUntilModifier
- Style/NestedTernaryOperator

TagCase:
enabled: true
Expand Down

0 comments on commit 5b68734

Please sign in to comment.