Skip to content

Commit

Permalink
Merge pull request #1468 from S-H-GAMELINKS/merge/mastodon-main-branch
Browse files Browse the repository at this point in the history
Merge/mastodon main branch
  • Loading branch information
S-H-GAMELINKS authored Mar 5, 2024
2 parents 871d9b3 + 9077460 commit 35ac351
Show file tree
Hide file tree
Showing 455 changed files with 7,702 additions and 5,835 deletions.
18 changes: 9 additions & 9 deletions .devcontainer/codespaces/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

"features": {
"ghcr.io/devcontainers/features/sshd:1": {},
"ghcr.io/devcontainers/features/sshd:1": {}
},

"runServices": ["app", "db", "redis"],
Expand All @@ -15,16 +15,16 @@
"portsAttributes": {
"3000": {
"label": "web",
"onAutoForward": "notify",
"onAutoForward": "notify"
},
"4000": {
"label": "stream",
"onAutoForward": "silent",
},
"onAutoForward": "silent"
}
},

"otherPortsAttributes": {
"onAutoForward": "silent",
"onAutoForward": "silent"
},

"remoteEnv": {
Expand All @@ -33,7 +33,7 @@
"STREAMING_API_BASE_URL": "https://${localEnv:CODESPACE_NAME}-4000.app.github.dev",
"DISABLE_FORGERY_REQUEST_PROTECTION": "true",
"ES_ENABLED": "",
"LIBRE_TRANSLATE_ENDPOINT": "",
"LIBRE_TRANSLATE_ENDPOINT": ""
},

"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
Expand All @@ -43,7 +43,7 @@
"customizations": {
"vscode": {
"settings": {},
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"],
},
},
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"]
}
}
}
16 changes: 8 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

"features": {
"ghcr.io/devcontainers/features/sshd:1": {},
"ghcr.io/devcontainers/features/sshd:1": {}
},

"forwardPorts": [3000, 4000],
Expand All @@ -14,17 +14,17 @@
"3000": {
"label": "web",
"onAutoForward": "notify",
"requireLocalPort": true,
"requireLocalPort": true
},
"4000": {
"label": "stream",
"onAutoForward": "silent",
"requireLocalPort": true,
},
"requireLocalPort": true
}
},

"otherPortsAttributes": {
"onAutoForward": "silent",
"onAutoForward": "silent"
},

"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
Expand All @@ -34,7 +34,7 @@
"customizations": {
"vscode": {
"settings": {},
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"],
},
},
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"]
}
}
}
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ module.exports = defineConfig({
'plugin:import/typescript',
'plugin:promise/recommended',
'plugin:jsdoc/recommended-typescript',
'plugin:prettier/recommended',
],

parserOptions: {
Expand All @@ -347,6 +346,9 @@ module.exports = defineConfig({
},

rules: {
// Disable formatting rules that have been enabled in the base config
'indent': 'off',

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

'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/setup-javascript/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ inputs:
description: Only install production dependencies
default: 'false'

env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

runs:
using: 'composite'
steps:
Expand Down
4 changes: 1 addition & 3 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
comment: false # Do not leave PR comments
coverage:
status:
project:
Expand All @@ -8,6 +9,3 @@ coverage:
default:
# Github status check is not blocking
informational: true
comment:
# Only write a comment in PR if there are changes
require_changes: true
18 changes: 18 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check formatting
on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest

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

- name: Set up Javascript environment
uses: ./.github/actions/setup-javascript

- name: Check formatting with Prettier
run: yarn format:check
2 changes: 1 addition & 1 deletion .github/workflows/lint-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
- run: echo "::add-matcher::.github/stylelint-matcher.json"

- name: Stylelint
run: yarn lint:sass
run: yarn lint:css
2 changes: 1 addition & 1 deletion .github/workflows/lint-haml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
- name: Run haml-lint
run: |
echo "::add-matcher::.github/workflows/haml-lint-problem-matcher.json"
bundle exec haml-lint
bundle exec haml-lint --reporter github
38 changes: 0 additions & 38 deletions .github/workflows/lint-json.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/lint-md.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/lint-yml.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,16 @@ jobs:
- name: Load User data
run: bundle exec rails r db/seeds/e2e/user.rb

- name: Accept User
run: bin/tootctl accounts approve S_H_

- name: Cypress run with env
run: bundle exec rake cypress:run
env:
CYPRESS_email: [email protected]
CYPRESS_password: MasterChief117
CYPRESS_RAILS_HOST: localhost
CYPRESS_RAILS_PORT: 3000
CYPRESS_RAILS_CYPRESS_OPTS: --record
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
# Ignore Docker option files
docker-compose.override.yml

# Ignore public
/public/assets
/public/emoji
/public/packs
/public/packs-test
/public/system

# Ignore emoji map file
/app/javascript/mastodon/features/emoji/emoji_map.json

Expand Down Expand Up @@ -83,4 +90,5 @@ public/gallery/static/css/*.css
# Ignore Twitetr theme json
app/javascript/styles/twitter/package.json

# Process a few selected JS files
!lint-staged.config.js
11 changes: 0 additions & 11 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ Rails/FilePath:
Rails/HttpStatus:
EnforcedStyle: numeric

# Reason: Allowed in boot ENV checker
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsexit
Rails/Exit:
Exclude:
- 'config/boot.rb'

# Reason: Conflicts with `Lint/UselessMethodDefinition` for inherited controller actions
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railslexicallyscopedactionfilter
Rails/LexicallyScopedActionFilter:
Expand Down Expand Up @@ -217,11 +211,6 @@ Style/RedundantBegin:
Style/RescueStandardError:
EnforcedStyle: implicit

# Reason: Simplify some spec layouts
# https://docs.rubocop.org/rubocop/cops_style.html#stylesemicolon
Style/Semicolon:
AllowAsExpressionSeparator: true

# Reason: Originally disabled for CodeClimate, and no config consensus has been found
# https://docs.rubocop.org/rubocop/cops_style.html#stylesymbolarray
Style/SymbolArray:
Expand Down
Loading

0 comments on commit 35ac351

Please sign in to comment.