Skip to content

Commit

Permalink
Merge pull request #30 from camptocamp/build-esm
Browse files Browse the repository at this point in the history
Build library as separate ES modules instead of a single bundle
  • Loading branch information
jahow authored Feb 28, 2024
2 parents 234942a + ba05cf3 commit e320664
Show file tree
Hide file tree
Showing 50 changed files with 2,611 additions and 580 deletions.
32 changes: 32 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
env: {
node: true,
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:require-extensions/recommended',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'require-extensions'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
};
3 changes: 3 additions & 0 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@ jobs:
- name: Type check
run: npm run typecheck

- name: Linting
run: npm run lint

- name: Run tests
run: npm test
4 changes: 4 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ module.exports = {
},
setupFilesAfterEnv: ['./test-setup.ts'],
coveragePathIgnorePatterns: ['.(xml)$'],
// this is required because imports end in ".js"
moduleNameMapper: {
'^(..?/.+).jsx?$': '$1',
},
};
Loading

0 comments on commit e320664

Please sign in to comment.