Skip to content

Commit 2f7c75b

Browse files
committed
chore: address review comments
1 parent b46365e commit 2f7c75b

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ npm install @rc-component/context
3232
## Usage
3333

3434
```tsx | pure
35-
import createContext from '@rc-component/context';
35+
import { createContext } from '@rc-component/context';
3636

3737
const [Provider, useContext] = createContext({ count: 0 });
3838

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ npm install @rc-component/context
3232
## 用法
3333

3434
```tsx | pure
35-
import createContext from '@rc-component/context';
35+
import { createContext } from '@rc-component/context';
3636

3737
const [Provider, useContext] = createContext({ count: 0 });
3838

eslint.config.mjs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import js from '@eslint/js';
22
import { defineConfig } from 'eslint/config';
3+
import { dirname } from 'node:path';
4+
import { fileURLToPath } from 'node:url';
35
import prettier from 'eslint-config-prettier';
46
import jest from 'eslint-plugin-jest';
57
import react from 'eslint-plugin-react';
68
import reactHooks from 'eslint-plugin-react-hooks';
79
import globals from 'globals';
810
import tseslint from 'typescript-eslint';
911

12+
const tsconfigRootDir = dirname(fileURLToPath(import.meta.url));
13+
1014
export default defineConfig([
1115
{
1216
plugins: {
@@ -15,7 +19,7 @@ export default defineConfig([
1519
},
1620
{
1721
linterOptions: {
18-
reportUnusedDisableDirectives: 'off',
22+
reportUnusedDisableDirectives: 'warn',
1923
},
2024
},
2125
{
@@ -26,10 +30,10 @@ export default defineConfig([
2630
'lib/',
2731
'dist/',
2832
'docs-dist/',
33+
'.docs-dist/',
2934
'.dumi/',
3035
'.doc/',
3136
'.vercel/',
32-
'src/index.d.ts',
3337
],
3438
},
3539
{
@@ -88,7 +92,7 @@ export default defineConfig([
8892
languageOptions: {
8993
parserOptions: {
9094
projectService: true,
91-
tsconfigRootDir: import.meta.dirname,
95+
tsconfigRootDir,
9296
},
9397
},
9498
},

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@
4949
"dumi": "^2.4.38",
5050
"eslint": "^9.39.4",
5151
"eslint-config-prettier": "^10.1.8",
52-
"eslint-plugin-import": "^2.32.0",
5352
"eslint-plugin-jest": "^29.15.4",
54-
"eslint-plugin-jsx-a11y": "^6.10.2",
5553
"eslint-plugin-react": "^7.37.5",
5654
"eslint-plugin-react-hooks": "^7.1.1",
5755
"father": "^4.6.24",

0 commit comments

Comments
 (0)