Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
elbakerino committed Nov 1, 2024
2 parents 1eb7e00 + e8a55b3 commit 8b8a607
Show file tree
Hide file tree
Showing 24 changed files with 17,017 additions and 40,347 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
packages/*/build
18 changes: 17 additions & 1 deletion packages/.eslintrc → .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,23 @@
"warn",
"never"
],
"semi-style": "off"
"semi-style": "off",
"no-restricted-imports": [
"error",
{
"paths": [
"@mui/material",
"@mui/icon-material",
"@ui-schema/kit-codemirror",
"@ui-schema/materia-code"
],
"patterns": [
"@mui/*/*/*",
"@ui-schema/kit-codemirror/*/*",
"@ui-schema/materia-code/*/*/*"
]
}
]
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Run tests
run: |
npm test
npm run check
- name: Build
run: |
Expand Down
15 changes: 1 addition & 14 deletions babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-template-literals",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
[
"babel-plugin-named-asset-import",
{
Expand All @@ -19,14 +13,7 @@
}
}
}
],
[
"@babel/plugin-proposal-object-rest-spread",
{
"useBuiltIns": true
}
],
"@babel/plugin-proposal-class-properties"
]
],
"env": {
"cjs": {
Expand Down
44 changes: 24 additions & 20 deletions packages/jest.config.ts → jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ import type { Config } from '@jest/types'

const packages: string[] = ['kit-codemirror', 'material-code']

const testMatchesLint: string[] = []

packages.forEach(pkg => {
testMatchesLint.push(...[
'<rootDir>/' + pkg + '/src/**/*.(js|ts|tsx)',
'<rootDir>/' + pkg + '/tests/**/*.(test|spec|d).(js|ts|tsx)',
])
})
const base: Partial<Config.InitialOptions> = {
/*transformIgnorePatterns: [
'node_modules/?!(@ui-schema)',
Expand All @@ -18,8 +10,8 @@ const base: Partial<Config.InitialOptions> = {
'^.+\\.tsx?$': 'ts-jest',
},*/
moduleNameMapper: {
'^@ui-schema/material-code(.*)$': '<rootDir>/material-code/src$1',
'^@ui-schema/kit-codemirror(.*)$': '<rootDir>/kit-codemirror/src$1',
'^@ui-schema/material-code(.*)$': '<rootDir>/packages/material-code/src$1',
'^@ui-schema/kit-codemirror(.*)$': '<rootDir>/packages/kit-codemirror/src$1',
},
moduleFileExtensions: [
'ts',
Expand All @@ -31,6 +23,24 @@ const base: Partial<Config.InitialOptions> = {
],
coveragePathIgnorePatterns: [
'(tests/.*.mock).(jsx?|tsx?|ts?|js?)$',
'.*.(test|spec).(js|ts|tsx)$',
'<rootDir>/packages/demo',
],
testPathIgnorePatterns: [
'<rootDir>/dist',
'<rootDir>/packages/.+/build',
],
watchPathIgnorePatterns: [
'<rootDir>/.idea',
'<rootDir>/.git',
'<rootDir>/dist',
'<rootDir>/node_modules',
'<rootDir>/packages/.+/node_modules',
'<rootDir>/packages/.+/build',
],
modulePathIgnorePatterns: [
'<rootDir>/dist',
'<rootDir>/packages/.+/build',
],
}

Expand All @@ -46,26 +56,20 @@ const config: Config.InitialOptions = {
...packages.map(pkg => ({
displayName: 'test-' + pkg,
...base,
moduleDirectories: ['node_modules', '<rootDir>/' + pkg + '/node_modules'],
moduleDirectories: ['node_modules', '<rootDir>/packages/' + pkg + '/node_modules'],
//moduleDirectories: ['node_modules', '<rootDir>/ui-schema/node_modules', '<rootDir>/ds-material/node_modules'],
// todo: check why `transformIgnorePatterns`, combined with multi-projects/lerna 0.5.3 upgrade, throws `TypeError: /node_modules/jest-runner-eslint/build/runner/index.js: node_modules/@ampproject/remapping/dist/remapping.umd.js: _remapping(...) is not a function`
/*transformIgnorePatterns: [
'node_modules/?!(@ui-schema)',
],*/
//testEnvironmentOptions: {},
testMatch: [
'<rootDir>/' + pkg + '/src/**/*.(test|spec).(js|ts|tsx)',
'<rootDir>/' + pkg + '/tests/**/*.(test|spec).(js|ts|tsx)',
'<rootDir>/packages/' + pkg + '/src/**/*.(test|spec).(js|ts|tsx)',
'<rootDir>/packages/' + pkg + '/tests/**/*.(test|spec).(js|ts|tsx)',
],
})),
{
displayName: 'lint',
runner: 'jest-runner-eslint',
...base,
testMatch: testMatchesLint,
},
],
coverageDirectory: '<rootDir>/../coverage',
coverageDirectory: '<rootDir>/coverage',
}

export default config
Loading

0 comments on commit 8b8a607

Please sign in to comment.