Skip to content

Commit

Permalink
Merge branch 'dev' into pipeline/tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Apr 24, 2024
2 parents 840c63d + 2b9e639 commit d11dc2d
Show file tree
Hide file tree
Showing 170 changed files with 5,697 additions and 1,736 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`
59 changes: 58 additions & 1 deletion eslint.config.mjs → .config/eslint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,59 @@ const customGlobals = {

// Common global methods
initBootstrapPopovers: "readable",

// Thyme & Annotation tool globals
// TODO: This is a "hack" right now to get rid of "xy is not defined" error
// messages in ESLint.
// In an ideal world, we would use the new ES6 module syntax, but that is a
// bigger undertaking as we have to get rid of rails webpacker and use
// webpack itself or even better try to use the new import maps.
// See the links in this issue: https://github.com/MaMpf-HD/mampf/issues/454
thyme: "readable",
video: "readable",
thymeAttributes: "readable",
thymeKeyShortcuts: "readable",
thymeUtility: "readable",
Resizer: "readable",

ControlBarHider: "readable",

ChapterManager: "readable",
DisplayManager: "readable",
MetadataManager: "readable",

Component: "readable",
Category: "readable",
CategoryEnum: "readable",
Subcategory: "readable",
VolumeBar: "readable",
TimeButton: "readable",
MuteButton: "readable",
PlayButton: "readable",
SeekBar: "readable",
FullScreenButton: "readable",
NextChapterButton: "readable",
PreviousChapterButton: "readable",
SpeedSelector: "readable",
AddItemButton: "readable",
AddReferenceButton: "readable",
AddScreenshotButton: "readable",
IaBackButton: "readable",
IaButton: "readable",
IaCloseButton: "readable",

seekBar: "writable",

Annotation: "readable",
AnnotationManager: "readable",
AnnotationArea: "readable",
AnnotationsToggle: "readable",
AnnotationCategoryToggle: "readable",
AnnotationButton: "readable",
Heatmap: "readable",

// KaTeX
renderMathInElement: "readable",
};

// We don't have cypress linting yet, as the Cypress ESLint plugin
Expand All @@ -43,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 Expand Up @@ -82,5 +135,9 @@ export default [
...globals.node,
},
},
linterOptions: {
// see https://github.com/Splines/eslint-plugin-erb/releases/tag/v2.0.1
reportUnusedDisableDirectives: "off",
},
},
];
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 }}
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

18 changes: 16 additions & 2 deletions .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 All @@ -30,7 +33,9 @@
"editor.formatOnSave": true
},
"rubyLsp.formatter": "rubocop",
"rubyLsp.rubyVersionManager": "rbenv",
"rubyLsp.rubyVersionManager": {
"identifier": "rbenv"
},
"rubyLsp.enabledFeatures": {
"codeActions": true,
"diagnostics": true,
Expand Down Expand Up @@ -89,9 +94,18 @@
}
],
//////////////////////////////////////
// Git
//////////////////////////////////////
"git.inputValidation": true,
"git.inputValidationSubjectLength": 50,
"git.inputValidationLength": 72,
//////////////////////////////////////
// Spell Checker
//////////////////////////////////////
"cSpell.words": [
"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
Loading

0 comments on commit d11dc2d

Please sign in to comment.