@aneuhold/eslint-config 1.3.17 → 1.3.19

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/package.json +13 -12
  2. package/src/svelte-config.js +26 -0
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@aneuhold/eslint-config",
3
- "version": "1.3.17",
3
+ "version": "1.3.19",
4
4
  "description": "Main ESLint Configuration for personal projects",
5
5
  "main": "./src/ts-lib-config.js",
6
- "packageManager": "pnpm@10.20.0",
6
+ "packageManager": "pnpm@10.21.0",
7
7
  "scripts": {
8
8
  "dev": "nodemon -e js --exec \"local-npm publish\"",
9
9
  "unpub": "local-npm unpublish",
@@ -31,34 +31,35 @@
31
31
  "src/**/*"
32
32
  ],
33
33
  "peerDependencies": {
34
- "eslint": ">= 9.39.0",
34
+ "eslint": ">= 9.39.1",
35
35
  "prettier": ">= 3.6.2"
36
36
  },
37
37
  "dependencies": {
38
- "@eslint/js": "^9.39.0",
38
+ "@eslint/js": "^9.39.1",
39
39
  "@next/eslint-plugin-next": "^16.0.1",
40
40
  "@stylistic/eslint-plugin-js": "^4.4.1",
41
41
  "@stylistic/eslint-plugin-ts": "^4.4.1",
42
- "@typescript-eslint/eslint-plugin": "^8.46.2",
43
- "@typescript-eslint/parser": "^8.46.2",
44
- "angular-eslint": "^20.5.0",
42
+ "@typescript-eslint/eslint-plugin": "^8.46.4",
43
+ "@typescript-eslint/parser": "^8.46.4",
44
+ "angular-eslint": "^20.6.0",
45
45
  "eslint-config-prettier": "^10.1.8",
46
46
  "eslint-plugin-import": "^2.32.0",
47
- "eslint-plugin-jsdoc": "^61.1.11",
47
+ "eslint-plugin-jsdoc": "^61.1.12",
48
48
  "eslint-plugin-prefer-arrow": "^1.2.3",
49
49
  "eslint-plugin-prettier": "^5.5.4",
50
50
  "eslint-plugin-react-hooks": "^7.0.1",
51
51
  "eslint-plugin-react-refresh": "^0.4.24",
52
+ "eslint-plugin-simple-import-sort": "^12.1.1",
52
53
  "eslint-plugin-svelte": "^3.13.0",
53
54
  "eslint-plugin-unused-imports": "^4.3.0",
54
55
  "globals": "^16.5.0",
55
56
  "prettier-plugin-svelte": "^3.4.0",
56
- "typescript-eslint": "^8.46.2"
57
+ "typescript-eslint": "^8.46.4"
57
58
  },
58
59
  "devDependencies": {
59
- "@aneuhold/local-npm-registry": "^0.2.14",
60
- "@types/node": "^24.9.2",
61
- "eslint": "^9.39.0",
60
+ "@aneuhold/local-npm-registry": "^0.2.16",
61
+ "@types/node": "^24.10.0",
62
+ "eslint": "^9.39.1",
62
63
  "prettier": "^3.6.2",
63
64
  "svelte": "^5.41.4",
64
65
  "typescript": "^5.9.3"
@@ -1,6 +1,7 @@
1
1
  import eslint from '@eslint/js';
2
2
  import jsdoc from 'eslint-plugin-jsdoc';
3
3
  import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
4
+ import simpleImportSort from 'eslint-plugin-simple-import-sort';
4
5
  import eslintPluginSvelte from 'eslint-plugin-svelte';
5
6
  import { defineConfig } from 'eslint/config';
6
7
  import globals from 'globals';
@@ -16,6 +17,9 @@ const defaultConfig = defineConfig(
16
17
  jsdoc.configs['flat/recommended-typescript'],
17
18
  eslintPluginPrettierRecommended,
18
19
  ],
20
+ plugins: {
21
+ 'simple-import-sort': simpleImportSort,
22
+ },
19
23
  languageOptions: {
20
24
  parser: tseslint.parser,
21
25
  parserOptions: {
@@ -32,6 +36,28 @@ const defaultConfig = defineConfig(
32
36
  'jsdoc/tag-lines': ['warn', 'any', { startLines: 1 }],
33
37
  'jsdoc/require-jsdoc': ['off'],
34
38
  'jsdoc/require-returns': 'off',
39
+
40
+ // simple-import-sort: use a single inner array to avoid blank lines between groups
41
+ // See docs here: https://github.com/lydell/eslint-plugin-simple-import-sort?tab=readme-ov-file#how-is-this-rule-different-from-importorder
42
+ // Originally I added this to avoid VS Code auto-sorting putting a blank line SPECIFICALLY after
43
+ // exports when there are only exports in a file and more than 1 of them, which was conflicting
44
+ // with prettier. Lol. But this is a lot more configurable anyway ❤️
45
+ 'simple-import-sort/imports': [
46
+ 'error',
47
+ {
48
+ groups: [
49
+ [
50
+ '^\\u0000', // side effect imports
51
+ '^node:',
52
+ '^@?\\w', // packages
53
+ '^', // absolute imports
54
+ '^\\.', // relative imports
55
+ ],
56
+ ],
57
+ },
58
+ ],
59
+ 'simple-import-sort/exports': 'error',
60
+
35
61
  'no-use-before-define': 'off',
36
62
  'no-undef': 'off',
37
63
  // Just 100% disagree with this rule. The reasoning is that using a