shuttlerock_shared_config 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3a8b90464e48d713705023f1250ca73eb7518ad6bfa3d05bdd2f4500bbc501aa
4
+ data.tar.gz: 24cf8dbcbde39ca8f0146784958fab3859ab65fa51a9166df238ca23264436fd
5
+ SHA512:
6
+ metadata.gz: e4e24d98102cd77a6e95a21d02d56129c2a252928ccf8156c60f1f7e0c2803531948cbb58dafa521b912f9f9982fd526bde20921e8c63d6d5b1087e31d82f53d
7
+ data.tar.gz: 403baad7dccd91238b0e411bb2dfeabb356ef508c592869399f552796bd5767cc765095520e157be70dfbb8af8c5a6bcce16d56dfc3ae36c532eb4ead1a1d8b9
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'shuttlerock_shared_config/version'
4
+ require 'tasks/tasks'
5
+
6
+ module ShuttlerockSharedConfig
7
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ShuttlerockSharedConfig
4
+ VERSION = '0.1.0'.freeze
5
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fileutils'
4
+
5
+ namespace :shuttlerock_shared_config do
6
+ task update: %i[update_codeclimate update_eslint update_rubocop update_stylelintrc] do
7
+ end
8
+
9
+ desc 'Update .codeclimate.yml'
10
+ task :update_codeclimate do
11
+ input_path = File.expand_path('../../lib/templates/.codeclimate.yml', __dir__)
12
+ FileUtils.copy(input_path, Dir.pwd)
13
+ end
14
+
15
+ desc 'Update .eslint.yml'
16
+ task :update_eslint do
17
+ input_path = File.expand_path('../../lib/templates/.eslintrc', __dir__)
18
+ FileUtils.copy(input_path, Dir.pwd)
19
+ end
20
+
21
+ desc 'Update .rubocop.yml'
22
+ task :update_rubocop do
23
+ input_path = File.expand_path('../../lib/templates/.rubocop.yml', __dir__)
24
+ FileUtils.copy(input_path, Dir.pwd)
25
+ end
26
+
27
+ desc 'Update .stylelintrc'
28
+ task :update_stylelintrc do
29
+ input_path = File.expand_path('../../lib/templates/.stylelintrc', __dir__)
30
+ FileUtils.copy(input_path, Dir.pwd)
31
+ end
32
+ end
@@ -0,0 +1,25 @@
1
+ engines:
2
+ brakeman:
3
+ enabled: true
4
+ bundler-audit:
5
+ enabled: true
6
+ eslint:
7
+ enabled: true
8
+ rubocop:
9
+ enabled: true
10
+ #stylelint:
11
+ # enabled: true
12
+ #csslint:
13
+ # enabled: true
14
+ #reek:
15
+ # enabled: true
16
+
17
+ exclude_paths:
18
+ - "vendor"
19
+ - "node_modules"
20
+ - "app/javascript/flow-typed"
21
+
22
+ ratings:
23
+ paths:
24
+ - "app/**/*"
25
+ - "lib/**/*"
@@ -0,0 +1,81 @@
1
+ extends:
2
+ - airbnb
3
+ - plugin:flowtype/recommended
4
+
5
+ parser: babel-eslint
6
+
7
+ plugins:
8
+ - flowtype
9
+ - import
10
+ - jsdoc
11
+
12
+ # Allow the following global variables
13
+ env:
14
+ browser: false # browser global variables
15
+ node: true # Node.js global variables and Node.js scoping.
16
+ mocha: true # adds all of the Mocha testing global variables.
17
+ es6: true # enable all ECMAScript 6 features except for modules
18
+
19
+ # Stop 'no-undef' errors for these.
20
+ globals:
21
+ $: true
22
+ App: true
23
+ Application: true
24
+ expect: true
25
+ gon: true
26
+ I18n: true
27
+ jest: true
28
+ Routes: true
29
+ window: true
30
+
31
+ rules:
32
+ class-methods-use-this: off
33
+ global-require: off
34
+ import/extensions: [2, "never"]
35
+ import/no-dynamic-require: off
36
+ import/no-extraneous-dependencies: off
37
+ import/no-named-as-default: off
38
+ import/no-unresolved: [2, { ignore: ['shuttlerock'] }]
39
+ import/prefer-default-export: off
40
+ key-spacing: [error, { align: "value" }]
41
+ max-len: [error, 150]
42
+ no-duplicate-imports: off # import/no-duplicates replaces this one.
43
+ no-multi-spaces: [error, { exceptions: { AssignmentExpression: true, BinaryExpression: true, ImportDeclaration: true, VariableDeclarator: true } }]
44
+ no-unused-vars: ["error", { "argsIgnorePattern": "^__" }]
45
+ react/no-danger: off
46
+ react/no-array-index-key: off
47
+ react/prefer-stateless-function: off
48
+ jsdoc/check-param-names: 1
49
+ jsdoc/check-tag-names: 1
50
+ jsdoc/check-types: 1
51
+ jsdoc/newline-after-description: 1
52
+ jsdoc/require-description-complete-sentence: 1
53
+ jsdoc/require-hyphen-before-param-description: 1
54
+ jsdoc/require-param: 1
55
+ jsdoc/require-param-description: 1
56
+ jsdoc/require-param-type: 1
57
+ jsdoc/require-returns-description: 1
58
+ jsdoc/require-returns-type: 1
59
+ # See https://github.com/ReactTraining/react-router/issues/5598
60
+ jsx-a11y/anchor-is-valid: [ "error", { "components": [ "Link" ], "specialLink": [ "hrefLeft", "hrefRight", "to" ], "aspects": [ "noHref", "invalidHref", "preferButton" ] }]
61
+ jsx-a11y/label-has-for: [2, { "components": [ "Label" ], "required": { "some": [ "nesting", "id" ] }, "allowChildren": false }]
62
+ jsx-a11y/no-autofocus: off
63
+ # TODO: remove this rule after we have gotten rid of all alert()s.
64
+ no-alert: off
65
+ // Validate JSX has key prop when in array or iterator
66
+ react/jsx-key: 0
67
+ react/jsx-no-duplicate-props: [0, {
68
+ "ignoreCase": false
69
+ }]
70
+ // Enforce component methods order
71
+ react/sort-comp: [2, {
72
+ "order": [
73
+ "static-methods",
74
+ "constructor",
75
+ "lifecycle",
76
+ "render",
77
+ "/^render.+$/",
78
+ "/^handle.+$/",
79
+ "everything-else"
80
+ ]
81
+ }]
@@ -0,0 +1,108 @@
1
+ # See example at https://github.com/bbatsov/rubocop/blob/master/config/default.yml
2
+ AllCops:
3
+ TargetRubyVersion: 2.3
4
+ Exclude:
5
+ - 'app/admin/**/*.rb'
6
+ - 'bin/**/*'
7
+ - 'config/**/*.rb'
8
+ - 'db/schema.rb'
9
+ - 'db/migrate/**/*'
10
+ - 'lib/tasks/**/*'
11
+ - 'spec/**/*'
12
+ - 'tmp/**/*'
13
+ - 'vendor/**/*'
14
+
15
+ # Align the elements of a hash literal if they span more than one line.
16
+ AlignHash:
17
+ # Alignment of entries using hash rocket as separator. Valid values are:
18
+ #
19
+ # key - left alignment of keys
20
+ # 'a' => 2
21
+ # 'bb' => 3
22
+ # separator - alignment of hash rockets, keys are right aligned
23
+ # 'a' => 2
24
+ # 'bb' => 3
25
+ # table - left alignment of keys, hash rockets, and values
26
+ # 'a' => 2
27
+ # 'bb' => 3
28
+ EnforcedHashRocketStyle: table
29
+ # Alignment of entries using colon as separator. Valid values are:
30
+ #
31
+ # key - left alignment of keys
32
+ # a: 0
33
+ # bb: 1
34
+ # separator - alignment of colons, keys are right aligned
35
+ # a: 0
36
+ # bb: 1
37
+ # table - left alignment of keys and values
38
+ # a: 0
39
+ # bb: 1
40
+ EnforcedColonStyle: table
41
+
42
+ Documentation:
43
+ Enabled: false
44
+
45
+ EmptyLines:
46
+ Enabled: false
47
+
48
+ LineLength:
49
+ Max: 150
50
+
51
+ Metrics/AbcSize:
52
+ Enabled: true
53
+ Max: 25
54
+
55
+ Metrics/ClassLength:
56
+ Enabled: false
57
+ CountComments: false
58
+
59
+ Metrics/BlockLength:
60
+ Enabled: false
61
+ CountComments: false
62
+
63
+ Metrics/MethodLength:
64
+ Enabled: true
65
+ CountComments: false
66
+ Max: 25
67
+
68
+ SpaceInsideParens:
69
+ Enabled: false
70
+
71
+ SpaceBeforeFirstArg:
72
+ Enabled: false
73
+
74
+ Style/BlockDelimiters:
75
+ Enabled: false
76
+
77
+ Style/ClassAndModuleChildren:
78
+ Enabled: true
79
+ EnforcedStyle: compact
80
+
81
+ Layout/EmptyLinesAroundBlockBody:
82
+ Enabled: false
83
+
84
+ Style/FrozenStringLiteralComment:
85
+ Enabled: false
86
+
87
+ Style/RedundantReturn:
88
+ Enabled: false
89
+
90
+ Style/TrailingCommaInArguments:
91
+ Enabled: true
92
+ EnforcedStyleForMultiline: comma
93
+
94
+ Style/TrailingCommaInArrayLiteral:
95
+ Enabled: true
96
+ EnforcedStyleForMultiline: comma
97
+
98
+ Style/TrailingCommaInHashLiteral:
99
+ Enabled: true
100
+ EnforcedStyleForMultiline: comma
101
+
102
+ Style/AndOr:
103
+ Enabled: false
104
+
105
+ # https://github.com/codeclimate/codeclimate-rubocop/blob/master/base_rubocop.yml#L71
106
+ # We use %w[ ], not %w( ) because the former looks like an array
107
+ Style/PercentLiteralDelimiters:
108
+ Enabled: false
@@ -0,0 +1,61 @@
1
+ {
2
+ "extends": [
3
+ "stylelint-config-sass-guidelines",
4
+ "stylelint-config-idiomatic-sass",
5
+ "stylelint-config-css-modules"
6
+ ],
7
+ "plugins": [
8
+ "stylelint-number-z-index-constraint",
9
+ "stylelint-declaration-block-no-ignored-properties",
10
+ "stylelint-declaration-use-variable",
11
+ "stylelint-high-performance-animation",
12
+ "stylelint-images"
13
+ ],
14
+ "syntax": "sass",
15
+ "rules": {
16
+ "block-no-empty": true,
17
+ "block-closing-brace-newline-before": null,
18
+ "block-opening-brace-newline-after": null,
19
+ "block-opening-brace-space-after": null,
20
+ "block-opening-brace-space-before": null,
21
+ "at-rule-name-case": "lower",
22
+
23
+ "color-no-invalid-hex": true,
24
+ "declaration-block-no-duplicate-properties": true,
25
+ "declaration-block-trailing-semicolon": null,
26
+ "declaration-no-important": true,
27
+ "indentation": null,
28
+ "max-nesting-depth": 3,
29
+ "comment-empty-line-before": null,
30
+ "plugin/declaration-block-no-ignored-properties": true,
31
+ "selector-class-pattern": "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
32
+ "selector-descendant-combinator-no-non-space": true,
33
+ "selector-max-id": 0,
34
+ "selector-type-case": "lower",
35
+ "selector-no-qualifying-type": true,
36
+ "plugin/no-low-performance-animation-properties": true,
37
+ "sh-waqar/declaration-use-variable": [["/color/"]],
38
+ "rule-empty-line-before": [
39
+ "always-multi-line",
40
+ {
41
+ "except": [
42
+ "first-nested"
43
+ ]
44
+ }
45
+ ],
46
+ "property-no-unknown": [true, {
47
+ "ignoreProperties": [
48
+ "composes"
49
+ ]
50
+ }],
51
+ "plugin/number-z-index-constraint": {
52
+ "min": 0,
53
+ "max": 10
54
+ },
55
+ "images/broken": true,
56
+ "images/prefer-data-uri": 256,
57
+ "declaration-property-value-blacklist": {
58
+ "/^border/": ["0"]
59
+ }
60
+ }
61
+ }
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: shuttlerock_shared_config
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ElseThen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-07-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.58'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.58'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.16'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.16'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ description: Update shared config for Shuttlerock's projects.
70
+ email:
71
+ - tbvokh@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - lib/shuttlerock_shared_config.rb
77
+ - lib/shuttlerock_shared_config/version.rb
78
+ - lib/tasks/tasks.rb
79
+ - lib/templates/.codeclimate.yml
80
+ - lib/templates/.eslintrc
81
+ - lib/templates/.rubocop.yml
82
+ - lib/templates/.stylelintrc
83
+ homepage: https://github.com/Shuttlerock/shuttlerock_shared_config
84
+ licenses:
85
+ - MIT
86
+ metadata: {}
87
+ post_install_message:
88
+ rdoc_options: []
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ requirements: []
102
+ rubyforge_project:
103
+ rubygems_version: 2.7.6
104
+ signing_key:
105
+ specification_version: 4
106
+ summary: Update shared config.
107
+ test_files: []