@shakuroinc/eslint-config-react 6.2.0 → 6.4.0

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.
Files changed (2) hide show
  1. package/.eslintrc.js +35 -34
  2. package/package.json +13 -18
package/.eslintrc.js CHANGED
@@ -20,7 +20,7 @@ module.exports = {
20
20
  ],
21
21
 
22
22
  parserOptions: {
23
- ecmaVersion: 2020,
23
+ ecmaVersion: 'latest',
24
24
  sourceType: 'module',
25
25
  ecmaFeatures: {
26
26
  jsx: true,
@@ -37,11 +37,11 @@ module.exports = {
37
37
  },
38
38
 
39
39
  rules: {
40
- '@typescript-eslint/ban-ts-ignore': 0,
41
- '@typescript-eslint/explicit-function-return-type': 0,
42
- '@typescript-eslint/explicit-member-accessibility': 0,
43
- '@typescript-eslint/explicit-module-boundary-types': 0,
44
- '@typescript-eslint/interface-name-prefix': 0,
40
+ '@typescript-eslint/ban-ts-ignore': 'off',
41
+ '@typescript-eslint/explicit-function-return-type': 'off',
42
+ '@typescript-eslint/explicit-member-accessibility': 'off',
43
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
44
+ '@typescript-eslint/interface-name-prefix': 'off',
45
45
  '@typescript-eslint/naming-convention': [
46
46
  'error',
47
47
  {
@@ -60,7 +60,7 @@ module.exports = {
60
60
  selector: ['default', 'variable', 'property'],
61
61
  format: null,
62
62
  leadingUnderscore: 'allow',
63
- filter: '^_$',
63
+ filter: '^[_]*$',
64
64
  },
65
65
  {
66
66
  selector: 'typeLike',
@@ -76,9 +76,11 @@ module.exports = {
76
76
  filter: '^__html$',
77
77
  },
78
78
  ],
79
- '@typescript-eslint/no-empty-function': 0,
80
- '@typescript-eslint/no-explicit-any': 0,
81
- '@typescript-eslint/no-object-literal-type-assertion': 0,
79
+ '@typescript-eslint/no-empty-function': 'off',
80
+ 'no-unused-vars': 'off',
81
+ '@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^[_]*$' }],
82
+ '@typescript-eslint/no-explicit-any': 'off',
83
+ '@typescript-eslint/no-object-literal-type-assertion': 'off',
82
84
  '@typescript-eslint/padding-line-between-statements': [
83
85
  'error',
84
86
  {
@@ -135,6 +137,7 @@ module.exports = {
135
137
  ],
136
138
  next: 'export',
137
139
  },
140
+ { blankLine: 'always', prev: 'directive', next: '*' },
138
141
  ],
139
142
  'jsx-a11y/anchor-is-valid': [
140
143
  'error',
@@ -145,7 +148,7 @@ module.exports = {
145
148
  },
146
149
  ],
147
150
  curly: ['error', 'multi-line'],
148
- 'no-duplicate-imports': 2,
151
+ 'no-duplicate-imports': 'error',
149
152
  'no-restricted-imports': [
150
153
  'error',
151
154
  {
@@ -158,19 +161,16 @@ module.exports = {
158
161
  ],
159
162
  },
160
163
  ],
161
- 'react-hooks/exhaustive-deps': 2,
162
- 'react-hooks/rules-of-hooks': 2,
163
- 'react/button-has-type': 2,
164
- 'react/display-name': 0,
165
- 'react/no-unescaped-entities': 0,
166
- 'react/prop-types': 0,
167
- 'react/react-in-jsx-scope': 0,
168
- 'react/self-closing-comp': 1,
169
- 'sort-imports': 0,
170
- 'react/function-component-definition': [
171
- 2,
172
- { namedComponents: 'arrow-function', unnamedComponents: 'arrow-function' },
173
- ],
164
+ 'react-hooks/exhaustive-deps': 'error',
165
+ 'react-hooks/rules-of-hooks': 'error',
166
+ 'react/button-has-type': 'error',
167
+ 'react/display-name': 'off',
168
+ 'react/no-unescaped-entities': 'off',
169
+ 'react/prop-types': 'off',
170
+ 'react/react-in-jsx-scope': 'off',
171
+ 'react/self-closing-comp': 'warn',
172
+ 'sort-imports': 'off',
173
+ 'react/function-component-definition': "off",
174
174
  'react/jsx-curly-brace-presence': [
175
175
  2,
176
176
  {
@@ -189,6 +189,7 @@ module.exports = {
189
189
  skipComments: true,
190
190
  },
191
191
  ],
192
+ 'no-console': 'error',
192
193
  'simple-import-sort/imports': [
193
194
  1,
194
195
  {
@@ -202,10 +203,10 @@ module.exports = {
202
203
  ],
203
204
  },
204
205
  ],
205
- 'simple-import-sort/exports': 1,
206
- 'tailwindcss/classnames-order': 2,
207
- 'tailwindcss/no-contradicting-classname': 2,
208
- 'tailwindcss/no-custom-classname': 1,
206
+ 'simple-import-sort/exports': 'warn',
207
+ 'tailwindcss/classnames-order': 'error',
208
+ 'tailwindcss/no-contradicting-classname': 'error',
209
+ 'tailwindcss/no-custom-classname': 'warn',
209
210
  quotes: ['error', 'single', { allowTemplateLiterals: false, avoidEscape: true }],
210
211
  },
211
212
 
@@ -214,7 +215,7 @@ module.exports = {
214
215
  files: ['*js?x', '*ts?x'],
215
216
  extends: ['plugin:import/recommended', 'plugin:import/typescript'],
216
217
  rules: {
217
- 'import/order': 0,
218
+ 'import/order': 'off',
218
219
  'import/no-restricted-paths': [
219
220
  'error',
220
221
  {
@@ -236,11 +237,11 @@ module.exports = {
236
237
  ecmaVersion: 'latest',
237
238
  },
238
239
  rules: {
239
- '@next/next/no-img-element': 0,
240
- '@typescript-eslint/naming-convention': 0,
241
- 'max-lines': 0,
242
- 'no-unused-expressions': 0,
243
- 'react/self-closing-comp': 0,
240
+ '@next/next/no-img-element': 'off',
241
+ '@typescript-eslint/naming-convention': 'off',
242
+ 'max-lines': 'off',
243
+ 'no-unused-expressions': 'off',
244
+ 'react/self-closing-comp': 'off',
244
245
  },
245
246
  },
246
247
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shakuroinc/eslint-config-react",
3
- "version": "6.2.0",
3
+ "version": "6.4.0",
4
4
  "main": ".eslintrc.js",
5
5
  "author": "Shakuro team",
6
6
  "license": "MIT",
@@ -14,24 +14,19 @@
14
14
  },
15
15
  "dependencies": {},
16
16
  "devDependencies": {
17
- "@typescript-eslint/eslint-plugin": "^5.45.0",
18
- "@typescript-eslint/parser": "^5.45.0",
19
- "eslint": "^8.29.0",
20
- "eslint-config-prettier": "^8.5.0",
21
- "eslint-import-resolver-typescript": "^3.5.2",
22
- "eslint-mdx": "^2.0.5",
23
- "eslint-plugin-import": "^2.26.0",
24
- "eslint-plugin-jsx-a11y": "^6.6.1",
25
- "eslint-plugin-mdx": "^2.0.5",
26
- "eslint-plugin-prettier": "^4.2.1",
27
- "eslint-plugin-react": "7.31.11",
28
- "eslint-plugin-react-hooks": "^4.6.0",
29
- "eslint-plugin-simple-import-sort": "^8.0.0",
30
- "eslint-plugin-tailwindcss": "^3.7.1",
31
- "prettier": "^2.8.0",
32
- "prettier-plugin-tailwindcss": "^0.2.0",
17
+ "@typescript-eslint/eslint-plugin": "^6.1.0",
18
+ "@typescript-eslint/parser": "^6.1.0",
19
+ "eslint": "^8.45.0",
20
+ "eslint-config-prettier": "^8.8.0",
21
+ "eslint-mdx": "^2.1.0",
22
+ "eslint-plugin-mdx": "^2.1.0",
23
+ "eslint-plugin-prettier": "^5.0.0",
24
+ "eslint-plugin-simple-import-sort": "^10.0.0",
25
+ "eslint-plugin-tailwindcss": "^3.13.0",
26
+ "prettier": "^3.0.0",
27
+ "prettier-plugin-tailwindcss": "^0.4.1",
33
28
  "react": "^18.2.0",
34
- "typescript": "^4.9.3"
29
+ "typescript": "^5.1.6"
35
30
  },
36
31
  "peerDependencies": {
37
32
  "@typescript-eslint/eslint-plugin": "^5.45.0",