Skip to content

Commit 7bb787b

Browse files
Modernize package exports and ESLint configuration
1 parent 6a0f136 commit 7bb787b

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

eslint.config.mjs

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
import js from '@eslint/js';
2-
import tsEslint from 'typescript-eslint';
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
33

4-
export default [
5-
js.configs.recommended,
6-
...tsEslint.configs.recommended,
7-
{
8-
ignores: [
9-
"dist/",
10-
"dist-esm/",
11-
"docs/",
12-
"tests/",
13-
"node_modules/"
14-
]
15-
},
16-
{
17-
files: ["**/*.ts"],
18-
rules: {
19-
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
20-
}
21-
}
22-
];
4+
export default tseslint.config(
5+
eslint.configs.recommended,
6+
...tseslint.configs.recommended,
7+
{
8+
rules: {
9+
"semi": ["warn", "always"],
10+
"indent": ["warn", "tab", { "SwitchCase": 1 }],
11+
"@typescript-eslint/no-explicit-any": "off"
12+
},
13+
files: ['src/**/*.ts'],
14+
languageOptions: {
15+
ecmaVersion: 2022,
16+
sourceType: 'module',
17+
globals: {
18+
console: 'readonly',
19+
process: 'readonly'
20+
}
21+
}
22+
}
23+
);

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@
8282
"get-func-name@<2.0.1": ">=2.0.1",
8383
"@babel/traverse@<7.23.2": ">=7.23.2",
8484
"braces@<3.0.3": ">=3.0.3"
85-
}
85+
},
86+
"ignoredBuiltDependencies": [
87+
"esbuild"
88+
]
8689
}
8790
}

0 commit comments

Comments
 (0)