Skip to content

Commit

Permalink
Add missing config files and autocorrect JS files
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio-e committed Jul 5, 2024
1 parent d9ec831 commit d44d205
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inherit_gem:
standard: config/base.yml

AllCops:
TargetRubyVersion: 3.3.0
TargetRubyVersion: 3.3.3
NewCops: enable
Exclude:
- "bin/**"
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ GEM
zeitwerk (2.6.16)

PLATFORMS
arm64-darwin-21
arm64-darwin-23

DEPENDENCIES
Expand Down
15 changes: 15 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://github.com/crate-ci/typos/blob/master/docs/reference.md

[default.extend-words]
# Don't correct the following words

[files]
extend-exclude = [
"app/assets/stylesheets/**",
"app/assets/fonts/**",
"vendor/**",
"/spec/fixtures/**",
"/lib/assets/**",
"*.css",
"*.pdf",
]
4 changes: 2 additions & 2 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
import "@hotwired/turbo-rails"
import "controllers"
import '@hotwired/turbo-rails'
import 'controllers'
4 changes: 2 additions & 2 deletions app/javascript/controllers/application.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Application } from "@hotwired/stimulus"
import { Application } from '@hotwired/stimulus'

const application = Application.start()

// Configure Stimulus development experience
application.debug = false
window.Stimulus = application
window.Stimulus = application

export { application }
6 changes: 3 additions & 3 deletions app/javascript/controllers/hello_controller.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller } from "@hotwired/stimulus"
import { Controller } from '@hotwired/stimulus'

export default class extends Controller {
connect() {
this.element.textContent = "Hello World!"
connect () {
this.element.textContent = 'Hello World!'
}
}
6 changes: 3 additions & 3 deletions app/javascript/controllers/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Import and register all your controllers from the importmap under controllers/*

import { application } from "controllers/application"
import { application } from 'controllers/application'

// Eager load all controllers defined in the import map under controllers/**/*_controller
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
eagerLoadControllersFrom("controllers", application)
import { eagerLoadControllersFrom } from '@hotwired/stimulus-loading'
eagerLoadControllersFrom('controllers', application)

// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
Expand Down
8 changes: 4 additions & 4 deletions config/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ module.exports = {
theme: {
extend: {
fontFamily: {
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
},
sans: ['Inter var', ...defaultTheme.fontFamily.sans]
}
}
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
require('@tailwindcss/container-queries'),
require('@tailwindcss/container-queries')
]
}
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "rails_world",
"version": "1.0.0",
"standard": {
"ignore": ["vendor/**"]
}
}

0 comments on commit d44d205

Please sign in to comment.