react_on_rails 11.3.1 → 12.0.0.pre.beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +320 -0
  3. data/.eslintignore +2 -1
  4. data/.eslintrc +23 -1
  5. data/.github/FUNDING.yml +1 -0
  6. data/.gitignore +3 -1
  7. data/.prettierignore +10 -1
  8. data/.prettierrc +3 -0
  9. data/.rubocop.yml +37 -11
  10. data/.travis.yml +9 -20
  11. data/CHANGELOG.md +44 -19
  12. data/CONTRIBUTING.md +60 -71
  13. data/Gemfile +3 -4
  14. data/{COMM-LICENSE → REACT-ON-RAILS-PRO-LICENSE} +6 -9
  15. data/README.md +102 -69
  16. data/Rakefile +0 -7
  17. data/SUMMARY.md +7 -11
  18. data/book.json +5 -5
  19. data/docs/additional-reading/asset-pipeline.md +8 -16
  20. data/docs/additional-reading/react-helmet.md +30 -10
  21. data/docs/additional-reading/react-router.md +52 -75
  22. data/docs/additional-reading/server-rendering-tips.md +12 -7
  23. data/docs/api/javascript-api.md +3 -3
  24. data/docs/api/redux-store-api.md +4 -2
  25. data/docs/api/view-helpers-api.md +6 -7
  26. data/docs/basics/configuration.md +60 -57
  27. data/docs/basics/deployment.md +1 -2
  28. data/docs/basics/i18n.md +44 -22
  29. data/docs/basics/installation-into-an-existing-rails-app.md +2 -2
  30. data/docs/basics/react-server-rendering.md +1 -1
  31. data/docs/basics/{generator-functions-and-railscontext.md → render-functions-and-railscontext.md} +59 -21
  32. data/docs/basics/upgrading-react-on-rails.md +50 -2
  33. data/docs/basics/webpack-configuration.md +15 -1
  34. data/docs/contributor-info/errors-with-hooks.md +45 -0
  35. data/docs/contributor-info/pull-requests.md +44 -0
  36. data/docs/misc/doctrine.md +1 -1
  37. data/docs/{misc-pending → outdated}/code-splitting.md +12 -8
  38. data/docs/{additional-reading → outdated}/heroku-deployment.md +0 -6
  39. data/docs/{basics → outdated}/how-react-on-rails-works.md +2 -2
  40. data/docs/{misc-pending → outdated}/manual-installation-overview.md +5 -5
  41. data/docs/{additional-reading → outdated}/rails-assets-relative-paths.md +3 -3
  42. data/docs/{misc-pending → outdated}/rails-assets.md +4 -7
  43. data/docs/{misc → outdated}/rails3.md +0 -0
  44. data/docs/tutorial.md +54 -34
  45. data/jest.config.js +4 -0
  46. data/lib/generators/react_on_rails/dev_tests_generator.rb +1 -1
  47. data/lib/generators/react_on_rails/generator_helper.rb +4 -6
  48. data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx +9 -8
  49. data/lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb +1 -8
  50. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx +4 -8
  51. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/store/helloWorldStore.js +1 -3
  52. data/lib/react_on_rails.rb +3 -1
  53. data/lib/react_on_rails/configuration.rb +13 -22
  54. data/lib/react_on_rails/error.rb +2 -0
  55. data/lib/react_on_rails/helper.rb +41 -91
  56. data/lib/react_on_rails/json_parse_error.rb +2 -0
  57. data/lib/react_on_rails/locales/base.rb +142 -0
  58. data/lib/react_on_rails/locales/to_js.rb +37 -0
  59. data/lib/react_on_rails/locales/to_json.rb +27 -0
  60. data/lib/react_on_rails/prerender_error.rb +11 -15
  61. data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +41 -46
  62. data/lib/react_on_rails/test_helper/ensure_assets_compiled.rb +7 -8
  63. data/lib/react_on_rails/utils.rb +14 -19
  64. data/lib/react_on_rails/version.rb +1 -1
  65. data/lib/react_on_rails/version_checker.rb +1 -0
  66. data/lib/react_on_rails/webpacker_utils.rb +13 -2
  67. data/lib/tasks/assets.rake +5 -45
  68. data/lib/tasks/locale.rake +8 -2
  69. data/package-scripts.yml +11 -8
  70. data/package.json +29 -28
  71. data/rakelib/dummy_apps.rake +1 -9
  72. data/rakelib/example_type.rb +3 -1
  73. data/rakelib/examples.rake +3 -0
  74. data/rakelib/lint.rake +2 -7
  75. data/rakelib/node_package.rake +2 -2
  76. data/rakelib/run_rspec.rake +5 -18
  77. data/react_on_rails.gemspec +3 -5
  78. data/tsconfig.json +14 -0
  79. data/webpackConfigLoader.js +3 -2
  80. data/yarn.lock +4170 -2197
  81. metadata +30 -55
  82. data/Gemfile.rails32 +0 -73
  83. data/docs/additional-reading/babel.md +0 -5
  84. data/docs/additional-reading/hot-reloading-rails-development-asset-pipeline.md +0 -47
  85. data/docs/api/ruby-api-hot-reload-view-helpers.md +0 -44
  86. data/lib/react_on_rails/assets_precompile.rb +0 -153
  87. data/lib/react_on_rails/locales_to_js.rb +0 -138
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a158a8eec25a9277154bcb4a8d884a167974992ba964d2c907fcef1f8066a2b2
4
- data.tar.gz: 51798297228cf23cb6ca2149631783c8bb6e872462740923fc9ee6ecf41a16fb
3
+ metadata.gz: cc9ebaba5554490a60cfc19fff82996c17e4e7854523baa33f5936be99086a66
4
+ data.tar.gz: 901f5cbfd43d3c74a707ed3c3d195da94d828c48a085abd9452c45dc8247e7d5
5
5
  SHA512:
6
- metadata.gz: c3dc59964bbb95cf38b79c556336d10c40dd7407c9ad9ab6ece58e2d57dbf3dc9110b7c65b94420ef3b98b3ec7fac5ebb351722fb80915d59898b80a80e0a59b
7
- data.tar.gz: 499f3cd3d46b8b2b4d1ac35de78c94139ef8bcc54f474fee579aafd98936b3d930dce7979a51e3750c8a6de8e469372b51be83e5f0097e5a5c42765263664c61
6
+ metadata.gz: 7a4fd0a61ca25319a8e87227448f6a6c69e6606f98ac6168afaa39a10e2c0a9f052c437d4082e882286082580bc48e79a50555ac2eae32983f99c56f31b326e5
7
+ data.tar.gz: ec3dd976591147b747f9ec7ac9455684ee8cb126e89872566dfce148fe9f53ac3723c77152ffdce23794b2d2ec1a8088c6f3c2defb2ee8fcf31892adb5681b26
@@ -0,0 +1,320 @@
1
+ version: 2
2
+
3
+ aliases:
4
+ - &docker-image
5
+ - image: circleci/ruby:2.6-node-browsers
6
+
7
+ # Print critical data and executables versions.
8
+ - &print-system-info
9
+ name: Print system information
10
+ command: |
11
+ echo "Linux release: "; cat /etc/issue
12
+ echo "Current user: "; whoami
13
+ echo "Current directory: "; pwd
14
+ echo "Ruby version: "; ruby -v
15
+ echo "Node version: "; node -v
16
+ echo "Yarn version: "; yarn --version
17
+ echo "Bundler version: "; bundle --version
18
+ - &lint-js
19
+ name: Linting of JS
20
+ command: yarn start lint
21
+
22
+ - &lint-ruby
23
+ name: Linting of Ruby
24
+ command: bundle exec rubocop
25
+
26
+ - &format
27
+ name: Check formatting
28
+ command: yarn start format.listDifferent
29
+
30
+ # Install/update Node modules for renderer package unless existing set of modules is satisfying Yarn.
31
+ - &install-package-node-modules
32
+ name: Install Node modules with Yarn for renderer package
33
+ command: |
34
+ yarn install --no-progress --no-emoji
35
+ yarn run eslint -v
36
+ sudo yarn global add yalc
37
+
38
+ # Install/update Node modules for dummy app unless existing set of modules is satisfying Yarn.
39
+ - &install-dummy-app-node-modules
40
+ name: Install Node modules with Yarn for dummy app
41
+ command: cd spec/dummy && yarn install --no-progress --no-emoji
42
+
43
+ # Setup yarn links for react-on-rails
44
+ - &install-yalc-publish
45
+ name: yalc publish for react-on-rails
46
+ command: yalc publish
47
+
48
+ - &install-yalc-add-react-on-rails
49
+ name: yalc add react-on-rails
50
+ command: cd spec/dummy && yalc add react-on-rails
51
+
52
+ # Install ruby gems unless existing set of gems is satisfying bundler.
53
+ - &install-dummy-app-ruby-gems
54
+ name: Install Ruby Gems for dummy app
55
+ command: |
56
+ gem install bundler
57
+ echo "Bundler version: "; bundle --version
58
+ cd spec/dummy && bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
59
+
60
+ # Install ruby gems unless existing set of gems is satisfying bundler.
61
+ - &install-package-ruby-gems
62
+ name: Install Ruby Gems for package
63
+ command: |
64
+ gem install bundler
65
+ echo "Bundler version: "; bundle --version
66
+ bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
67
+
68
+ # Restore node_modules dir from cache using yarn.lock checksum as a key.
69
+ - &restore-package-node-modules-cache
70
+ name: Restore cached node_modules directory
71
+ keys:
72
+ - v4-package-node-modules-cache-{{ checksum "yarn.lock" }}
73
+
74
+ # Restore spec/dummy/node_modules dir from cache using yarn.lock checksum as a key.
75
+ - &restore-dummy-app-node-modules-cache
76
+ name: Restore cached spec/dummy/node_modules directory
77
+ keys:
78
+ - v4-dummy-app-node-modules-cache-{{ checksum "spec/dummy/yarn.lock" }}
79
+
80
+ # Restore vendor/bundle dir from cache using Gemfile.lock checksum as a key.
81
+ - &restore-dummy-app-gem-cache
82
+ name: Restore cached Ruby Gems for dummy app
83
+ keys:
84
+ - v4-dummy-app-gem-cache-{{ checksum "spec/dummy/Gemfile.lock" }}
85
+
86
+ # Restore vendor/bundle dir from cache using react_on_rails.gemspec checksum as a key.
87
+ - &restore-package-gem-cache
88
+ name: Restore cached Ruby Gems for package
89
+ keys:
90
+ - v4-package-app-gem-cache-{{ checksum "react_on_rails.gemspec" }}
91
+
92
+ # NOTE: Sometimes CI generated docker images are not updated in time to keep up with the minimum required
93
+ # by chromedriver versions of Chrome. Just bump here Chrome version if chromedriver raises errors
94
+ - &install-latest-chrome
95
+ name: Ensure minimum required Chrome version
96
+ command: |
97
+ echo -e "Installed $(google-chrome --version)\n"
98
+ MINIMUM_REQUIRED_CHROME_VERSION=75
99
+ INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
100
+ if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
101
+ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
102
+ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
103
+ sudo apt-get update
104
+ sudo apt-get install google-chrome-stable
105
+ echo -e "\nInstalled $(google-chrome --version)"
106
+ fi
107
+
108
+ jobs:
109
+ # Lint all
110
+ lint-js-and-ruby:
111
+ docker: *docker-image
112
+ steps:
113
+ - checkout
114
+ - run: *print-system-info
115
+ - restore_cache: *restore-package-node-modules-cache
116
+ - restore_cache: *restore-package-gem-cache
117
+ - run: *install-package-ruby-gems
118
+ - run: *lint-ruby
119
+ - run: *lint-js
120
+ - run: *format
121
+
122
+ prettier:
123
+ docker: *docker-image
124
+ parallelism: 1
125
+ steps:
126
+ - checkout
127
+ - restore_cache: *restore-package-node-modules-cache
128
+ - run:
129
+ name: prettier
130
+ command: yarn start format.listDifferent
131
+
132
+ # Install Node modules for Renderer package with Yarn and save them to chache.
133
+ install-package-node-packages:
134
+ docker: *docker-image
135
+ steps:
136
+ - checkout
137
+ - run: *print-system-info
138
+ - restore_cache: *restore-package-node-modules-cache
139
+ - run: *install-package-node-modules
140
+ - save_cache:
141
+ name: Save root node_modules to cache
142
+ key: v4-package-node-modules-cache-{{ checksum "yarn.lock" }}
143
+ paths:
144
+ - node_modules
145
+
146
+
147
+ # Install Node modules for dummy app with Yarn and save them to cache.
148
+ install-dummy-app-node-packages:
149
+ docker: *docker-image
150
+ steps:
151
+ - checkout
152
+ - run: *print-system-info
153
+ - restore_cache: *restore-dummy-app-node-modules-cache
154
+ - run: *install-package-node-modules
155
+ - run: *install-yalc-publish
156
+ - run: *install-yalc-add-react-on-rails
157
+ - run: *install-dummy-app-node-modules
158
+ - save_cache:
159
+ name: Save spec/dummy/node_modules to cache
160
+ key: v4-dummy-app-node-modules-cache-{{ checksum "spec/dummy/yarn.lock" }}
161
+ paths:
162
+ - spec/dummy/node_modules
163
+ - spec/dummy/node_modules
164
+
165
+ # Install Ruby gems for package with Bundler and save them to cache.
166
+ install-package-ruby-gems:
167
+ docker: *docker-image
168
+ steps:
169
+ - checkout
170
+ - run: *print-system-info
171
+ - restore_cache: *restore-package-gem-cache
172
+ - run: *install-package-ruby-gems
173
+ - save_cache:
174
+ name: Save dummy app ruby gems to cache
175
+ key: v4-package-app-gem-cache-{{ checksum "react_on_rails.gemspec" }}
176
+ paths:
177
+ - vendor/bundle
178
+
179
+ # Install Ruby gems for dummy app with Bundler and save them to cache.
180
+ install-dummy-app-ruby-gems:
181
+ docker: *docker-image
182
+ steps:
183
+ - checkout
184
+ - run: *print-system-info
185
+ - restore_cache: *restore-dummy-app-gem-cache
186
+ - run: *install-dummy-app-ruby-gems
187
+ - save_cache:
188
+ name: Save dummy app ruby gems to cache
189
+ key: v4-dummy-app-gem-cache-{{ checksum "spec/dummy/Gemfile.lock" }}
190
+ paths:
191
+ - spec/dummy/vendor/bundle
192
+
193
+ # Build client and server bundles for dummy app with Webpack and save them to cache.
194
+ # NOTE: keeping around this cache in case we have multiple rspec suites in the future to tests
195
+ # different node renderers.
196
+ build-dummy-app-webpack-test-bundles:
197
+ docker: *docker-image
198
+ steps:
199
+ - checkout
200
+ - run: *print-system-info
201
+ - run: *install-package-node-modules
202
+ - run: *install-yalc-publish
203
+ - restore_cache: *restore-dummy-app-node-modules-cache
204
+ - run: *install-yalc-add-react-on-rails
205
+ - run: *install-dummy-app-node-modules
206
+ - run: *install-dummy-app-ruby-gems
207
+ - run:
208
+ name: Build test bundles for dummy app
209
+ command: cd spec/dummy && yarn run build:test
210
+ - save_cache:
211
+ name: Save test webpack bundles to cache (for build number checksum used by rspec job)
212
+ key: v4-dummy-app-webpack-bundle-{{ .Revision }}
213
+ paths:
214
+ - spec/dummy/public/webpack
215
+ # Run JS unit tests for Renderer package.
216
+ package-js-tests:
217
+ docker: *docker-image
218
+ steps:
219
+ - checkout
220
+ - run: *print-system-info
221
+ - restore_cache: *restore-package-node-modules-cache
222
+ - run: *install-package-node-modules
223
+ - run:
224
+ name: Run JS unit tests for Renderer package
225
+ command: yarn test
226
+
227
+ rspec-package-specs:
228
+ docker: *docker-image
229
+ steps:
230
+ - checkout
231
+ - run: *print-system-info
232
+ - restore_cache: *restore-package-gem-cache
233
+ - run: *install-package-ruby-gems
234
+ - run:
235
+ name: Run rspec tests
236
+ command: |
237
+ bundle exec rspec spec/react_on_rails
238
+ - store_test_results:
239
+ path: ~/rspec
240
+ - store_artifacts:
241
+ path: log/test.log
242
+
243
+ main:
244
+ docker: *docker-image
245
+ steps:
246
+ - checkout
247
+ - run: *print-system-info
248
+ - restore_cache: *restore-package-gem-cache
249
+ - restore_cache: *restore-dummy-app-gem-cache
250
+ - restore_cache:
251
+ name: Restore cached webpack bundles for dummy app
252
+ key: v4-dummy-app-webpack-bundle-{{ .Revision }}
253
+ - restore_cache: *restore-dummy-app-node-modules-cache
254
+ - restore_cache: *restore-package-node-modules-cache
255
+ - run: *install-package-node-modules
256
+ - run: *install-yalc-publish
257
+ - run: *install-yalc-add-react-on-rails
258
+ - run: *install-package-ruby-gems
259
+ - run: *install-dummy-app-ruby-gems
260
+ - run: *install-latest-chrome
261
+ - run:
262
+ name: Touch webpack bundles
263
+ command: touch spec/dummy/public/webpack/test/*
264
+ - run:
265
+ name: Install yalc globally
266
+ command: sudo yarn global add yalc
267
+ - run:
268
+ name: Prep for CI
269
+ # TODO -- need to leverage Circle CI containers
270
+ command: |
271
+ bundle exec rake prepare_for_ci
272
+ - run:
273
+ name: Main CI
274
+ # TODO -- need to leverage Circle CI containers
275
+ command: |
276
+ bundle exec rake run_rspec:all_dummy
277
+ - store_test_results:
278
+ path: ~/rspec
279
+ - store_artifacts:
280
+ path: spec/dummy/tmp/capybara
281
+ - store_artifacts:
282
+ path: spec/dummy/log/test.log
283
+ - store_artifacts:
284
+ path: spec/dummy/yarn-error.log
285
+
286
+ workflows:
287
+ version: 2
288
+ build-and-test:
289
+ jobs:
290
+ - install-package-node-packages
291
+ - install-package-ruby-gems
292
+ - install-dummy-app-node-packages
293
+ - install-dummy-app-ruby-gems
294
+ - lint-js-and-ruby:
295
+ requires:
296
+ - install-package-node-packages
297
+ - install-package-ruby-gems
298
+ - prettier:
299
+ filters:
300
+ branches:
301
+ ignore: master
302
+ requires:
303
+ - install-package-node-packages
304
+ - build-dummy-app-webpack-test-bundles:
305
+ requires:
306
+ - install-dummy-app-node-packages
307
+ - package-js-tests:
308
+ requires:
309
+ - install-package-node-packages
310
+ - rspec-package-specs:
311
+ requires:
312
+ - install-package-ruby-gems
313
+ - build-dummy-app-webpack-test-bundles
314
+ - install-dummy-app-ruby-gems
315
+ - main:
316
+ requires:
317
+ - install-package-ruby-gems
318
+ - install-dummy-app-ruby-gems
319
+ - install-package-node-packages
320
+ - build-dummy-app-webpack-test-bundles
@@ -2,7 +2,6 @@ node_modules
2
2
  coverage
3
3
  spec/react_on_rails/dummy-for-generators
4
4
  spec/dummy
5
- spec/dummy_no_webpacker
6
5
  node_package/lib/
7
6
  node_package/tests/node_modules
8
7
  node_package/webpack.config.js
@@ -14,3 +13,5 @@ node_package/webpack.config.js
14
13
  **/coverage/**
15
14
  **/cable.js
16
15
  **/public/packs*/*
16
+ gen-examples
17
+ bundle/
data/.eslintrc CHANGED
@@ -15,12 +15,31 @@ env:
15
15
  browser: true
16
16
  node: true
17
17
  mocha: true
18
+ jest: true
19
+
20
+ overrides:
21
+ - files: ["**/*.ts", "**/*.tsx"]
22
+ parser: "@typescript-eslint/parser"
23
+ parserOptions:
24
+ ecmaVersion: 2018
25
+ sourceType: module
26
+ project: "./tsconfig.json"
27
+ extends:
28
+ - eslint:recommended
29
+ - plugin:@typescript-eslint/eslint-recommended
30
+ - plugin:@typescript-eslint/recommended
31
+ plugins:
32
+ - "@typescript-eslint"
33
+ rules:
34
+ "@typescript-eslint/no-namespace": 0
18
35
 
19
36
  rules:
20
37
  no-console: 0
21
38
  function-paren-newline: 0
22
39
  object-curly-newline: 0
23
-
40
+ no-restricted-syntax: ["error", "SequenceExpression"]
41
+ # https://stackoverflow.com/a/59268871/5241481
42
+ import/extensions: ['error', 'ignorePackages', {"js": 'never',"ts": "never"}]
24
43
 
25
44
  # https://github.com/benmosher/eslint-plugin-import/issues/340
26
45
  import/no-extraneous-dependencies: 0
@@ -28,3 +47,6 @@ rules:
28
47
  settings:
29
48
  import/core-modules:
30
49
  - react-redux
50
+ import/resolver:
51
+ node:
52
+ extensions: [".js", ".ts", ".d.ts"]
@@ -0,0 +1 @@
1
+ github: [shakacode]
data/.gitignore CHANGED
@@ -1,7 +1,6 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
3
  /Gemfile.lock
4
- /Gemfile.rails32.lock
5
4
  /_yardoc/
6
5
  /coverage/
7
6
  /doc/
@@ -32,3 +31,6 @@ npm-debug.*
32
31
  /gen-examples
33
32
 
34
33
  .DS_Store
34
+
35
+ .yalc
36
+ yalc.lock
@@ -1 +1,10 @@
1
- node_modules
1
+ node_modules/
2
+ package.json
3
+ tmp/
4
+ coverage/
5
+ **/app/assets/webpack/
6
+ spec/dummy/public
7
+ gen-examples/examples/*
8
+ node_package/lib/*
9
+ spec/react_on_rails/dummy-for-generators/app/javascript/bundles/HelloWorld/*
10
+ bundle/
@@ -8,6 +8,9 @@ bracketSpacing: true
8
8
  jsxBracketSameLine: false
9
9
  parser: flow
10
10
 
11
+ extends:
12
+ - tslint-config-prettier
13
+
11
14
  overrides:
12
15
  - files: "*.@(css|scss)"
13
16
  options:
@@ -3,7 +3,7 @@
3
3
 
4
4
  AllCops:
5
5
  DisplayCopNames: true
6
- TargetRubyVersion: 2.2
6
+ TargetRubyVersion: 2.5
7
7
 
8
8
  Include:
9
9
  - '**/Rakefile'
@@ -27,12 +27,8 @@ AllCops:
27
27
  - 'spec/react_on_rails/dummy-for-generators/**/*'
28
28
  - 'spec/dummy/Procfile.*'
29
29
  - 'spec/dummy/bin/**/*'
30
- - 'spec/dummy/client/node_modules/**/*'
31
- - 'spec/dummy/client/node_modules/**/.*'
32
- - 'spec/dummy_no_webpacker/Procfile.*'
33
- - 'spec/dummy_no_webpacker/bin/**/*'
34
- - 'spec/dummy_no_webpacker/client/node_modules/**/*'
35
- - 'spec/dummy_no_webpacker/client/node_modules/**/.*'
30
+ - 'spec/dummy/node_modules/**/*'
31
+ - 'spec/dummy/node_modules/**/.*'
36
32
  - 'gen-examples/examples/**/.*'
37
33
  - 'gen-examples/examples/**/*'
38
34
 
@@ -40,13 +36,12 @@ Naming/FileName:
40
36
  Exclude:
41
37
  - 'Gemfile'
42
38
  - 'spec/dummy/Gemfile'
43
- - 'spec/dummy_no_webpacker/Gemfile'
44
39
 
45
40
  # Turn off until we require 2.3 ruby
46
41
  Style/SafeNavigation:
47
42
  Enabled: false
48
43
 
49
- Metrics/LineLength:
44
+ Layout/LineLength:
50
45
  Max: 120
51
46
 
52
47
  Style/StringLiterals:
@@ -55,11 +50,20 @@ Style/StringLiterals:
55
50
  Style/Documentation:
56
51
  Enabled: false
57
52
 
53
+ Style/HashEachMethods:
54
+ Enabled: true
55
+
56
+ Style/HashTransformKeys:
57
+ Enabled: true
58
+
59
+ Style/HashTransformValues:
60
+ Enabled: true
61
+
58
62
  Lint/AssignmentInCondition:
59
63
  Exclude:
60
64
  - 'spec/dummy/bin/spring'
61
65
 
62
- Lint/HandleExceptions:
66
+ Lint/SuppressedException:
63
67
  Exclude:
64
68
  - 'spec/dummy/bin/rails'
65
69
  - 'spec/dummy/bin/rake'
@@ -86,9 +90,31 @@ Metrics/MethodLength:
86
90
  Metrics/ModuleLength:
87
91
  Max: 180
88
92
 
93
+ Naming/RescuedExceptionsVariableName:
94
+ Enabled: false
95
+
89
96
  Style/GlobalVars:
90
97
  Exclude:
91
98
  - 'spec/dummy/config/environments/development.rb'
92
99
 
93
100
  Style/FrozenStringLiteralComment:
94
- EnforcedStyle: when_needed
101
+ EnforcedStyle: always
102
+
103
+ Layout/EmptyLinesAroundAttributeAccessor:
104
+ Enabled: true
105
+
106
+ Layout/SpaceAroundMethodCallOperator:
107
+ Enabled: true
108
+
109
+ Lint/RaiseException:
110
+ Enabled: true
111
+
112
+ Lint/StructNewOverride:
113
+ Enabled: true
114
+
115
+ Style/ExponentialNotation:
116
+ Enabled: true
117
+
118
+ Style/SlicingWithRange:
119
+ Enabled: true
120
+