This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'slim_lint/rake_task' | |
SlimLint::RakeTask.new do |t| | |
t.config = '.slim_lint.yml' | |
t.files = %w(app/views/**/*.slim) | |
t.quiet = false | |
end | |
rescue LoadError | |
puts 'slim_lint load error' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'coffeelint' unless defined?(Coffeelint) | |
desc "lint application javascript" | |
task :coffeelint do | |
config_file = ENV['config_file'] || '.coffeelint.json' | |
directories = ENV['directories'].try(:split, ',') || ['app/assets/javascripts', 'spec/javascripts'] | |
failures = 0 | |
directories.each do |dir| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ver: 0.8.0 | |
plugin_directories: ['.scss-linters'] | |
# List of gem names to load custom linters from (make sure they are already | |
# installed) | |
plugin_gems: [] | |
# Default severity of all linters. | |
severity: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ver: 0.8.1 | |
AllCops: | |
DisplayCopNames: true | |
linters: | |
LineLength: | |
max: 160 | |
RuboCop: | |
enabled: true | |
ignored_cops: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"arrow_spacing": { | |
"level": "error" | |
}, | |
"braces_spacing": { | |
"spaces": 1, | |
"level": "error" | |
}, | |
"camel_case_classes": { | |
"level": "error" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/annotations.rb | |
Rails.application.config.annotations.register_extensions('scss') { |annotation| %r{//\s*(#{annotation}):?\s*(.*?)$} } | |
Rails.application.config.annotations.register_extensions('slim') { |annotation| %r{/\s*(#{annotation}):?\s*(.*?)$} } | |
Rails.application.config.annotations.register_extensions('coffee') { |annotation| /#\s*(#{annotation}):?\s*(.*?)$/ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initialize/factory_girl.rb | |
Rails.application.config.generators { |g| g.factory_girl suffix: 'factory' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat config/initializers/routes.rb | |
Rails.application.config.paths["config/routes.rb"].concat Dir[Rails.root.join("config/routes/**/*.rb")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: | |
flash = #{raw flash.to_json}; | |
coffee: | |
$ -> | |
$.each flash, (index, message) -> | |
toastr[message[0]]('', message[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box: ruby:2.3.0 | |
services: | |
- postgres | |
build: | |
steps: | |
- script: | |
name: install Nodejs | |
code: | | |
sudo apt-get update -y | |
sudo apt-get install nodejs npm -y |