Skip to content

Commit

Permalink
Merge pull request #16 from dftba-club/2024-07-02-2
Browse files Browse the repository at this point in the history
2024 07 02 2 Merge in upstream changes
  • Loading branch information
nomad-geek authored Jul 3, 2024
2 parents 7d1fd44 + bb4dc8a commit 781b94a
Show file tree
Hide file tree
Showing 504 changed files with 7,403 additions and 4,642 deletions.
6 changes: 0 additions & 6 deletions .bundler-audit.yml

This file was deleted.

29 changes: 12 additions & 17 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# For details, see https://github.com/devcontainers/images/tree/main/src/ruby
FROM mcr.microsoft.com/devcontainers/ruby:1-3.3-bookworm

# Install Rails
# RUN gem install rails webdrivers

ARG NODE_VERSION="20"
RUN . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends libicu-dev libidn11-dev ffmpeg imagemagick libvips42 libpam-dev

# [Optional] Uncomment this line to install additional gems.
RUN gem install foreman

# [Optional] Uncomment this line to install global node packages.
RUN . /usr/local/share/nvm/nvm.sh && corepack enable 2>&1

COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
# Install node version from .nvmrc
WORKDIR /app
COPY .nvmrc .
RUN /bin/bash --login -i -c "nvm install"

# Install additional OS packages
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get -y install --no-install-recommends libicu-dev libidn11-dev ffmpeg imagemagick libvips42 libpam-dev

# Move welcome message to where VS Code expects it
COPY .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
2 changes: 1 addition & 1 deletion .devcontainer/codespaces/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Mastodon on GitHub Codespaces",
"dockerComposeFile": "../docker-compose.yml",
"dockerComposeFile": "../compose.yaml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ services:
app:
working_dir: /workspaces/mastodon/
build:
context: .
dockerfile: Dockerfile
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspaces/mastodon:cached
environment:
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Mastodon on local machine",
"dockerComposeFile": "docker-compose.yml",
"dockerComposeFile": "compose.yaml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

Expand Down
30 changes: 4 additions & 26 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ module.exports = defineConfig({
es6: true,
},

globals: {
ATTACHMENT_HOST: false,
},

parser: '@typescript-eslint/parser',

plugins: [
Expand Down Expand Up @@ -79,7 +75,7 @@ module.exports = defineConfig({
],
},
],
'no-empty': 'off',
'no-empty': ['error', { "allowEmptyCatch": true }],
'no-restricted-properties': [
'error',
{ property: 'substring', message: 'Use .slice instead of .substring.' },
Expand All @@ -94,7 +90,6 @@ module.exports = defineConfig({
message: "Use '·' (middle dot) instead of '•' (bullet)",
},
],
'no-self-assign': 'off',
'no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
Expand All @@ -119,12 +114,10 @@ module.exports = defineConfig({
'react/jsx-tag-spacing': 'error',
'react/jsx-uses-react': 'off', // not needed with new JSX transform
'react/jsx-wrap-multilines': 'error',
'react/no-deprecated': 'off',
'react/react-in-jsx-scope': 'off', // not needed with new JSX transform
'react/self-closing-comp': 'error',

// recommended values found in https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/v6.8.0/src/index.js#L46
'jsx-a11y/accessible-emoji': 'warn',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/media-has-caption': 'off',
Expand All @@ -139,23 +132,6 @@ module.exports = defineConfig({
// ],
'jsx-a11y/no-interactive-element-to-noninteractive-role': 'off',
// recommended rule is:
// 'jsx-a11y/no-noninteractive-element-interactions': [
// 'error',
// {
// body: ['onError', 'onLoad'],
// iframe: ['onError', 'onLoad'],
// img: ['onError', 'onLoad'],
// },
// ],
'jsx-a11y/no-noninteractive-element-interactions': [
'warn',
{
handlers: [
'onClick',
],
},
],
// recommended rule is:
// 'jsx-a11y/no-noninteractive-tabindex': [
// 'error',
// {
Expand All @@ -165,7 +141,6 @@ module.exports = defineConfig({
// },
// ],
'jsx-a11y/no-noninteractive-tabindex': 'off',
'jsx-a11y/no-onchange': 'off',
// recommended is full 'error'
'jsx-a11y/no-static-element-interactions': [
'warn',
Expand Down Expand Up @@ -366,6 +341,9 @@ module.exports = defineConfig({
// Disable formatting rules that have been enabled in the base config
'indent': 'off',

// This is not needed as we use noImplicitReturns, which handles this in addition to understanding types
'consistent-return': 'off',

'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],

'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
Expand Down
4 changes: 2 additions & 2 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ coverage:
status:
project:
default:
# Github status check is not blocking
# GitHub status check is not blocking
informational: true
patch:
default:
# Github status check is not blocking
# GitHub status check is not blocking
informational: true
3 changes: 2 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
'customManagers:dockerfileVersions',
':labels(dependencies)',
':prConcurrentLimitNone', // Remove limit for open PRs at any time.
':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour.
Expand Down Expand Up @@ -59,7 +60,7 @@
dependencyDashboardApproval: true,
},
{
// Update Github Actions and Docker images weekly
// Update GitHub Actions and Docker images weekly
matchManagers: ['github-actions', 'dockerfile', 'docker-compose'],
extends: ['schedule:weekly'],
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to the Github Container registry
- name: Log in to the GitHub Container registry
if: contains(inputs.push_to_images, 'ghcr.io')
uses: docker/login-action@v3
with:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/bundler-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ on:
paths:
- 'Gemfile*'
- '.ruby-version'
- '.bundler-audit.yml'
- '.github/workflows/bundler-audit.yml'

pull_request:
paths:
- 'Gemfile*'
- '.ruby-version'
- '.bundler-audit.yml'
- '.github/workflows/bundler-audit.yml'

schedule:
Expand All @@ -23,12 +21,17 @@ jobs:
security:
runs-on: ubuntu-latest

env:
BUNDLE_ONLY: development

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run bundler-audit
run: bundle exec bundler-audit
run: bundle exec bundler-audit check --update
4 changes: 2 additions & 2 deletions .github/workflows/crowdin-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ jobs:
title: 'New Crowdin Translations (automated)'
author: 'GitHub Actions <[email protected]>'
body: |
New Crowdin translations, automated with Github Actions
New Crowdin translations, automated with GitHub Actions
See `.github/workflows/crowdin-download.yml`
This PR will be updated every day with new translations.
Due to a limitation in Github Actions, checks are not running on this PR without manual action.
Due to a limitation in GitHub Actions, checks are not running on this PR without manual action.
If you want to run the checks, then close and re-open it.
branch: i18n/crowdin/translations
base: main
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/lint-haml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ on:
jobs:
lint:
runs-on: ubuntu-latest

env:
BUNDLE_ONLY: development

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run haml-lint
run: |
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/lint-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,24 @@ jobs:
lint:
runs-on: ubuntu-latest

env:
BUNDLE_ONLY: development

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Set-up RuboCop Problem Matcher
uses: r7kamura/rubocop-problem-matchers-action@v1

- name: Run rubocop
run: bundle exec rubocop
run: bin/rubocop

- name: Run brakeman
if: always() # Run both checks, even if the first failed
run: bundle exec brakeman
run: bin/brakeman
2 changes: 1 addition & 1 deletion .github/workflows/rebase-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Check for merge conflicts
uses: eps1lon/actions-label-merge-conflict@releases/2.x
uses: eps1lon/actions-label-merge-conflict@v3
with:
dirtyLabel: 'rebase needed :construction:'
repoToken: '${{ secrets.GITHUB_TOKEN }}'
Expand Down
95 changes: 0 additions & 95 deletions .github/workflows/test-migrations-two-step.yml

This file was deleted.

Loading

0 comments on commit 781b94a

Please sign in to comment.