@hyeon/linter 7.0.31 → 7.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyeon/linter",
3
- "version": "7.0.31",
3
+ "version": "7.0.32",
4
4
  "description": "Hansanghyun custom eslint settings",
5
5
  "main": "./src/index.mjs",
6
6
  "scripts": {
@@ -29,12 +29,12 @@
29
29
  },
30
30
  "homepage": "https://github.com/hansanghyeon/linter#readme",
31
31
  "dependencies": {
32
- "@typescript-eslint/eslint-plugin": "^8.16.0",
33
- "@typescript-eslint/parser": "^8.16.0",
34
32
  "eslint-config-prettier": "^9.1.0",
35
33
  "eslint-plugin-import": "^2.31.0",
36
34
  "eslint-plugin-prettier": "^5.2.1",
37
35
  "eslint-plugin-react": "^7.37.2",
36
+ "eslint-plugin-react-hooks": "^5.0.0",
37
+ "eslint-plugin-react-refresh": "^0.4.14",
38
38
  "eslint-plugin-simple-import-sort": "^12.1.1",
39
39
  "typescript-eslint": "^8.16.0"
40
40
  },
package/src/react.mjs CHANGED
@@ -1,37 +1,22 @@
1
1
  import react from 'eslint-plugin-react'
2
- import reactJsxruntime from 'eslint-plugin-react/configs/jsx-runtime.js'
3
- import typescriptEslint from '@typescript-eslint/eslint-plugin'
4
- import typescriptParser from '@typescript-eslint/parser'
2
+ import reactHooks from 'eslint-plugin-react-hooks'
3
+ import reactRefresh from 'eslint-plugin-react-refresh'
4
+ import tseslint from 'typescript-eslint'
5
5
 
6
-
7
- export default [
8
- {
9
- files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
10
- ...reactJsxruntime,
11
- languageOptions: {
12
- ...reactJsxruntime.languageOptions,
13
- ecmaVersion: 'latest',
14
- sourceType: 'module',
15
- parser: typescriptParser,
16
- parserOptions: {
17
- ecmaFeatures: {
18
- jsx: true,
19
- },
20
- },
21
- },
22
- plugins: {
23
- react,
24
- "@typescript-eslint": typescriptEslint,
25
- },
26
- rules: {
27
- 'react/jsx-filename-extension': [
28
- 1,
29
- {
30
- extensions: ['.jsx', '.tsx'],
31
- }
32
- ],
33
- 'react/prop-types': 'off',
34
- 'react/require-default-props': 'off',
35
- },
6
+ export default tseslint.config({
7
+ settings: { react: { version: '18.3' } },
8
+ plugins: {
9
+ react,
10
+ 'react-hooks': reactHooks,
11
+ 'react-refresh': reactRefresh,
12
+ },
13
+ rules: {
14
+ ...react.configs.recommended.rules,
15
+ ...react.configs['jsx-runtime'].rules,
16
+ ...reactHooks.configs.recommended.rules,
17
+ 'react-refresh/only-export-components': [
18
+ 'warn',
19
+ { allowConstantExport: true },
20
+ ],
36
21
  },
37
- ]
22
+ })
@@ -1,18 +1,9 @@
1
1
  import tseslint from 'typescript-eslint'
2
- import typescriptEslint from '@typescript-eslint/eslint-plugin'
3
- import typescriptParser from '@typescript-eslint/parser'
4
2
 
5
3
  export default tseslint.config(
6
- ...tseslint.configs.recommended,
4
+ { ignores: ['dist'] },
7
5
  {
8
- files: ['**/*.{ts,tsx,mtsx}'],
9
- languageOptions: {
10
- ecmaVersion: 'latest',
11
- sourceType: 'module',
12
- parser: typescriptParser,
13
- },
14
- plugins: {
15
- "@typescript-eslint": typescriptEslint,
16
- },
17
- }
6
+ extends: tseslint.configs.recommended,
7
+ files: ['**/*.{ts,tsx}'],
8
+ },
18
9
  );