@robinblomberg/eslint-config-robinblomberg 0.24.0 → 0.25.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/index.js +13 -4
  2. package/package.json +9 -8
package/index.js CHANGED
@@ -66,7 +66,8 @@ module.exports = defineConfig({
66
66
  warn,
67
67
  {
68
68
  disallowTypeAnnotations: true,
69
- prefer: 'no-type-imports',
69
+ fixStyle: 'separate-type-imports',
70
+ prefer: 'type-imports',
70
71
  },
71
72
  ],
72
73
  '@typescript-eslint/default-param-last': warn,
@@ -381,6 +382,7 @@ module.exports = defineConfig({
381
382
  'keyword-spacing': off,
382
383
  'lines-between-class-members': off,
383
384
  'no-dupe-class-members': off,
385
+ 'no-duplicate-imports': off,
384
386
  'no-empty-function': off,
385
387
  'no-extra-parens': off,
386
388
  'no-extra-semi': off,
@@ -414,6 +416,7 @@ module.exports = defineConfig({
414
416
  rules: {
415
417
  'import/no-anonymous-default-export': off,
416
418
  'react/no-multi-comp': off,
419
+ 'react-hooks/rules-of-hooks': off,
417
420
  'storybook/await-interactions': error,
418
421
  'storybook/context-in-play-function': error,
419
422
  'storybook/default-exports': error,
@@ -461,7 +464,7 @@ module.exports = defineConfig({
461
464
  },
462
465
  {
463
466
  files: ['**/*.jsx', '**/*.tsx'],
464
- plugins: ['react', 'react-hooks', 'jsx-a11y'],
467
+ plugins: ['react', 'react-hooks', 'react-refresh', 'jsx-a11y'],
465
468
  rules: {
466
469
  'jsx-a11y/accessible-emoji': warn,
467
470
  'jsx-a11y/alt-text': warn,
@@ -729,6 +732,10 @@ module.exports = defineConfig({
729
732
  'react/void-dom-elements-no-children': warn,
730
733
  'react-hooks/exhaustive-deps': warn,
731
734
  'react-hooks/rules-of-hooks': error,
735
+ 'react-refresh/only-export-components': [
736
+ warn,
737
+ { allowConstantExport: true },
738
+ ],
732
739
  },
733
740
  },
734
741
  {
@@ -968,8 +975,9 @@ module.exports = defineConfig({
968
975
  'import/dynamic-import-chunkname': off,
969
976
  'import/export': warn,
970
977
  'import/exports-last': off,
978
+ // This should be opt-in. It's not necessary for Vite, for example.
971
979
  'import/extensions': [
972
- warn,
980
+ off,
973
981
  {
974
982
  js: 'always',
975
983
  json: 'always',
@@ -1336,7 +1344,8 @@ module.exports = defineConfig({
1336
1344
  },
1337
1345
  ],
1338
1346
  'padding-line-between-statements': warn,
1339
- 'prefer-arrow-callback': warn,
1347
+ // You may want to use `fn(function () {})` for some advanced cases:
1348
+ 'prefer-arrow-callback': off,
1340
1349
  'prefer-const': [warn, { destructuring: 'all' }],
1341
1350
  'prefer-destructuring': [off, { array: false, object: true }],
1342
1351
  'prefer-named-capture-group': off,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinblomberg/eslint-config-robinblomberg",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "author": "Robin Blomberg",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -12,24 +12,25 @@
12
12
  },
13
13
  "homepage": "https://github.com/RobinBlomberg/eslint-config-robinblomberg#readme",
14
14
  "dependencies": {
15
- "@babel/core": "^7.23.7",
16
- "@babel/eslint-parser": "^7.23.3",
17
- "@typescript-eslint/eslint-plugin": "^6.19.0",
18
- "@typescript-eslint/parser": "^6.19.0",
15
+ "@babel/core": "^7.23.9",
16
+ "@babel/eslint-parser": "^7.23.9",
17
+ "@typescript-eslint/eslint-plugin": "^6.20.0",
18
+ "@typescript-eslint/parser": "^6.20.0",
19
19
  "eslint-define-config": "^2.1.0",
20
20
  "eslint-plugin-import": "^2.29.1",
21
- "eslint-plugin-jsdoc": "^48.0.2",
21
+ "eslint-plugin-jsdoc": "^48.0.4",
22
22
  "eslint-plugin-jsx-a11y": "^6.8.0",
23
23
  "eslint-plugin-react": "^7.33.2",
24
24
  "eslint-plugin-react-hooks": "^4.6.0",
25
+ "eslint-plugin-react-refresh": "^0.4.5",
25
26
  "eslint-plugin-sonarjs": "^0.23.0",
26
- "eslint-plugin-sort-exports": "^0.8.0",
27
+ "eslint-plugin-sort-exports": "^0.9.1",
27
28
  "eslint-plugin-sort-keys": "^2.3.5",
28
29
  "eslint-plugin-storybook": "^0.6.15",
29
30
  "eslint-plugin-unicorn": "^50.0.1"
30
31
  },
31
32
  "devDependencies": {
32
- "@robinblomberg/eslint-config-robinblomberg": "0.23.5",
33
+ "@robinblomberg/eslint-config-robinblomberg": "0.24.1",
33
34
  "@types/node": "*"
34
35
  },
35
36
  "peerDependencies": {