@shakuroinc/eslint-config-react 6.1.0 → 6.3.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 +34 -31
  2. package/package.json +13 -18
package/.eslintrc.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @ts-check
1
2
  /* eslint-disable @typescript-eslint/naming-convention */
2
3
  module.exports = {
3
4
  parser: '@typescript-eslint/parser',
@@ -19,7 +20,7 @@ module.exports = {
19
20
  ],
20
21
 
21
22
  parserOptions: {
22
- ecmaVersion: 2020,
23
+ ecmaVersion: 'latest',
23
24
  sourceType: 'module',
24
25
  ecmaFeatures: {
25
26
  jsx: true,
@@ -36,11 +37,11 @@ module.exports = {
36
37
  },
37
38
 
38
39
  rules: {
39
- '@typescript-eslint/ban-ts-ignore': 0,
40
- '@typescript-eslint/explicit-function-return-type': 0,
41
- '@typescript-eslint/explicit-member-accessibility': 0,
42
- '@typescript-eslint/explicit-module-boundary-types': 0,
43
- '@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',
44
45
  '@typescript-eslint/naming-convention': [
45
46
  'error',
46
47
  {
@@ -59,7 +60,7 @@ module.exports = {
59
60
  selector: ['default', 'variable', 'property'],
60
61
  format: null,
61
62
  leadingUnderscore: 'allow',
62
- filter: '^_$',
63
+ filter: '^[_]*$',
63
64
  },
64
65
  {
65
66
  selector: 'typeLike',
@@ -75,9 +76,11 @@ module.exports = {
75
76
  filter: '^__html$',
76
77
  },
77
78
  ],
78
- '@typescript-eslint/no-empty-function': 0,
79
- '@typescript-eslint/no-explicit-any': 0,
80
- '@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',
81
84
  '@typescript-eslint/padding-line-between-statements': [
82
85
  'error',
83
86
  {
@@ -144,7 +147,7 @@ module.exports = {
144
147
  },
145
148
  ],
146
149
  curly: ['error', 'multi-line'],
147
- 'no-duplicate-imports': 2,
150
+ 'no-duplicate-imports': 'error',
148
151
  'no-restricted-imports': [
149
152
  'error',
150
153
  {
@@ -157,15 +160,15 @@ module.exports = {
157
160
  ],
158
161
  },
159
162
  ],
160
- 'react-hooks/exhaustive-deps': 2,
161
- 'react-hooks/rules-of-hooks': 2,
162
- 'react/button-has-type': 2,
163
- 'react/display-name': 0,
164
- 'react/no-unescaped-entities': 0,
165
- 'react/prop-types': 0,
166
- 'react/react-in-jsx-scope': 0,
167
- 'react/self-closing-comp': 1,
168
- 'sort-imports': 0,
163
+ 'react-hooks/exhaustive-deps': 'error',
164
+ 'react-hooks/rules-of-hooks': 'error',
165
+ 'react/button-has-type': 'error',
166
+ 'react/display-name': 'off',
167
+ 'react/no-unescaped-entities': 'off',
168
+ 'react/prop-types': 'off',
169
+ 'react/react-in-jsx-scope': 'off',
170
+ 'react/self-closing-comp': 'warn',
171
+ 'sort-imports': 'off',
169
172
  'react/function-component-definition': [
170
173
  2,
171
174
  { namedComponents: 'arrow-function', unnamedComponents: 'arrow-function' },
@@ -195,16 +198,16 @@ module.exports = {
195
198
  ['^\\u0000'],
196
199
  ['^react', '^next', '^[^.]'],
197
200
  ['^@shakuroinc/', '^@sh/'],
198
- ['^libs$', '^libs/', '^features/'],
201
+ ['^@/', '^~/', '^#/', '^libs$', '^libs/', '^features/'],
199
202
  ['^\\.\\.(?!/?$)', '^\\.\\./?$', '^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
200
203
  ['^.+\\.s?css$'],
201
204
  ],
202
205
  },
203
206
  ],
204
- 'simple-import-sort/exports': 1,
205
- 'tailwindcss/classnames-order': 2,
206
- 'tailwindcss/no-contradicting-classname': 2,
207
- 'tailwindcss/no-custom-classname': 1,
207
+ 'simple-import-sort/exports': 'warn',
208
+ 'tailwindcss/classnames-order': 'error',
209
+ 'tailwindcss/no-contradicting-classname': 'error',
210
+ 'tailwindcss/no-custom-classname': 'warn',
208
211
  quotes: ['error', 'single', { allowTemplateLiterals: false, avoidEscape: true }],
209
212
  },
210
213
 
@@ -213,7 +216,7 @@ module.exports = {
213
216
  files: ['*js?x', '*ts?x'],
214
217
  extends: ['plugin:import/recommended', 'plugin:import/typescript'],
215
218
  rules: {
216
- 'import/order': 0,
219
+ 'import/order': 'off',
217
220
  'import/no-restricted-paths': [
218
221
  'error',
219
222
  {
@@ -235,11 +238,11 @@ module.exports = {
235
238
  ecmaVersion: 'latest',
236
239
  },
237
240
  rules: {
238
- '@next/next/no-img-element': 0,
239
- '@typescript-eslint/naming-convention': 0,
240
- 'max-lines': 0,
241
- 'no-unused-expressions': 0,
242
- 'react/self-closing-comp': 0,
241
+ '@next/next/no-img-element': 'off',
242
+ '@typescript-eslint/naming-convention': 'off',
243
+ 'max-lines': 'off',
244
+ 'no-unused-expressions': 'off',
245
+ 'react/self-closing-comp': 'off',
243
246
  },
244
247
  },
245
248
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shakuroinc/eslint-config-react",
3
- "version": "6.1.0",
3
+ "version": "6.3.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",