Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment #923

Merged
merged 22 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6b3eabc
chore(deps-dev): bump wrangler from 3.81.0 to 3.82.0
dependabot[bot] Nov 4, 2024
923eee0
chore(deps-dev): bump @typescript-eslint/eslint-plugin
dependabot[bot] Nov 4, 2024
7eb42ee
chore(deps-dev): bump @sentry/types from 8.35.0 to 8.36.0
dependabot[bot] Nov 4, 2024
912f41b
Merge pull request #916 from serlo/dependabot/npm_and_yarn/sentry/typ…
elbotho Nov 5, 2024
a15d3e2
Merge pull request #915 from serlo/dependabot/npm_and_yarn/typescript…
elbotho Nov 5, 2024
7f35d55
Merge pull request #914 from serlo/dependabot/npm_and_yarn/wrangler-3…
elbotho Nov 5, 2024
f6ec148
chore(deps-dev): bump typescript from 5.6.2 to 5.6.3
dependabot[bot] Nov 5, 2024
1be07d2
Merge pull request #912 from serlo/dependabot/npm_and_yarn/typescript…
elbotho Nov 5, 2024
481d520
chore: migrate eslint config and update package to 9*
elbotho Nov 5, 2024
571bfb2
chore: update node version
elbotho Nov 5, 2024
49ab370
Merge pull request #917 from serlo/chore/migrate-eslint-config
hugotiburtino Nov 5, 2024
fd5944d
chore(deps-dev): bump @testing-library/jest-dom from 6.5.0 to 6.6.3
dependabot[bot] Nov 11, 2024
fa409e2
chore(deps-dev): bump msw from 2.4.3 to 2.6.4
dependabot[bot] Nov 11, 2024
bf8d098
chore(deps-dev): bump @cloudflare/workers-types
dependabot[bot] Nov 11, 2024
64efd9d
chore(deps-dev): bump wrangler from 3.84.1 to 3.86.1
dependabot[bot] Nov 11, 2024
5cee152
chore(deps-dev): bump @typescript-eslint/parser from 8.11.0 to 8.14.0
dependabot[bot] Nov 11, 2024
9a83ec3
Merge pull request #918 from serlo/dependabot/npm_and_yarn/testing-li…
elbotho Nov 12, 2024
f60f7fd
Merge pull request #920 from serlo/dependabot/npm_and_yarn/cloudflare…
elbotho Nov 12, 2024
3c999a2
Merge pull request #921 from serlo/dependabot/npm_and_yarn/wrangler-3…
elbotho Nov 12, 2024
038dfce
Merge pull request #922 from serlo/dependabot/npm_and_yarn/typescript…
elbotho Nov 12, 2024
c294787
test(frontend-proxy): adapt code after msw improvement
hugotiburtino Nov 14, 2024
30ddd1e
Merge pull request #919 from serlo/dependabot/npm_and_yarn/msw-2.6.4
hugotiburtino Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 0 additions & 117 deletions .eslintrc.json

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/msw-npm-2.4.3-d357f75dd0-bfbc9b5691.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions __tests__/frontend-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test('reports to sentry when frontend responded with redirect', async () => {
const env = localTestEnvironment()
const redirectResponse = await env.fetch({
subdomain: 'en',
pathname: '/math',
pathname: '/api/.ory/login',
})

expect(redirectResponse.status).toEqual(302)
Expand All @@ -68,7 +68,7 @@ test('reports to sentry when frontend responded with redirect', async () => {
context: {
backendUrl: env.createUrl({
subdomain: 'frontend',
pathname: '/en/math',
pathname: '/api/.ory/login',
}),
location: 'https://frontend.serlo.org/',
},
Expand Down
166 changes: 166 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import _import from 'eslint-plugin-import'
import react from 'eslint-plugin-react'
import _deprecation from 'eslint-plugin-deprecation'
import { fixupPluginRules } from '@eslint/compat'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

export default [
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:react/recommended',
'prettier',
),
{
plugins: {
'@typescript-eslint': typescriptEslint,
import: fixupPluginRules(_import),
react,
deprecation: fixupPluginRules(_deprecation),
},

languageOptions: {
globals: {
...globals.browser,
...globals.jest,
...globals.node,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: 'commonjs',

parserOptions: {
project: ['tsconfig.json'],
},
},

settings: {
react: {
pragma: 'h',
version: '16.8',
},
},

rules: {
'no-duplicate-imports': 'error',
'no-unused-vars': 'off',
'no-console': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-this-alias': 'warn',

'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],

'@typescript-eslint/no-use-before-define': [
'error',
{
classes: false,
functions: false,
typedefs: false,
},
],

'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/prefer-ts-expect-error': 'error',
'deprecation/deprecation': 'warn',
'import/export': 'error',

'import/extensions': [
'error',
'never',
{
json: 'always',
},
],

'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-absolute-path': 'error',
'import/no-commonjs': 'error',
'import/no-cycle': 'error',
'import/no-default-export': 'error',
'import/prefer-default-export': 'off',
'import/no-deprecated': 'error',

'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'__stories__/**/*',
'__tests-pacts__/**/*',
'__tests__/**/*',
'scripts/**/*',
'jest.setup.ts',
'webpack.config.js',
],

optionalDependencies: false,
},
],

'import/no-internal-modules': [
'error',
{
allow: ['msw/node'],
},
],

'import/no-mutable-exports': 'error',
'import/no-self-import': 'error',
'import/no-unassigned-import': 'error',

'import/no-useless-path-segments': [
'error',
{
noUselessIndex: true,
},
],

'import/order': [
'error',
{
alphabetize: {
order: 'asc',
},

groups: [
['builtin', 'external', 'internal'],
['parent', 'sibling', 'index', 'unknown'],
],

'newlines-between': 'always',
},
],

'react/jsx-boolean-value': 'error',
'react/jsx-curly-brace-presence': 'error',
'react/jsx-fragments': ['error', 'syntax'],
'react/prop-types': 'off',
},
},
]
24 changes: 14 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,39 @@
"toucan-js": "^4.0.0"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20241018.0",
"@cloudflare/workers-types": "^4.20241106.0",
"@eslint/compat": "^1.2.2",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"@iarna/toml": "^2.2.5",
"@jest/globals": "^29.7.0",
"@sentry/types": "^8.35.0",
"@testing-library/jest-dom": "^6.5.0",
"@sentry/types": "^8.36.0",
"@testing-library/jest-dom": "^6.6.3",
"@types/iarna__toml": "^2.0.5",
"@types/jest": "^29.5.14",
"@typescript-eslint/eslint-plugin": "^8.12.0",
"@typescript-eslint/parser": "^8.11.0",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.14.0",
"cross-env": "^7.0.3",
"depcheck": "^1.4.7",
"eslint": "^8.57.0",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.12.0",
"jest": "^29.7.0",
"msw": "^2.4.3",
"msw": "^2.6.4",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3",
"prettier-plugin-packagejson": "^2.5.3",
"prettier-plugin-sh": "^0.14.0",
"ts-jest": "^29.2.5",
"ts-unused-exports": "^10.1.0",
"typescript": "^5.6.2",
"wrangler": "^3.80.3"
"typescript": "^5.6.3",
"wrangler": "^3.86.1"
},
"packageManager": "yarn@3.6.0",
"engines": {
"node": "^18.0.0"
"node": "^20.0.0"
}
}
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { robotsTxt } from './robots'
import { sentryHelloWorld } from './sentry'
import { SentryFactory, CFEnvironment } from './utils'

// eslint-disable-next-line import/no-default-export
export default {
async fetch(
request: Request,
Expand Down
Loading