@pumpn/eslint-config 15.6.1 → 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.
- package/.vscode/settings.json +14 -1
- package/config.js +27 -91
- package/deno.json +22 -22
- package/deno.lock +698 -2293
- package/eslint.config.js +13 -5
- package/package.json +20 -21
- package/plugins.js +15 -13
- package/rules/_exports.js +1 -1
- package/rules/command.js +12 -0
- package/rules/depend.js +1 -1
- package/rules/eslint-comments.js +1 -1
- package/rules/github.js +1 -1
- package/rules/import-x/helpful-warnings.js +2 -2
- package/rules/import-x/static-analysis.js +1 -1
- package/rules/import-x/style-guide.js +11 -8
- package/rules/import-x.js +1 -1
- package/rules/jsdoc.js +3 -27
- package/rules/jsx-a11y.js +1 -1
- package/rules/layout-and-formatting.js +1 -1
- package/rules/no-secrets.js +1 -1
- package/rules/no-unsanitized.js +1 -1
- package/rules/perfectionist.js +21 -24
- package/rules/possible-problems.js +1 -1
- package/rules/promise.js +20 -5
- package/rules/react.js +1 -1
- package/rules/redos.js +1 -1
- package/rules/regexp.js +1 -1
- package/rules/security.js +1 -1
- package/rules/sonarjs.js +1 -1
- package/rules/stylistic/_common/min-items-for-array-newline.js +1 -1
- package/rules/stylistic/indent.js +0 -1
- package/rules/stylistic/linebreaks.js +3 -15
- package/rules/stylistic.js +1 -1
- package/rules/suggestions.js +4 -16
- package/rules/tailwindcss.js +1 -1
- package/rules/unicorn.js +24 -6
- package/rules.js +1 -1
- package/scripts/update-package-json.js +42 -22
- package/.tool-versions +0 -1
- package/documentation/global.html +0 -566
- package/documentation/index.html +0 -135
- package/documentation/index.js.html +0 -35865
- package/documentation/scripts/app.min.js +0 -1
- package/documentation/scripts/linenumber.js +0 -26
- package/documentation/scripts/search.js +0 -39
- package/documentation/styles/app.min.css +0 -1
- package/documentation/styles/iframe.css +0 -13
- package/documentation/styles/prettify-jsdoc.css +0 -111
- package/documentation/styles/prettify-tomorrow.css +0 -132
- package/documentation/styles/reset.css +0 -44
- package/jsdoc.json +0 -51
- package/rules/func-params-args.js +0 -19
package/.vscode/settings.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"deno.enable": true,
|
|
3
3
|
"deno.lint": false,
|
|
4
|
-
"
|
|
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,14 +1,11 @@
|
|
|
1
1
|
import * as parser from "@typescript-eslint/parser";
|
|
2
|
-
import {
|
|
2
|
+
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
|
3
|
+
import { defineConfig } from "eslint/config";
|
|
3
4
|
import globals from "globals";
|
|
4
5
|
|
|
5
6
|
import plugins from "./plugins.js";
|
|
6
7
|
import rules from "./rules.js";
|
|
7
8
|
|
|
8
|
-
/**
|
|
9
|
-
* @import { Linter } from "eslint"
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
9
|
const cssFilesRefreshRate = 5_000;
|
|
13
10
|
|
|
14
11
|
const convertedGlobals = Object.fromEntries(
|
|
@@ -26,44 +23,28 @@ const convertedGlobals = Object.fromEntries(
|
|
|
26
23
|
|
|
27
24
|
const defaultGlob = "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}";
|
|
28
25
|
|
|
29
|
-
const
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"@stylistic/no-multiple-empty-lines",
|
|
35
|
-
"import-x/no-self-import",
|
|
36
|
-
"no-inline-comments"
|
|
26
|
+
const typeScriptExtensions = /** @type {const} */ ([
|
|
27
|
+
".ts",
|
|
28
|
+
".tsx",
|
|
29
|
+
".cts",
|
|
30
|
+
".mts"
|
|
37
31
|
]);
|
|
38
32
|
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
? "off"
|
|
47
|
-
: value
|
|
48
|
-
]
|
|
49
|
-
])
|
|
50
|
-
);
|
|
33
|
+
const allExtensions = /** @type {const} */ ([
|
|
34
|
+
...typeScriptExtensions,
|
|
35
|
+
".js",
|
|
36
|
+
".jsx",
|
|
37
|
+
".cjs",
|
|
38
|
+
".mjs"
|
|
39
|
+
]);
|
|
51
40
|
|
|
52
41
|
/**
|
|
53
|
-
* ESLint configuration.
|
|
54
|
-
*
|
|
55
42
|
* This configuration includes settings for various file types, plugins, and rules.
|
|
56
43
|
* It also defines specific settings for different environments and file patterns.
|
|
57
|
-
*
|
|
58
|
-
* @satisfies {Linter.Config[]}
|
|
59
44
|
*/
|
|
60
|
-
const config =
|
|
45
|
+
const config = defineConfig([
|
|
61
46
|
{
|
|
62
|
-
ignores: [
|
|
63
|
-
"_fresh/**",
|
|
64
|
-
"documentation/**",
|
|
65
|
-
"patches/**"
|
|
66
|
-
]
|
|
47
|
+
ignores: ["_fresh/**", "documentation/**", "patches/**"]
|
|
67
48
|
},
|
|
68
49
|
{
|
|
69
50
|
files: [defaultGlob],
|
|
@@ -97,21 +78,16 @@ const config = /** @type {const} */ ([
|
|
|
97
78
|
rules,
|
|
98
79
|
settings: {
|
|
99
80
|
formComponents: ["Form"],
|
|
100
|
-
"import-x/
|
|
101
|
-
"import-x/
|
|
102
|
-
".js",
|
|
103
|
-
".mjs",
|
|
104
|
-
".jsx"
|
|
105
|
-
],
|
|
106
|
-
"import-x/ignore": ["@turf/turf"],
|
|
81
|
+
"import-x/extensions": allExtensions,
|
|
82
|
+
"import-x/external-module-folders": ["node_modules", "node_modules/@types"],
|
|
107
83
|
"import-x/parsers": {
|
|
108
|
-
|
|
109
|
-
".js",
|
|
110
|
-
".cjs",
|
|
111
|
-
".mjs",
|
|
112
|
-
".jsx"
|
|
113
|
-
]
|
|
84
|
+
"@typescript-eslint/parser": [...typeScriptExtensions]
|
|
114
85
|
},
|
|
86
|
+
"import-x/resolver-next": [
|
|
87
|
+
createTypeScriptImportResolver({
|
|
88
|
+
alwaysTryTypes: true
|
|
89
|
+
})
|
|
90
|
+
],
|
|
115
91
|
jsdoc: {
|
|
116
92
|
mode: "typescript",
|
|
117
93
|
tagNamePreference: {
|
|
@@ -132,6 +108,7 @@ const config = /** @type {const} */ ([
|
|
|
132
108
|
order: "asc",
|
|
133
109
|
partitionByComment: true,
|
|
134
110
|
partitionByNewLine: true,
|
|
111
|
+
specialCharacters: "keep",
|
|
135
112
|
type: "natural"
|
|
136
113
|
},
|
|
137
114
|
"react-x": {
|
|
@@ -142,11 +119,7 @@ const config = /** @type {const} */ ([
|
|
|
142
119
|
allowedCharacterRanges: ["alphanumeric"]
|
|
143
120
|
},
|
|
144
121
|
tailwindcss: {
|
|
145
|
-
callees: [
|
|
146
|
-
"classnames",
|
|
147
|
-
"clsx",
|
|
148
|
-
"ctl"
|
|
149
|
-
],
|
|
122
|
+
callees: ["classnames", "clsx", "ctl"],
|
|
150
123
|
classRegex: "^class(Name)?$",
|
|
151
124
|
config: "tailwind.config.js",
|
|
152
125
|
cssFiles: [
|
|
@@ -179,11 +152,7 @@ const config = /** @type {const} */ ([
|
|
|
179
152
|
}
|
|
180
153
|
},
|
|
181
154
|
{
|
|
182
|
-
files: [
|
|
183
|
-
"benchmarks/**/*",
|
|
184
|
-
"tests/**/*",
|
|
185
|
-
"scripts/**/*"
|
|
186
|
-
],
|
|
155
|
+
files: ["benchmarks/**/*", "tests/**/*", "scripts/**/*"],
|
|
187
156
|
rules: {
|
|
188
157
|
"import-x/no-unused-modules": "off",
|
|
189
158
|
"import-x/unambiguous": "off"
|
|
@@ -195,39 +164,6 @@ const config = /** @type {const} */ ([
|
|
|
195
164
|
"no-undef": "off"
|
|
196
165
|
}
|
|
197
166
|
},
|
|
198
|
-
{
|
|
199
|
-
files: [defaultGlob],
|
|
200
|
-
plugins: {
|
|
201
|
-
examples: getJsdocProcessorPlugin({
|
|
202
|
-
captionRequired: false,
|
|
203
|
-
checkDefaults: true,
|
|
204
|
-
checkExamples: true,
|
|
205
|
-
checkParams: true,
|
|
206
|
-
checkProperties: true,
|
|
207
|
-
paddedIndent: 0,
|
|
208
|
-
parser,
|
|
209
|
-
sourceType: "module"
|
|
210
|
-
})
|
|
211
|
-
},
|
|
212
|
-
processor: "examples/examples"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
files: [
|
|
216
|
-
"**/*.md/*.js",
|
|
217
|
-
"**/*.jsdoc-defaults",
|
|
218
|
-
"**/*.jsdoc-params",
|
|
219
|
-
"**/*.jsdoc-properties"
|
|
220
|
-
],
|
|
221
|
-
languageOptions: {
|
|
222
|
-
parserOptions: {
|
|
223
|
-
program: null,
|
|
224
|
-
project: false,
|
|
225
|
-
projectService: false
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
plugins,
|
|
229
|
-
rules: rulesWithAutofixDisabled
|
|
230
|
-
},
|
|
231
167
|
{
|
|
232
168
|
files: ["**/*.doc.js"],
|
|
233
169
|
rules: {
|
package/deno.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pumpn/eslint-config",
|
|
3
|
-
"version": "
|
|
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.
|
|
42
|
-
"@eslint-react/eslint-plugin": "npm:@eslint-react/eslint-plugin@^1.
|
|
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@^
|
|
45
|
-
"@typescript-eslint/parser": "npm:@typescript-eslint/parser@^8.
|
|
46
|
-
"eslint
|
|
47
|
-
"eslint-
|
|
48
|
-
"eslint-plugin-
|
|
49
|
-
"eslint-plugin-
|
|
50
|
-
"eslint-plugin-
|
|
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.
|
|
53
|
-
"eslint-plugin-promise": "npm:eslint-plugin-promise@^7.1
|
|
54
|
-
"eslint-plugin-
|
|
55
|
-
"eslint-plugin-
|
|
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.
|
|
59
|
-
"eslint-plugin-tailwindcss": "npm:eslint-plugin-tailwindcss@^
|
|
60
|
-
"eslint-plugin-unicorn": "npm:eslint-plugin-unicorn@^
|
|
61
|
-
"globals": "npm:globals@^
|
|
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": "
|
|
68
|
+
"nodeModulesDir": "none"
|
|
69
69
|
}
|