Skip to content

Commit ed8389e

Browse files
committed
dev: uses typescript for eslint config
1 parent e3d5e14 commit ed8389e

File tree

6 files changed

+85
-73
lines changed

6 files changed

+85
-73
lines changed
Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
1-
// @ts-check
2-
31
import eslint from '@eslint/js'
42
import tseslint from 'typescript-eslint'
53
import globals from 'globals'
64
import prettier from 'eslint-plugin-prettier/recommended'
75

8-
export default tseslint.config(
6+
export default [
97
eslint.configs.recommended,
10-
tseslint.configs.recommendedTypeChecked,
8+
...tseslint.configs.recommendedTypeChecked,
9+
10+
{ ignores: ['**/dist/**/*', '**/coverage/**', '**/node_modules/**', '**/docs/**'] },
1111

12-
{
13-
languageOptions: {
14-
globals: globals.browser,
15-
parserOptions: {
16-
projectService: true,
17-
tsconfigRootDir: import.meta.dirname,
18-
},
19-
},
20-
},
21-
{
22-
files: ['**/*.js'],
23-
...tseslint.configs.disableTypeChecked,
24-
},
25-
tseslint.configs.stylisticTypeChecked,
2612
{
2713
rules: {
2814
'@typescript-eslint/explicit-function-return-type': 'error',
@@ -31,5 +17,14 @@ export default tseslint.config(
3117
'@typescript-eslint/unbound-method': 'off',
3218
},
3319
},
20+
{
21+
languageOptions: {
22+
globals: globals.browser,
23+
parserOptions: {
24+
projectService: true,
25+
tsconfigRootDir: '.',
26+
},
27+
},
28+
},
3429
prettier,
35-
)
30+
]

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-rv",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "react-rv is a lightweight and efficient state management library for React that allows you to create reactive variables and subscribe to them with minimal overhead.",
55
"files": [
66
"dist"
@@ -30,6 +30,7 @@
3030
],
3131
"author": "rasulomaroff",
3232
"license": "MIT",
33+
"type": "module",
3334
"repository": {
3435
"type": "git",
3536
"url": "git+https://github.com/rasulomaroff/react-rv.git"
@@ -51,6 +52,7 @@
5152
"eslint-plugin-prettier": "^5.2.3",
5253
"globals": "^16.0.0",
5354
"happy-dom": "^17.4.4",
55+
"jiti": "^2.4.2",
5456
"prettier": "^3.5.3",
5557
"react": "^19.0.0",
5658
"tsup": "^8.4.0",

0 commit comments

Comments
 (0)