@pumpn/eslint-config 16.0.0 → 16.1.1

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 (49) hide show
  1. package/.vscode/settings.json +14 -1
  2. package/config.js +30 -37
  3. package/deno.json +22 -22
  4. package/deno.lock +2423 -19
  5. package/eslint.config.js +13 -5
  6. package/package.json +20 -20
  7. package/plugins.js +13 -9
  8. package/rules/command.js +1 -1
  9. package/rules/depend.js +1 -1
  10. package/rules/eslint-comments.js +1 -1
  11. package/rules/github.js +1 -1
  12. package/rules/import-x/helpful-warnings.js +2 -2
  13. package/rules/import-x/static-analysis.js +1 -1
  14. package/rules/import-x/style-guide.js +10 -2
  15. package/rules/import-x.js +1 -1
  16. package/rules/jsdoc.js +3 -27
  17. package/rules/jsx-a11y.js +1 -1
  18. package/rules/layout-and-formatting.js +1 -1
  19. package/rules/no-secrets.js +1 -1
  20. package/rules/no-unsanitized.js +1 -1
  21. package/rules/perfectionist.js +19 -31
  22. package/rules/possible-problems.js +1 -1
  23. package/rules/promise.js +20 -5
  24. package/rules/react.js +1 -1
  25. package/rules/redos.js +1 -1
  26. package/rules/regexp.js +1 -1
  27. package/rules/security.js +1 -1
  28. package/rules/sonarjs.js +1 -1
  29. package/rules/stylistic/_common/min-items-for-array-newline.js +1 -1
  30. package/rules/stylistic/indent.js +0 -1
  31. package/rules/stylistic/linebreaks.js +3 -15
  32. package/rules/stylistic.js +1 -1
  33. package/rules/suggestions.js +4 -16
  34. package/rules/tailwindcss.js +1 -1
  35. package/rules/unicorn.js +19 -6
  36. package/rules.js +1 -1
  37. package/scripts/update-package-json.js +42 -22
  38. package/documentation/global.html +0 -566
  39. package/documentation/index.html +0 -135
  40. package/documentation/index.js.html +0 -35865
  41. package/documentation/scripts/app.min.js +0 -1
  42. package/documentation/scripts/linenumber.js +0 -26
  43. package/documentation/scripts/search.js +0 -39
  44. package/documentation/styles/app.min.css +0 -1
  45. package/documentation/styles/iframe.css +0 -13
  46. package/documentation/styles/prettify-jsdoc.css +0 -111
  47. package/documentation/styles/prettify-tomorrow.css +0 -132
  48. package/documentation/styles/reset.css +0 -44
  49. package/jsdoc.json +0 -51
@@ -1,5 +1,18 @@
1
1
  {
2
2
  "deno.enable": true,
3
3
  "deno.lint": false,
4
- "eslint.useESLintClass": true
4
+ "files.watcherExclude": {
5
+ "**/.git/objects/**": true,
6
+ "**/.git/subtree-cache/**": true,
7
+ "**/.hg/store/**": true,
8
+ "**/.dart_tool": true,
9
+ "**/.trunk/*actions/": true,
10
+ "**/.trunk/*logs/": true,
11
+ "**/.trunk/*out": true,
12
+ "**/.trunk/*out/": true,
13
+ "**/.trunk/*plugins/": true,
14
+ "**/.git/**": true,
15
+ "**/node_modules/**": true,
16
+ "**/.vscode/**": true
17
+ }
5
18
  }
package/config.js CHANGED
@@ -1,13 +1,11 @@
1
1
  import * as parser from "@typescript-eslint/parser";
2
+ import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
3
+ import { defineConfig } from "eslint/config";
2
4
  import globals from "globals";
3
5
 
4
6
  import plugins from "./plugins.js";
5
7
  import rules from "./rules.js";
6
8
 
7
- /**
8
- * @import { Linter } from "eslint"
9
- */
10
-
11
9
  const cssFilesRefreshRate = 5_000;
12
10
 
13
11
  const convertedGlobals = Object.fromEntries(
@@ -25,21 +23,28 @@ const convertedGlobals = Object.fromEntries(
25
23
 
26
24
  const defaultGlob = "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}";
27
25
 
26
+ const typeScriptExtensions = /** @type {const} */ ([
27
+ ".ts",
28
+ ".tsx",
29
+ ".cts",
30
+ ".mts"
31
+ ]);
32
+
33
+ const allExtensions = /** @type {const} */ ([
34
+ ...typeScriptExtensions,
35
+ ".js",
36
+ ".jsx",
37
+ ".cjs",
38
+ ".mjs"
39
+ ]);
40
+
28
41
  /**
29
- * ESLint configuration.
30
- *
31
42
  * This configuration includes settings for various file types, plugins, and rules.
32
43
  * It also defines specific settings for different environments and file patterns.
33
- *
34
- * @satisfies {Linter.Config[]}
35
44
  */
36
- const config = /** @type {const} */ ([
45
+ const config = defineConfig([
37
46
  {
38
- ignores: [
39
- "_fresh/**",
40
- "documentation/**",
41
- "patches/**"
42
- ]
47
+ ignores: ["_fresh/**", "documentation/**", "patches/**"]
43
48
  },
44
49
  {
45
50
  files: [defaultGlob],
@@ -73,21 +78,16 @@ const config = /** @type {const} */ ([
73
78
  rules,
74
79
  settings: {
75
80
  formComponents: ["Form"],
76
- "import-x/core-modules": [],
77
- "import-x/extensions": [
78
- ".js",
79
- ".mjs",
80
- ".jsx"
81
- ],
82
- "import-x/ignore": ["@turf/turf"],
81
+ "import-x/extensions": allExtensions,
82
+ "import-x/external-module-folders": ["node_modules", "node_modules/@types"],
83
83
  "import-x/parsers": {
84
- espree: [
85
- ".js",
86
- ".cjs",
87
- ".mjs",
88
- ".jsx"
89
- ]
84
+ "@typescript-eslint/parser": [...typeScriptExtensions]
90
85
  },
86
+ "import-x/resolver-next": [
87
+ createTypeScriptImportResolver({
88
+ alwaysTryTypes: true
89
+ })
90
+ ],
91
91
  jsdoc: {
92
92
  mode: "typescript",
93
93
  tagNamePreference: {
@@ -108,6 +108,7 @@ const config = /** @type {const} */ ([
108
108
  order: "asc",
109
109
  partitionByComment: true,
110
110
  partitionByNewLine: true,
111
+ specialCharacters: "keep",
111
112
  type: "natural"
112
113
  },
113
114
  "react-x": {
@@ -118,11 +119,7 @@ const config = /** @type {const} */ ([
118
119
  allowedCharacterRanges: ["alphanumeric"]
119
120
  },
120
121
  tailwindcss: {
121
- callees: [
122
- "classnames",
123
- "clsx",
124
- "ctl"
125
- ],
122
+ callees: ["classnames", "clsx", "ctl"],
126
123
  classRegex: "^class(Name)?$",
127
124
  config: "tailwind.config.js",
128
125
  cssFiles: [
@@ -155,11 +152,7 @@ const config = /** @type {const} */ ([
155
152
  }
156
153
  },
157
154
  {
158
- files: [
159
- "benchmarks/**/*",
160
- "tests/**/*",
161
- "scripts/**/*"
162
- ],
155
+ files: ["benchmarks/**/*", "tests/**/*", "scripts/**/*"],
163
156
  rules: {
164
157
  "import-x/no-unused-modules": "off",
165
158
  "import-x/unambiguous": "off"
package/deno.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@pumpn/eslint-config",
3
- "version": "16.0.0",
3
+ "version": "16.1.1",
4
4
  "exports": "./config.js",
5
5
  "tasks": {
6
6
  "lint": "deno run -A npm:eslint",
7
- "docs": "jsdoc --configure jsdoc.json",
8
7
  "publish": "deno task lint && VERSION=$(cat deno.json | jq -r .version) && git tag -a \"v$VERSION\" -m \"\" && git push origin \"v$VERSION\" && deno publish --no-check && npm publish",
9
8
  "update-import-map": "deno run -A ./scripts/update-import-map.js",
10
9
  "update-package-json": "deno run -A ./scripts/update-package-json.js",
@@ -38,32 +37,33 @@
38
37
  ]
39
38
  },
40
39
  "imports": {
41
- "@eslint-community/eslint-plugin-eslint-comments": "npm:@eslint-community/eslint-plugin-eslint-comments@^4.4.0",
42
- "@eslint-react/eslint-plugin": "npm:@eslint-react/eslint-plugin@^1.28.0",
40
+ "@eslint-community/eslint-plugin-eslint-comments": "npm:@eslint-community/eslint-plugin-eslint-comments@^4.5.0",
41
+ "@eslint-react/eslint-plugin": "npm:@eslint-react/eslint-plugin@^1.52.6",
43
42
  "@std/path": "jsr:@std/path@^1",
44
- "@stylistic/eslint-plugin": "npm:@stylistic/eslint-plugin@^4.1.0",
45
- "@typescript-eslint/parser": "npm:@typescript-eslint/parser@^8.11.0",
46
- "eslint": "npm:eslint@^9.21.0",
47
- "eslint-plugin-command": "npm:eslint-plugin-command@^3.1.0",
48
- "eslint-plugin-depend": "npm:eslint-plugin-depend@^0.12.0",
49
- "eslint-plugin-import-x": "npm:eslint-plugin-import-x@^4.3.1",
50
- "eslint-plugin-jsdoc": "npm:eslint-plugin-jsdoc@^50.4.3",
43
+ "@stylistic/eslint-plugin": "npm:@stylistic/eslint-plugin@^5.2.3",
44
+ "@typescript-eslint/parser": "npm:@typescript-eslint/parser@^8.40.0",
45
+ "eslint": "npm:eslint@^9.33.0",
46
+ "eslint-import-resolver-typescript": "npm:eslint-import-resolver-typescript@^4.4.4",
47
+ "eslint-plugin-command": "npm:eslint-plugin-command@^3.3.1",
48
+ "eslint-plugin-depend": "npm:eslint-plugin-depend@^1.2.0",
49
+ "eslint-plugin-import-x": "npm:eslint-plugin-import-x@^4.16.1",
50
+ "eslint-plugin-jsdoc": "npm:eslint-plugin-jsdoc@^54.1.0",
51
51
  "eslint-plugin-no-secrets": "npm:eslint-plugin-no-secrets@^2.2.1",
52
- "eslint-plugin-perfectionist": "npm:eslint-plugin-perfectionist@^4.8.0",
53
- "eslint-plugin-promise": "npm:eslint-plugin-promise@^7.1.0",
54
- "eslint-plugin-react": "npm:eslint-plugin-react@^7.35.0",
55
- "eslint-plugin-redos": "npm:eslint-plugin-redos@^4.4.5",
56
- "eslint-plugin-regexp": "npm:eslint-plugin-regexp@^2.6.0",
52
+ "eslint-plugin-perfectionist": "npm:eslint-plugin-perfectionist@^4.15.0",
53
+ "eslint-plugin-promise": "npm:eslint-plugin-promise@^7.2.1",
54
+ "eslint-plugin-redos": "npm:eslint-plugin-redos@^4.5.0",
55
+ "eslint-plugin-regexp": "npm:eslint-plugin-regexp@^2.10.0",
57
56
  "eslint-plugin-security": "npm:eslint-plugin-security@^3.0.1",
58
- "eslint-plugin-sonarjs": "npm:eslint-plugin-sonarjs@^3.0.1",
59
- "eslint-plugin-tailwindcss": "npm:eslint-plugin-tailwindcss@^3.18.0",
60
- "eslint-plugin-unicorn": "npm:eslint-plugin-unicorn@^57.0.0",
61
- "globals": "npm:globals@^16.0.0",
57
+ "eslint-plugin-sonarjs": "npm:eslint-plugin-sonarjs@^3.0.4",
58
+ "eslint-plugin-tailwindcss": "npm:eslint-plugin-tailwindcss@^4.0.0-beta.0",
59
+ "eslint-plugin-unicorn": "npm:eslint-plugin-unicorn@^60.0.0",
60
+ "globals": "npm:globals@^16.3.0",
62
61
  "preact": "https://esm.sh/*preact@10.19.3?dev",
63
62
  "preact/jsx-runtime": "https://esm.sh/*preact@10.19.3/jsx-runtime?dev"
64
63
  },
65
64
  "exclude": [
66
- "**/_fresh/*"
65
+ "**/_fresh/*",
66
+ "./documentation"
67
67
  ],
68
- "nodeModulesDir": "manual"
68
+ "nodeModulesDir": "none"
69
69
  }