Skip to content

Commit

Permalink
Add linting and tool config files
Browse files Browse the repository at this point in the history
  • Loading branch information
grega committed Nov 8, 2018
1 parent e2d1b23 commit 3f926af
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://github.com/browserslist/browserslist#config-file
> 1%
last 2 versions
ie 11
not ie 10
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true

[COMMIT_EDITMSG]
max_line_length = 0
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
extends:
- 'eslint:recommended'
- prettier
parser: babel-eslint
plugins:
- prettier
parserOptions:
sourceType: module
ecmaVersion: 2018
ecmaFeatures:
experimentalObjectRestSpread: true
env:
browser: true
es6: true
node: true
rules:
no-console: 0
prettier/prettier:
- error
58 changes: 58 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Modified from https://raw.githubusercontent.com/rubocop-hq/rubocop/master/.rubocop.yml

require:
- rubocop/cop/internal_affairs
- rubocop-rspec

AllCops:
Exclude:
- 'vendor/**/*'
- 'spec/fixtures/**/*'
- 'tmp/**/*'
TargetRubyVersion: 2.5.1

Layout/EndOfLine:
EnforcedStyle: lf

Layout/ClassStructure:
Enabled: true
Categories:
module_inclusion:
- include
- prepend
- extend
ExpectedOrder:
- module_inclusion
- constants
- public_class_methods
- initializer
- instance_methods
- protected_methods
- private_methods

Metrics/BlockLength:
Enabled: false

Metrics/ClassLength:
Enabled: false

Metrics/MethodLength:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Rails:
Enabled: true

RSpec/ExampleLength:
Enabled: false

RSpec/MultipleExpectations:
Enabled: false

Style/Documentation:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false
22 changes: 22 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
enabled: true,
extends: [
"stylelint-config-recommended-scss",
"./node_modules/prettier-stylelint/config.js"
],
plugins: [
"stylelint-order",
"stylelint-scss"
],
rules: {
block-no-empty: null,
block-opening-brace-newline-after: "always-multi-line",
block-closing-brace-newline-before: "always-multi-line",
declaration-block-single-line-max-declarations: 1,
order/order: [
"custom-properties",
"declarations"
],
order/properties-alphabetical-order: true
}
}
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodejs 8.12.0
ruby 2.5.3

0 comments on commit 3f926af

Please sign in to comment.