Skip to content

Commit

Permalink
feat: update all dependencies to their latest versions
Browse files Browse the repository at this point in the history
BREAKING CHANGE: updates several major dependencies

The following major dependencies have been updated

- @terrestris/react-geo from version 23 to 25
- antd from 4 to 5
- react from version 17 to 18
- ol from version 7 to 10
- geostyler from 12 to 15

In addition webpack has been replaced by rspack.
  • Loading branch information
mholthausen authored Oct 18, 2024
1 parent 2a571d6 commit 3cfe3b3
Show file tree
Hide file tree
Showing 132 changed files with 9,484 additions and 7,843 deletions.
77 changes: 0 additions & 77 deletions .eslintrc.js

This file was deleted.

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

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

npx --no-install commitlint --edit $1
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.18.2-alpine3.17 AS build
FROM node:20.17.0-alpine3.19 AS build

WORKDIR /app

Expand All @@ -11,7 +11,7 @@ COPY . ./

RUN npm run build

FROM nginx:1.25.3-alpine-slim
FROM nginx:1.27.1-alpine-slim

COPY --from=build /app/build /usr/share/nginx/html
COPY default.conf /etc/nginx/conf.d/default.conf
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.18.2-alpine3.17
FROM node:20.17.0-alpine3.19

WORKDIR /app

Expand Down
111 changes: 111 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import reactPlugin from 'eslint-plugin-react';
import importPlugin from 'eslint-plugin-import';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import reactRefreshPlugin from 'eslint-plugin-react-refresh';
import stylisticPlugin from '@stylistic/eslint-plugin'

import tsEslint from 'typescript-eslint';
import eslint from '@eslint/js';
import globals from 'globals';

import eslintTerrestris from '@terrestris/eslint-config-typescript';

export default tsEslint.config({
extends: [
eslint.configs.recommended,
...tsEslint.configs.recommended,
...tsEslint.configs.stylistic,
importPlugin.flatConfigs.recommended
],
files: [
'src/**/*.{js,mjs,cjs,ts,jsx,tsx}'
],
plugins: {
react: reactPlugin,
'@stylistic': stylisticPlugin,
'react-hooks': reactHooksPlugin,
'react-refresh': reactRefreshPlugin
},
languageOptions: {
globals: globals.browser,
ecmaVersion: 'latest',
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname
}
},
rules: {
...eslintTerrestris.rules,
...reactHooksPlugin.configs.recommended.rules,
'max-len': [
'warn',
{
'code': 160
}
],

'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',

'no-unused-vars': 'warn',
'arrow-spacing': 'warn',
'comma-spacing': 'warn',
'comma-dangle': 'warn',
'eol-last': 'warn',
'no-multi-spaces': 'warn',
'no-multiple-empty-lines': ['warn', {
max: 1
}],
'object-property-newline': 'warn',
'object-curly-newline': ['warn', {
consistent: true,
minProperties: 2
}],
'space-before-function-paren': ['warn', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always'
}],

'react/jsx-max-props-per-line': ['warn', {
maximum: 1
}],
'react/jsx-closing-tag-location': ['warn'],
'react/jsx-closing-bracket-location': ['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
}
}]
},
settings: {
react: {
version: 'detect'
}
}
});
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ module.exports = {
],
testEnvironment: './jest/CustomTestEnvironment.js',
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!(ol|antd|@babel|jest-runtime|(rc-*[a-z]*)|@ant-design|@terrestris|query-string|decode-uri-component|split-on-first|filter-obj))'
'<rootDir>/node_modules/(?!(ol|antd|@babel|jest-runtime|(rc-*[a-z]*)|@ant-design|@terrestris|color-*[a-z]*|@camptocamp|d3-*[a-z]*|' +
'query-string|decode-uri-component|strict-uri-encode|split-on-first|filter-obj|shpjs|geostyler))'
],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
Expand Down
10 changes: 9 additions & 1 deletion jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
import '@testing-library/jest-dom';
import '@testing-library/jest-dom/extend-expect';
import {
TextDecoder,
TextEncoder
} from 'util';

Object.assign(global, {
TextDecoder,
TextEncoder
});
Loading

0 comments on commit 3cfe3b3

Please sign in to comment.