@mkaradeniz/eslint-config 4.0.10 → 4.0.12

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": "@mkaradeniz/eslint-config",
3
- "version": "4.0.10",
3
+ "version": "4.0.12",
4
4
  "private": false,
5
5
  "files": [
6
6
  "base.mjs",
@@ -6,7 +6,6 @@ export const baseRules = {
6
6
  'warn',
7
7
  { allow: ['^UNSAFE_'], ignoreDestructuring: false, properties: 'never', ignoreImports: false, ignoreGlobals: false },
8
8
  ],
9
- curly: ['warn', 'all'],
10
9
  'default-case-last': ['warn'],
11
10
  eqeqeq: ['warn'],
12
11
  'for-direction': ['warn'],
@@ -22,58 +22,6 @@ export const nextRules = {
22
22
  '@next/next/no-typos': ['warn'],
23
23
  '@next/next/no-unwanted-polyfillio': ['warn'],
24
24
 
25
- // Project-specific import restrictions
26
- 'no-restricted-imports': [
27
- 'warn',
28
- {
29
- paths: [
30
- {
31
- name: 'next-intl',
32
- importNames: ['getMessages', 'useMessages'],
33
- message: 'Always prefer `getTranslations` over `getMessages` and `useTranslations` over `useMessages`.',
34
- },
35
- {
36
- name: 'next/image',
37
- message: '`<Image />` from `next/image` should not be used directly. Use `<Image />` from `@/components/Image/Image` instead.',
38
- },
39
- {
40
- name: 'next/link',
41
- message: '`<Link />` from `next/link` should not be used directly. Use `<Link />` from `@/components/Link/Link` instead.',
42
- },
43
- {
44
- name: 'next/navigation',
45
- importNames: ['useRouter', 'redirect', 'usePathname', 'Link'],
46
- message:
47
- '`useRouter`, `redirect`, `usePathname` `Link` should not be used directly. Use `useRouter`, `redirect`, `usePathname` from `@/i18n/navigation` and `Link` from `@/components/Link/Link` instead.',
48
- },
49
- {
50
- name: 'next/router',
51
- importNames: ['useRouter', 'redirect', 'usePathname', 'Link'],
52
- message: '`useRouter` should not be used directly. Use `useRouter` from `@/i18n/navigation` instead.',
53
- },
54
- {
55
- name: 'react',
56
- importNames: ['forwardRef'],
57
- message: '`forwardRef` is deprectated in React 19 and is not necessary anymore.',
58
- },
59
- {
60
- name: 'react',
61
- importNames: ['useCallback', 'useMemo'],
62
- message: '`useCallback` and `useMemo` are not necessary anymore when using the React compiler.',
63
- },
64
- ],
65
- },
66
- ],
67
-
68
- // Project-specific JSX restrictions
69
- 'no-restricted-syntax': [
70
- 'warn',
71
- {
72
- selector: 'JSXOpeningElement[name.name="a"]',
73
- message: 'Do not use <a> tags. Please use the <Link> component from `@/components/Link/Link` instead.',
74
- },
75
- ],
76
-
77
25
  // React 19 compiler rules
78
26
  'react-compiler/react-compiler': ['warn'],
79
27
  },
@@ -34,7 +34,6 @@ export const reactRules = {
34
34
  },
35
35
  ],
36
36
  'react/button-has-type': 'off',
37
- // 'react/button-has-type': ['warn'],
38
37
  'react/display-name': ['warn'],
39
38
  'react/function-component-definition': ['warn', { namedComponents: 'arrow-function', unnamedComponents: 'arrow-function' }],
40
39
  'react/hook-use-state': ['warn'],