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

Experimental usage of rspack #664

Merged
merged 11 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

37 changes: 0 additions & 37 deletions .eslintrc.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# diasble CI
[ -n "$CI" ] && exit 0

Expand Down
3 changes: 0 additions & 3 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# disable CI
[ -n "$CI" ] && exit 0

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build environment
FROM node:20.12.1-alpine3.19 AS build
FROM node:20.17.0-alpine3.19 AS build

WORKDIR /app

Expand All @@ -8,7 +8,7 @@ RUN npm ci
RUN npm run build

# production environment
FROM nginx:1.25.4-alpine-slim
FROM nginx:1.27.1-alpine-slim

COPY --from=build /app/dist /var/www/html
COPY --from=build /app/nginx/templates /etc/nginx/templates
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.12.1-alpine3.19
FROM node:20.17.0-alpine3.19

WORKDIR /app

Expand Down
22 changes: 22 additions & 0 deletions assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title><%= title %></title>
<base href="<%= appPrefix %>" />
<link href="favicon.ico" rel="icon">
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<script src="./config/admin-client-config.js"></script>
<script>
if (!window.shogunApplicationConfig) {
console.warn('No SHOGun application config found. Loading fallback.');
document.write('<script src="./fallbackConfig.js">\x3C/script>')
}
</script>
<div id="app" class="app"></div>
</body>
</html>
2 changes: 1 addition & 1 deletion babel.config.cjs → babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
'@babel/preset-react'
],
plugins: [
'@babel/proposal-class-properties',
'@babel/transform-class-properties',
'@babel/proposal-object-rest-spread',
'@babel/proposal-optional-chaining',
[
Expand Down
67 changes: 67 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// @ts-check
import globals from 'globals';
import importPlugin from 'eslint-plugin-import';
import eslintTerrestris from '@terrestris/eslint-config-typescript';
import eslint from '@eslint/js';
import tsEslint from 'typescript-eslint';
import stylisticEslint from '@stylistic/eslint-plugin'

export default tsEslint.config({
extends: [
eslint.configs.recommended,
...tsEslint.configs.recommended,
...tsEslint.configs.stylistic,
importPlugin.flatConfigs.recommended
],
files: [
'**/*.ts'
],
ignores: [
'**/*.spec.ts',
'**/jest/__mocks__/*.ts'
],
languageOptions: {
ecmaVersion: 2022,
globals: globals.browser,
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname
},
},
plugins: {
'@stylistic': stylisticEslint
},
rules: {
...eslintTerrestris.rules,
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'import/no-unresolved': 'off',
'import/named': 'off',
'import/order': ['warn', {
groups: [
'builtin',
'external',
'parent',
'sibling',
'index',
'object'
],
pathGroups: [{
pattern: 'react',
group: 'external',
position: 'before'
}, {
pattern: '@terrestris/**',
group: 'external',
position: 'after'
}],
pathGroupsExcludedImportTypes: ['react'],
'newlines-between': 'always-and-inside-groups',
alphabetize: {
order: 'asc',
caseInsensitive: true
}
}]
}
});
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
module.exports = {
roots: ['<rootDir>/src'],
collectCoverageFrom: [
'<rootDir>/src/**/*.{ts,js,tsx,jsx}',
Expand Down
Loading