Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 0efff6b

Browse files
committed
Add .codeclimate.yml, rubocop, and eslint configuration files
1 parent d5f57fb commit 0efff6b

File tree

3 files changed

+368
-0
lines changed

3 files changed

+368
-0
lines changed

‎.codeclimate.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
engines:
3+
rubocop:
4+
enabled: true
5+
eslint:
6+
enabled: true
7+
bundler-audit:
8+
enabled: true
9+
duplication:
10+
enabled: true
11+
config:
12+
languages:
13+
- ruby
14+
ratings:
15+
paths:
16+
- "**.rb"
17+
- Gemfile.lock
18+
exclude_paths:
19+
- config/**/*
20+
- spec/**/*
21+
- vendor/**/*

‎.eslintrc‎

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
ecmaFeatures: {}
2+
env:
3+
node: true
4+
rules:
5+
no-alert: 0
6+
no-array-constructor: 0
7+
no-bitwise: 0
8+
no-caller: 0
9+
no-catch-shadow: 0
10+
no-class-assign: 0
11+
no-cond-assign: 2
12+
no-console: 2
13+
no-const-assign: 0
14+
no-constant-condition: 2
15+
no-continue: 0
16+
no-control-regex: 2
17+
no-debugger: 2
18+
no-delete-var: 2
19+
no-div-regex: 0
20+
no-dupe-keys: 2
21+
no-dupe-args: 2
22+
no-duplicate-case: 2
23+
no-else-return: 0
24+
no-empty: 2
25+
no-empty-character-class: 2
26+
no-empty-label: 0
27+
no-eq-null: 0
28+
no-eval: 0
29+
no-ex-assign: 2
30+
no-extend-native: 0
31+
no-extra-bind: 0
32+
no-extra-boolean-cast: 2
33+
no-extra-parens: 0
34+
no-extra-semi: 2
35+
no-fallthrough: 2
36+
no-floating-decimal: 0
37+
no-func-assign: 2
38+
no-implicit-coercion: 0
39+
no-implied-eval: 0
40+
no-inline-comments: 0
41+
no-inner-declarations:
42+
- 2
43+
- functions
44+
no-invalid-regexp: 2
45+
no-invalid-this: 0
46+
no-irregular-whitespace: 2
47+
no-iterator: 0
48+
no-label-var: 0
49+
no-labels: 0
50+
no-lone-blocks: 0
51+
no-lonely-if: 0
52+
no-loop-func: 0
53+
no-mixed-requires:
54+
- 0
55+
- false
56+
no-mixed-spaces-and-tabs:
57+
- 2
58+
- false
59+
linebreak-style:
60+
- 0
61+
- unix
62+
no-multi-spaces: 0
63+
no-multi-str: 0
64+
no-multiple-empty-lines:
65+
- 0
66+
- max: 2
67+
no-native-reassign: 0
68+
no-negated-in-lhs: 2
69+
no-nested-ternary: 0
70+
no-new: 0
71+
no-new-func: 0
72+
no-new-object: 0
73+
no-new-require: 0
74+
no-new-wrappers: 0
75+
no-obj-calls: 2
76+
no-octal: 2
77+
no-octal-escape: 0
78+
no-param-reassign: 0
79+
no-path-concat: 0
80+
no-plusplus: 0
81+
no-process-env: 0
82+
no-process-exit: 0
83+
no-proto: 0
84+
no-redeclare: 2
85+
no-regex-spaces: 2
86+
no-reserved-keys: 0
87+
no-restricted-modules: 0
88+
no-return-assign: 0
89+
no-script-url: 0
90+
no-self-compare: 0
91+
no-sequences: 0
92+
no-shadow: 0
93+
no-shadow-restricted-names: 0
94+
no-spaced-func: 0
95+
no-sparse-arrays: 2
96+
no-sync: 0
97+
no-ternary: 0
98+
no-trailing-spaces: 0
99+
no-this-before-super: 0
100+
no-throw-literal: 0
101+
no-undef: 2
102+
no-undef-init: 0
103+
no-undefined: 0
104+
no-unexpected-multiline: 0
105+
no-underscore-dangle: 0
106+
no-unneeded-ternary: 0
107+
no-unreachable: 2
108+
no-unused-expressions: 0
109+
no-unused-vars:
110+
- 2
111+
- vars: all
112+
args: after-used
113+
no-use-before-define: 0
114+
no-useless-call: 0
115+
no-void: 0
116+
no-var: 0
117+
no-warning-comments:
118+
- 0
119+
- terms:
120+
- todo
121+
- fixme
122+
- xxx
123+
location: start
124+
no-with: 0
125+
array-bracket-spacing:
126+
- 0
127+
- never
128+
arrow-parens: 0
129+
arrow-spacing: 0
130+
accessor-pairs: 0
131+
block-scoped-var: 0
132+
brace-style:
133+
- 0
134+
- 1tbs
135+
callback-return: 0
136+
camelcase: 0
137+
comma-dangle:
138+
- 2
139+
- never
140+
comma-spacing: 0
141+
comma-style: 0
142+
complexity:
143+
- 0
144+
- 11
145+
computed-property-spacing:
146+
- 0
147+
- never
148+
consistent-return: 0
149+
consistent-this:
150+
- 0
151+
- that
152+
constructor-super: 0
153+
curly:
154+
- 0
155+
- all
156+
default-case: 0
157+
dot-location: 0
158+
dot-notation:
159+
- 0
160+
- allowKeywords: true
161+
eol-last: 0
162+
eqeqeq: 0
163+
func-names: 0
164+
func-style:
165+
- 0
166+
- declaration
167+
generator-star-spacing: 0
168+
guard-for-in: 0
169+
handle-callback-err: 0
170+
indent: 0
171+
init-declarations: 0
172+
key-spacing:
173+
- 0
174+
- beforeColon: false
175+
afterColon: true
176+
lines-around-comment: 0
177+
max-depth:
178+
- 0
179+
- 4
180+
max-len:
181+
- 0
182+
- 80
183+
- 4
184+
max-nested-callbacks:
185+
- 0
186+
- 2
187+
max-params:
188+
- 0
189+
- 3
190+
max-statements:
191+
- 0
192+
- 10
193+
new-cap: 0
194+
new-parens: 0
195+
newline-after-var: 0
196+
object-curly-spacing:
197+
- 0
198+
- never
199+
object-shorthand: 0
200+
one-var: 0
201+
operator-assignment:
202+
- 0
203+
- always
204+
operator-linebreak: 0
205+
padded-blocks: 0
206+
prefer-const: 0
207+
prefer-spread: 0
208+
prefer-reflect: 0
209+
quote-props: 0
210+
quotes:
211+
- 0
212+
- double
213+
radix: 0
214+
require-yield: 0
215+
semi: 0
216+
semi-spacing:
217+
- 0
218+
- before: false
219+
after: true
220+
sort-vars: 0
221+
space-after-keywords:
222+
- 0
223+
- always
224+
space-before-blocks:
225+
- 0
226+
- always
227+
space-before-function-paren:
228+
- 0
229+
- always
230+
space-in-parens:
231+
- 0
232+
- never
233+
space-infix-ops: 0
234+
space-return-throw-case: 0
235+
space-unary-ops:
236+
- 0
237+
- words: true
238+
nonwords: false
239+
spaced-comment: 0
240+
strict: 0
241+
use-isnan: 2
242+
valid-jsdoc: 0
243+
valid-typeof: 2
244+
vars-on-top: 0
245+
wrap-iife: 0
246+
wrap-regex: 0
247+
yoda:
248+
- 0
249+
- never

‎.rubocop.yml‎

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
################################################################################
2+
# Metrics
3+
################################################################################
4+
5+
Metrics/LineLength:
6+
Enabled: false
7+
8+
Metrics/AbcSize:
9+
Enabled: false
10+
11+
################################################################################
12+
# Style
13+
################################################################################
14+
15+
# Executables are conventionally named bin/foo-bar
16+
Style/FileName:
17+
Exclude:
18+
- bin/**/*
19+
20+
# We don't (currently) document our code
21+
Style/Documentation:
22+
Enabled: false
23+
24+
# Always use double-quotes to keep things simple
25+
Style/StringLiterals:
26+
EnforcedStyle: double_quotes
27+
28+
# Use a trailing comma to keep diffs clean when elements are inserted or removed
29+
Style/TrailingComma:
30+
EnforcedStyleForMultiline: comma
31+
32+
# We avoid GuardClause because it can result in "suprise return"
33+
Style/GuardClause:
34+
Enabled: false
35+
36+
# We avoid IfUnlessModifier because it can result in "suprise if"
37+
Style/IfUnlessModifier:
38+
Enabled: false
39+
40+
# We don't care about the fail/raise distinction
41+
Style/SignalException:
42+
EnforcedStyle: only_raise
43+
44+
Style/DotPosition:
45+
EnforcedStyle: trailing
46+
47+
# Common globals we allow
48+
Style/GlobalVars:
49+
AllowedVariables:
50+
- "$statsd"
51+
- "$mongo"
52+
- "$rollout"
53+
54+
# We have common cases where has_ and have_ make sense
55+
Style/PredicateName:
56+
Enabled: true
57+
NamePrefixBlacklist:
58+
- is_
59+
60+
# We use %w[ ], not %w( ) because the former looks like an array
61+
Style/PercentLiteralDelimiters:
62+
PreferredDelimiters:
63+
"%w": []
64+
"%W": []
65+
66+
################################################################################
67+
# Rails - disable things because we're primarily non-rails
68+
################################################################################
69+
70+
Rails/Delegate:
71+
Enabled: false
72+
73+
Rails/TimeZone:
74+
Enabled: false
75+
76+
################################################################################
77+
# Specs - be more lenient on length checks and block styles
78+
################################################################################
79+
80+
Metrics/ModuleLength:
81+
Exclude:
82+
- spec/**/*
83+
84+
Metrics/MethodLength:
85+
Exclude:
86+
- spec/**/*
87+
88+
Style/ClassAndModuleChildren:
89+
Exclude:
90+
- spec/**/*
91+
92+
Style/BlockDelimiters:
93+
Exclude:
94+
- spec/**/*
95+
96+
Style/Blocks:
97+
Exclude:
98+
- spec/**/*

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /