Skip to content

Commit

Permalink
Clean up config files (and use new .config dir) (#613)
Browse files Browse the repository at this point in the history
* Remove unused config files

* Move `eslint` config file to `.config` directory

* Upgrade rubocop version

You will have to run `bundle install` locally.

* Move rubocop and erblint config to `.config` folder

* Add Readme to `.config` directory

* Move `coffeelint` config files to `.config/` folder

* Fix config directory in linter workflow

* Upgrade ESLint version to `9.0.0`

* Fix wording in eslint config comment

* Delete unused `.rspec`

* Remove `.coffeelint.json` config

* Update `.config` Readme

* Fix relative path in rubocop config
  • Loading branch information
Splines authored Apr 16, 2024
1 parent 33ec419 commit 098da70
Show file tree
Hide file tree
Showing 17 changed files with 103 additions and 310 deletions.
1 change: 0 additions & 1 deletion .browserslistrc

This file was deleted.

135 changes: 0 additions & 135 deletions .coffeelint.json

This file was deleted.

1 change: 1 addition & 0 deletions .erb-lint.yml → .config/.erb-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Not used right now
---
EnableDefaultLinters: true
linters:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml → .config/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Style/MethodCallWithArgsParentheses:
AllowedPatterns: [^redirect_]
# Don't enforce in migrations, as we have methods like `add_column`,
# `change_column` etc. and parentheses would be very annoying there.
Exclude: ["db/**/*"]
Exclude: ["../db/**/*"]

Style/RedundantReturn:
AllowMultipleReturnValues: true
Expand Down
6 changes: 6 additions & 0 deletions .config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Config settings

This directory contains configuration files for the project according to the [`.config/` directory proposal](https://github.com/pi0/config-dir).

Note that we currently don't use these files (but might in the near future):
- `.erb-lint.myl`
2 changes: 1 addition & 1 deletion eslint.config.mjs → .config/eslint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default [
js.configs.recommended,
// Allow linting of ERB files, see https://github.com/Splines/eslint-plugin-erb
erb.configs.recommended,
// Globally ignore the following files
// Globally ignore the following paths
{
ignores: [
"node_modules/",
Expand Down
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ docker/developement/Dockerfile
docker/run_tests/docker-compose.yml
docker/run_tests/Dockerfile
**/.git
.travis*
LICENSE
README.md
mampf-gui-transparent.png
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ jobs:
if: ${{ steps.js-changed.outputs.changed-files != ''}}
run: |
echo "🚨 Running ESLint version: $(yarn run --silent eslint --version)"
yarn run eslint --max-warnings 0 --no-warn-ignored ${{ steps.js-changed.outputs.changed-files }}
yarn run eslint --config ./.config/eslint.mjs --max-warnings 0 --no-warn-ignored ${{ steps.js-changed.outputs.changed-files }}
3 changes: 0 additions & 3 deletions .rspec

This file was deleted.

15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"eslint.experimental.useFlatConfig": true,
// this disables VSCode built-in formatter (instead we want to use ESLint)
"javascript.validate.enable": false,
"eslint.options": {
"overrideConfigFile": ".config/eslint.mjs"
},
//////////////////////////////////////
// HTML
//////////////////////////////////////
Expand Down Expand Up @@ -93,5 +96,6 @@
"commontator",
"helpdesk",
"turbolinks"
]
],
"rubyLsp.customRubyCommand": "set -o allexport && . ./docker-dummy.env && set +o allexport"
}
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ group :development, :docker_development do
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem "marcel"
gem "pgreset"
gem "rubocop", "~> 1.57", require: false
gem "rubocop-performance", "~> 1.16", require: false
gem "rubocop-rails", "~> 2.22", ">= 2.22.1", require: false
gem "rubocop", "~> 1.63", require: false
gem "rubocop-performance", "~> 1.21", require: false
gem "rubocop-rails", "~> 2.24", require: false
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
# gem 'bullet'
Expand Down
33 changes: 17 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ GEM
js-routes (1.4.9)
railties (>= 4)
sprockets-rails
json (2.6.3)
json (2.7.2)
jsonapi-renderer (0.2.2)
kaminari (1.2.2)
activesupport (>= 4.1.0)
Expand Down Expand Up @@ -359,8 +359,8 @@ GEM
options (2.3.2)
orm_adapter (0.5.0)
pairing_heap (3.0.0)
parallel (1.23.0)
parser (3.2.2.4)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
pdf-reader (2.11.0)
Expand Down Expand Up @@ -443,7 +443,7 @@ GEM
ffi (~> 1.0)
redis-client (0.14.1)
connection_pool
regexp_parser (2.8.2)
regexp_parser (2.9.0)
request_store (1.5.1)
rack (>= 1.4)
responders (3.1.0)
Expand Down Expand Up @@ -484,26 +484,27 @@ GEM
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-support (3.12.0)
rubocop (1.57.2)
rubocop (1.63.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.22.1)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.24.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-graphviz (1.2.5)
rexml
ruby-progressbar (1.13.0)
Expand Down Expand Up @@ -701,9 +702,9 @@ DEPENDENCIES
rgl
rqrcode
rspec-rails
rubocop (~> 1.57)
rubocop-performance (~> 1.16)
rubocop-rails (~> 2.22, >= 2.22.1)
rubocop (~> 1.63)
rubocop-performance (~> 1.21)
rubocop-rails (~> 2.24)
rubyzip (~> 2.3.0)
sass-rails (>= 6)
selenium-webdriver
Expand Down
4 changes: 0 additions & 4 deletions app/views/layouts/_head.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<%= javascript_include_tag 'application',
'data-turbolinks-track': 'reload' %>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/polyfill.min.js"
integrity="sha256-WRc/eG3R84AverJv0zmqxAmdwQxstUpqkiE+avJ3WSo="
crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cytoscape.min.js"
integrity="sha256-vaWKzwOlHpJzvE1q0q9nfurKXD8xeGaOhdMa6eea+wM="
crossorigin="anonymous">
Expand Down
70 changes: 0 additions & 70 deletions babel.config.js

This file was deleted.

Loading

0 comments on commit 098da70

Please sign in to comment.