Skip to content

Commit

Permalink
Merge pull request #3830 from terrestris/rg-future-rebased
Browse files Browse the repository at this point in the history
rg-future (rebased)
  • Loading branch information
simonseyock authored May 6, 2024
2 parents caec5c2 + db6e432 commit 147fae4
Show file tree
Hide file tree
Showing 209 changed files with 12,958 additions and 51,914 deletions.
10 changes: 6 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
module.exports = {
extends: [
'@terrestris/eslint-config-typescript',
'@terrestris/eslint-config-typescript-react',
'plugin:testing-library/react',
'plugin:jest-dom/recommended'
],
plugins: [
'testing-library',
'jest-dom'
'jest-dom',
'simple-import-sort'
],
rules: {
'no-underscore-dangle': 'off',
'@typescript-eslint/member-ordering': 'off',
'testing-library/no-node-access': 'warn',
'testing-library/no-container': 'warn'
'no-underscore-dangle': 'off',
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': 'warn'
}
};
10 changes: 7 additions & 3 deletions .eslintrc.styleguide.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ module.exports = {
'markdown'
],
overrides: [{
files: ["**/*.{md,mkdn,mdown,markdown}"],
processor: "markdown/markdown"
files: [
'**/*.{md,mkdn,mdown,markdown}'
],
processor: 'markdown/markdown'
}, {
files: ["**/*.{md,mkdn,mdown,markdown}/*.{js,javascript,jsx,node}"]
files: [
'**/*.{md,mkdn,mdown,markdown}/*.{js,javascript,jsx,node}'
]
}],
env: {
browser: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
persist-credentials: false

- name: Setup Node.js 18 👷🏻
- name: Setup Node.js 👷🏻
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Cache Node.js modules 💾
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
- name: Checkout sources 🔰
uses: actions/checkout@v3

- name: Setup Node.js 18
- name: Setup Node.js 👷🏻
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Cache Node.js modules 💾
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- name: Checkout sources 🔰
uses: actions/checkout@v3

- name: Setup Node.js 18 👷🏻
- name: Setup Node.js 👷🏻
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Cache Node.js modules 💾
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- name: Checkout sources 🔰
uses: actions/checkout@v3

- name: Setup Node.js 18 👷🏻
- name: Setup Node.js 👷🏻
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Install dependencies ⏬
run: npm ci
Expand Down
3 changes: 1 addition & 2 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
v18

v20
5 changes: 4 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"branches": [
"main",
"next",
{
name: "next",
prerelease: true
}
"15.x.x"
],
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
},
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties'
'@babel/plugin-transform-class-properties'
]
};
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
'<rootDir>/dist/'
],
transformIgnorePatterns: [
'node_modules/(?!(ol|antd|d3-selection|@camptocamp/inkmap|(rc-[a-z-]*)|@ant-design\/css-animation|(-[a-z]+)*|@babel\/runtime)/)'
'node_modules/(?!(ol|@camptocamp/inkmap|@terrestris/react-util|d3-selection|color-*[a-z]*)|(rc-*[a-z]*)/)'
],
setupFiles: [
'<rootDir>/jest/__mocks__/matchMediaMock.js'
Expand Down
31 changes: 29 additions & 2 deletions jest/setup.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
import Enzyme from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import 'whatwg-fetch';
import 'jest-canvas-mock';
import '@testing-library/jest-dom';
import 'regenerator-runtime/runtime';

import Adapter from '@cfaester/enzyme-adapter-react-18';
import Enzyme from 'enzyme';
import {
TextDecoder,
TextEncoder
} from 'util';

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

Enzyme.configure({ adapter: new Adapter() });

jest.mock('use-resize-observer', () => ({
__esModule: true,
default: jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
})),
}));

window.ResizeObserver =
window.ResizeObserver ||
jest.fn().mockImplementation(() => ({
disconnect: jest.fn(),
observe: jest.fn(),
unobserve: jest.fn(),
}));
Loading

0 comments on commit 147fae4

Please sign in to comment.