Skip to content

Commit c2ab062

Browse files
authored
refactor: Modern(-ish) ESM only (#129)
* chore: Correct TS module resolution mismatch * chore: Update eslint config * refactor: User terser as build script, cull leftover export formats
1 parent 72d3107 commit c2ab062

File tree

8 files changed

+3670
-9760
lines changed

8 files changed

+3670
-9760
lines changed

eslint.config.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig } from 'eslint/config';
2+
import js from '@eslint/js';
3+
import globals from 'globals';
4+
import compat from 'eslint-plugin-compat';
5+
6+
export default defineConfig([
7+
compat.configs['flat/recommended'],
8+
{
9+
files: ['src/index.js'],
10+
plugins: { js },
11+
extends: ['js/recommended'],
12+
languageOptions: {
13+
globals: globals.browser,
14+
ecmaVersion: 2020,
15+
sourceType: 'module',
16+
},
17+
},
18+
]);

jsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"target": "ESNext",
44
"module": "NodeNext",
5-
"moduleResolution": "Node",
5+
"moduleResolution": "NodeNext",
66
"noEmit": true,
77
"allowJs": true,
88
"checkJs": true,

0 commit comments

Comments
 (0)