@pezkuwi/dev 0.85.12 → 0.86.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/cjs/packageInfo.js +1 -1
- package/cjs/rootJs/index.js +0 -1
- package/config/eslint.js +33 -17
- package/config/eslint.rules.js +66 -60
- package/config/eslint.standard.js +585 -0
- package/package.json +33 -29
- package/packageInfo.js +1 -1
- package/rootJs/index.js +0 -1
- package/scripts/pezkuwi-dev-build-ts.mjs +5 -5
- package/scripts/pezkuwi-dev-deno-map.mjs +1 -1
- package/scripts/pezkuwi-dev-migrate-eslint10.mjs +134 -0
- package/scripts/pezkuwi-exec-node-test.mjs +6 -6
- package/scripts/util.mjs +2 -2
package/cjs/packageInfo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@pezkuwi/dev', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.
|
|
4
|
+
exports.packageInfo = { name: '@pezkuwi/dev', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.86.1' };
|
package/cjs/rootJs/index.js
CHANGED
|
@@ -23,7 +23,6 @@ async function dynamic(a, b) {
|
|
|
23
23
|
// NOTE we go via this path so it points to the same location in both ESM
|
|
24
24
|
// and CJS output (a './dynamic' import would be different otherwise)
|
|
25
25
|
const { sum } = await import('@pezkuwi/dev/rootJs/dynamic.mjs');
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
27
26
|
return sum(a, b);
|
|
28
27
|
}
|
|
29
28
|
/** Function to ensure we have json correctly imported */
|
package/config/eslint.js
CHANGED
|
@@ -1,34 +1,44 @@
|
|
|
1
1
|
// Copyright 2017-2026 @pezkuwi/dev authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import { fixupPluginRules } from '@eslint/compat';
|
|
5
5
|
import eslintJs from '@eslint/js';
|
|
6
|
+
import stylisticPlugin from '@stylistic/eslint-plugin';
|
|
6
7
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
7
8
|
import tsParser from '@typescript-eslint/parser';
|
|
8
9
|
// @ts-expect-error No definition for this one
|
|
9
|
-
import standardConfig from 'eslint-config-standard';
|
|
10
|
-
import deprecationPlugin from 'eslint-plugin-deprecation';
|
|
11
|
-
// @ts-expect-error No definition for this one
|
|
12
10
|
import headerPlugin from 'eslint-plugin-header';
|
|
13
|
-
import importPlugin from 'eslint-plugin-import';
|
|
14
11
|
// @ts-expect-error No definition for this one
|
|
15
12
|
import importNewlinesPlugin from 'eslint-plugin-import-newlines';
|
|
16
|
-
|
|
13
|
+
import importPlugin from 'eslint-plugin-import-x';
|
|
17
14
|
import jestPlugin from 'eslint-plugin-jest';
|
|
18
|
-
// @ts-expect-error No definition for this one
|
|
19
15
|
import nPlugin from 'eslint-plugin-n';
|
|
20
16
|
// @ts-expect-error No definition for this one
|
|
21
17
|
import promisePlugin from 'eslint-plugin-promise';
|
|
22
18
|
import reactPlugin from 'eslint-plugin-react';
|
|
23
|
-
// @ts-expect-error No definition for this one
|
|
24
19
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
|
25
|
-
// @ts-expect-error No definition for this one
|
|
26
20
|
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
|
|
27
21
|
// @ts-expect-error No definition for this one
|
|
28
22
|
import sortDestructureKeysPlugin from 'eslint-plugin-sort-destructure-keys';
|
|
29
23
|
import globals from 'globals';
|
|
30
24
|
|
|
31
25
|
import { overrideAll, overrideJs, overrideJsx, overrideSpec } from './eslint.rules.js';
|
|
26
|
+
import { standardRules } from './eslint.standard.js';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* eslint-plugin-header declares no options schema, and eslint 9+ rejects
|
|
30
|
+
* options for a rule without one. `schema: false` is how a rule says it
|
|
31
|
+
* validates its own options; the rule itself is unchanged.
|
|
32
|
+
*/
|
|
33
|
+
const headerPluginFixed = {
|
|
34
|
+
...headerPlugin,
|
|
35
|
+
rules: {
|
|
36
|
+
header: {
|
|
37
|
+
...headerPlugin.rules.header,
|
|
38
|
+
meta: { ...headerPlugin.rules.header.meta, schema: false }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
32
42
|
|
|
33
43
|
const EXT_JS = ['.cjs', '.js', '.mjs'];
|
|
34
44
|
const EXT_TS = ['.ts', '.tsx'];
|
|
@@ -82,23 +92,27 @@ export default [
|
|
|
82
92
|
}
|
|
83
93
|
},
|
|
84
94
|
plugins: {
|
|
95
|
+
'@stylistic': stylisticPlugin,
|
|
85
96
|
'@typescript-eslint': tsPlugin,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
97
|
+
// eslint-plugin-header reports at the first token after the leading
|
|
98
|
+
// comments, so a generated file's /* eslint-disable */ covers it; the
|
|
99
|
+
// maintained fork reports at line 1 instead. The compat layer supplies the
|
|
100
|
+
// context methods eslint 10 removed; headerPluginFixed, the options schema.
|
|
101
|
+
header: fixupPluginRules(headerPluginFixed),
|
|
89
102
|
'import-newlines': importNewlinesPlugin,
|
|
103
|
+
'import-x': importPlugin,
|
|
90
104
|
n: nPlugin,
|
|
91
105
|
promise: promisePlugin,
|
|
92
106
|
'simple-import-sort': simpleImportSortPlugin,
|
|
93
107
|
'sort-destructure-keys': sortDestructureKeysPlugin
|
|
94
108
|
},
|
|
95
109
|
settings: {
|
|
96
|
-
'import/extensions': EXT_ALL,
|
|
97
|
-
'import/parsers': {
|
|
110
|
+
'import-x/extensions': EXT_ALL,
|
|
111
|
+
'import-x/parsers': {
|
|
98
112
|
'@typescript-eslint/parser': EXT_TS,
|
|
99
113
|
espree: EXT_JS
|
|
100
114
|
},
|
|
101
|
-
'import/resolver': {
|
|
115
|
+
'import-x/resolver': {
|
|
102
116
|
node: {
|
|
103
117
|
extensions: EXT_ALL
|
|
104
118
|
},
|
|
@@ -112,7 +126,7 @@ export default [
|
|
|
112
126
|
files: extsToGlobs(EXT_ALL),
|
|
113
127
|
rules: {
|
|
114
128
|
...eslintJs.configs.recommended.rules,
|
|
115
|
-
...
|
|
129
|
+
...standardRules,
|
|
116
130
|
...tsPlugin.configs['recommended-type-checked'].rules,
|
|
117
131
|
...tsPlugin.configs['stylistic-type-checked'].rules,
|
|
118
132
|
...overrideAll
|
|
@@ -130,7 +144,9 @@ export default [
|
|
|
130
144
|
'**/use*.ts'
|
|
131
145
|
],
|
|
132
146
|
plugins: {
|
|
133
|
-
react
|
|
147
|
+
// eslint-plugin-react still calls context methods eslint 10 removed
|
|
148
|
+
// (getFilename and others); the compat layer provides them.
|
|
149
|
+
react: fixupPluginRules(reactPlugin),
|
|
134
150
|
'react-hooks': reactHooksPlugin
|
|
135
151
|
},
|
|
136
152
|
rules: {
|
package/config/eslint.rules.js
CHANGED
|
@@ -59,12 +59,56 @@ function getHeaderPattern () {
|
|
|
59
59
|
|
|
60
60
|
export const overrideAll = {
|
|
61
61
|
...FIXME,
|
|
62
|
+
'@stylistic/arrow-parens': ['error', 'always'],
|
|
63
|
+
'@stylistic/brace-style': ['error', '1tbs'],
|
|
64
|
+
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
|
|
65
|
+
'@stylistic/indent': ['error', 2],
|
|
66
|
+
'@stylistic/no-extra-semi': 'error',
|
|
67
|
+
'@stylistic/object-curly-newline': ['error', {
|
|
68
|
+
ExportDeclaration: { minProperties: 2048 },
|
|
69
|
+
ImportDeclaration: { minProperties: 2048 },
|
|
70
|
+
ObjectPattern: { minProperties: 2048 }
|
|
71
|
+
}],
|
|
72
|
+
'@stylistic/padding-line-between-statements': [
|
|
73
|
+
'error',
|
|
74
|
+
{ blankLine: 'always', next: '*', prev: ['const', 'let', 'var'] },
|
|
75
|
+
{ blankLine: 'any', next: ['const', 'let', 'var'], prev: ['const', 'let', 'var'] },
|
|
76
|
+
{ blankLine: 'always', next: 'block-like', prev: '*' },
|
|
77
|
+
{ blankLine: 'always', next: '*', prev: 'block-like' },
|
|
78
|
+
{ blankLine: 'always', next: 'function', prev: '*' },
|
|
79
|
+
{ blankLine: 'always', next: '*', prev: 'function' },
|
|
80
|
+
{ blankLine: 'always', next: 'try', prev: '*' },
|
|
81
|
+
{ blankLine: 'always', next: '*', prev: 'try' },
|
|
82
|
+
{ blankLine: 'always', next: 'return', prev: '*' },
|
|
83
|
+
{ blankLine: 'always', next: 'import', prev: '*' },
|
|
84
|
+
{ blankLine: 'always', next: '*', prev: 'import' },
|
|
85
|
+
{ blankLine: 'any', next: 'import', prev: 'import' }
|
|
86
|
+
],
|
|
87
|
+
'@stylistic/semi': ['error', 'always'],
|
|
88
|
+
'@stylistic/spaced-comment': ['error', 'always', {
|
|
89
|
+
block: {
|
|
90
|
+
// pure export helpers
|
|
91
|
+
markers: ['#__PURE__']
|
|
92
|
+
},
|
|
93
|
+
line: {
|
|
94
|
+
// TS reference types
|
|
95
|
+
markers: ['/ <reference']
|
|
96
|
+
}
|
|
97
|
+
}],
|
|
98
|
+
'@stylistic/type-annotation-spacing': 'error',
|
|
62
99
|
// the next 2 enforce isolatedModules & verbatimModuleSyntax
|
|
63
100
|
'@typescript-eslint/consistent-type-exports': 'error',
|
|
64
101
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
65
102
|
'@typescript-eslint/dot-notation': 'error',
|
|
66
|
-
'@typescript-eslint/
|
|
103
|
+
'@typescript-eslint/no-deprecated': 'error',
|
|
67
104
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
105
|
+
// standard's options for the core rule, which the TypeScript preset turns off
|
|
106
|
+
// in favour of this one (with defaults that reject a && b() and a ? b() : c())
|
|
107
|
+
'@typescript-eslint/no-unused-expressions': ['error', {
|
|
108
|
+
allowShortCircuit: true,
|
|
109
|
+
allowTaggedTemplates: true,
|
|
110
|
+
allowTernary: true
|
|
111
|
+
}],
|
|
68
112
|
// ts itself checks and ignores those starting with _, align the linting
|
|
69
113
|
'@typescript-eslint/no-unused-vars': ['error', {
|
|
70
114
|
args: 'all',
|
|
@@ -75,20 +119,15 @@ export const overrideAll = {
|
|
|
75
119
|
vars: 'all',
|
|
76
120
|
varsIgnorePattern: '^_'
|
|
77
121
|
}],
|
|
78
|
-
'@typescript-eslint/type-annotation-spacing': 'error',
|
|
79
|
-
'arrow-parens': ['error', 'always'],
|
|
80
|
-
'brace-style': ['error', '1tbs'],
|
|
81
122
|
curly: ['error', 'all'],
|
|
82
123
|
'default-param-last': 'off', // conflicts with TS version
|
|
83
|
-
'deprecation/deprecation': 'error',
|
|
84
124
|
'dot-notation': 'off', // conflicts with TS version
|
|
85
125
|
'func-style': ['error', 'declaration', {
|
|
86
126
|
allowArrowFunctions: true
|
|
87
127
|
}],
|
|
88
128
|
// this does help with declarations, but also
|
|
89
129
|
// applies to invocations, which is an issue...
|
|
90
|
-
// 'function-paren-newline': ['error', 'never'],
|
|
91
|
-
'function-call-argument-newline': ['error', 'consistent'],
|
|
130
|
+
// '@stylistic/function-paren-newline': ['error', 'never'],
|
|
92
131
|
'header/header': ['error', 'line', [
|
|
93
132
|
{ pattern: getHeaderPattern() },
|
|
94
133
|
' SPDX-License-Identifier: Apache-2.0'
|
|
@@ -97,8 +136,8 @@ export const overrideAll = {
|
|
|
97
136
|
forceSingleLine: true,
|
|
98
137
|
items: 2048
|
|
99
138
|
}],
|
|
100
|
-
'import/export': 'error',
|
|
101
|
-
'import/extensions': ['error', 'ignorePackages', {
|
|
139
|
+
'import-x/export': 'error',
|
|
140
|
+
'import-x/extensions': ['error', 'ignorePackages', {
|
|
102
141
|
cjs: 'always',
|
|
103
142
|
js: 'always',
|
|
104
143
|
json: 'always',
|
|
@@ -107,35 +146,12 @@ export const overrideAll = {
|
|
|
107
146
|
ts: 'never',
|
|
108
147
|
tsx: 'never'
|
|
109
148
|
}],
|
|
110
|
-
'import/first': 'error',
|
|
111
|
-
'import/newline-after-import': 'error',
|
|
112
|
-
'import/no-duplicates': 'error',
|
|
113
|
-
'import/order': 'off', // conflicts with simple-import-sort
|
|
114
|
-
indent: 'off', // required as 'off' since typescript-eslint has own versions
|
|
115
|
-
'no-extra-semi': 'error',
|
|
149
|
+
'import-x/first': 'error',
|
|
150
|
+
'import-x/newline-after-import': 'error',
|
|
151
|
+
'import-x/no-duplicates': 'error',
|
|
152
|
+
'import-x/order': 'off', // conflicts with simple-import-sort
|
|
116
153
|
'no-unused-vars': 'off',
|
|
117
154
|
'no-use-before-define': 'off',
|
|
118
|
-
'object-curly-newline': ['error', {
|
|
119
|
-
ExportDeclaration: { minProperties: 2048 },
|
|
120
|
-
ImportDeclaration: { minProperties: 2048 },
|
|
121
|
-
ObjectPattern: { minProperties: 2048 }
|
|
122
|
-
}],
|
|
123
|
-
'padding-line-between-statements': [
|
|
124
|
-
'error',
|
|
125
|
-
{ blankLine: 'always', next: '*', prev: ['const', 'let', 'var'] },
|
|
126
|
-
{ blankLine: 'any', next: ['const', 'let', 'var'], prev: ['const', 'let', 'var'] },
|
|
127
|
-
{ blankLine: 'always', next: 'block-like', prev: '*' },
|
|
128
|
-
{ blankLine: 'always', next: '*', prev: 'block-like' },
|
|
129
|
-
{ blankLine: 'always', next: 'function', prev: '*' },
|
|
130
|
-
{ blankLine: 'always', next: '*', prev: 'function' },
|
|
131
|
-
{ blankLine: 'always', next: 'try', prev: '*' },
|
|
132
|
-
{ blankLine: 'always', next: '*', prev: 'try' },
|
|
133
|
-
{ blankLine: 'always', next: 'return', prev: '*' },
|
|
134
|
-
{ blankLine: 'always', next: 'import', prev: '*' },
|
|
135
|
-
{ blankLine: 'always', next: '*', prev: 'import' },
|
|
136
|
-
{ blankLine: 'any', next: 'import', prev: 'import' }
|
|
137
|
-
],
|
|
138
|
-
semi: ['error', 'always'],
|
|
139
155
|
'simple-import-sort/exports': 'error',
|
|
140
156
|
'simple-import-sort/imports': ['error', {
|
|
141
157
|
groups: [
|
|
@@ -150,55 +166,45 @@ export const overrideAll = {
|
|
|
150
166
|
'sort-destructure-keys/sort-destructure-keys': ['error', {
|
|
151
167
|
caseSensitive: true
|
|
152
168
|
}],
|
|
153
|
-
'sort-keys': 'error'
|
|
154
|
-
'spaced-comment': ['error', 'always', {
|
|
155
|
-
block: {
|
|
156
|
-
// pure export helpers
|
|
157
|
-
markers: ['#__PURE__']
|
|
158
|
-
},
|
|
159
|
-
line: {
|
|
160
|
-
// TS reference types
|
|
161
|
-
markers: ['/ <reference']
|
|
162
|
-
}
|
|
163
|
-
}]
|
|
169
|
+
'sort-keys': 'error'
|
|
164
170
|
};
|
|
165
171
|
|
|
166
172
|
export const overrideJsx = {
|
|
167
|
-
'jsx-
|
|
168
|
-
|
|
169
|
-
'
|
|
170
|
-
'react/jsx-closing-bracket-location': ['warn', 'tag-aligned'],
|
|
171
|
-
'react/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
|
|
172
|
-
'react/jsx-fragments': 'error',
|
|
173
|
-
'react/jsx-max-props-per-line': ['warn', {
|
|
173
|
+
'@stylistic/jsx-closing-bracket-location': ['warn', 'tag-aligned'],
|
|
174
|
+
'@stylistic/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
|
|
175
|
+
'@stylistic/jsx-max-props-per-line': ['warn', {
|
|
174
176
|
maximum: 1,
|
|
175
177
|
when: 'always'
|
|
176
178
|
}],
|
|
177
|
-
'
|
|
179
|
+
'@stylistic/jsx-newline': ['error', {
|
|
178
180
|
prevent: true
|
|
179
181
|
}],
|
|
180
|
-
'
|
|
181
|
-
'
|
|
182
|
-
'
|
|
182
|
+
'@stylistic/jsx-props-no-multi-spaces': 'error',
|
|
183
|
+
'@stylistic/jsx-quotes': ['error', 'prefer-single'],
|
|
184
|
+
'@stylistic/jsx-sort-props': ['warn', {
|
|
183
185
|
noSortAlphabetically: false
|
|
184
186
|
}],
|
|
185
|
-
'
|
|
187
|
+
'@stylistic/jsx-tag-spacing': ['error', {
|
|
186
188
|
afterOpening: 'never',
|
|
187
189
|
beforeClosing: 'never',
|
|
188
190
|
beforeSelfClosing: 'always',
|
|
189
191
|
closingSlash: 'never'
|
|
190
192
|
}],
|
|
193
|
+
// swap from recommended warning to error
|
|
194
|
+
'react-hooks/exhaustive-deps': 'error',
|
|
195
|
+
'react/jsx-fragments': 'error',
|
|
196
|
+
'react/jsx-no-bind': 'error',
|
|
191
197
|
'react/prop-types': 'off' // this is a completely broken rule
|
|
192
198
|
};
|
|
193
199
|
|
|
194
200
|
export const overrideJs = {
|
|
195
201
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
202
|
+
'@typescript-eslint/no-require-imports': 'off',
|
|
196
203
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
197
204
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
198
205
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
199
206
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
200
207
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
201
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
202
208
|
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
203
209
|
'@typescript-eslint/restrict-template-expressions': 'off'
|
|
204
210
|
};
|
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
// Copyright 2017-2026 @pezkuwi/dev authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
// The rules of eslint-config-standard 17.1.0 (MIT, Copyright Feross Aboukhadijeh,
|
|
5
|
+
// https://github.com/standard/eslint-config-standard), carried here once and with
|
|
6
|
+
// the same options, so the lint stays what it was: that package is written for
|
|
7
|
+
// eslint 8. Its formatting rules are deprecated in eslint core and continue in
|
|
8
|
+
// @stylistic under the same names (func-call-spacing is function-call-spacing
|
|
9
|
+
// there). no-new-object and no-new-symbol, deprecated too, are no-object-constructor
|
|
10
|
+
// and no-new-native-nonconstructor here; import/* is import-x/*.
|
|
11
|
+
|
|
12
|
+
export const standardRules = {
|
|
13
|
+
'@stylistic/array-bracket-spacing': [
|
|
14
|
+
'error',
|
|
15
|
+
'never'
|
|
16
|
+
],
|
|
17
|
+
'@stylistic/arrow-spacing': [
|
|
18
|
+
'error',
|
|
19
|
+
{
|
|
20
|
+
after: true,
|
|
21
|
+
before: true
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
'@stylistic/block-spacing': [
|
|
25
|
+
'error',
|
|
26
|
+
'always'
|
|
27
|
+
],
|
|
28
|
+
'@stylistic/brace-style': [
|
|
29
|
+
'error',
|
|
30
|
+
'1tbs',
|
|
31
|
+
{
|
|
32
|
+
allowSingleLine: true
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
'@stylistic/comma-dangle': [
|
|
36
|
+
'error',
|
|
37
|
+
{
|
|
38
|
+
arrays: 'never',
|
|
39
|
+
exports: 'never',
|
|
40
|
+
functions: 'never',
|
|
41
|
+
imports: 'never',
|
|
42
|
+
objects: 'never'
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
'@stylistic/comma-spacing': [
|
|
46
|
+
'error',
|
|
47
|
+
{
|
|
48
|
+
after: true,
|
|
49
|
+
before: false
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
'@stylistic/comma-style': [
|
|
53
|
+
'error',
|
|
54
|
+
'last'
|
|
55
|
+
],
|
|
56
|
+
'@stylistic/computed-property-spacing': [
|
|
57
|
+
'error',
|
|
58
|
+
'never',
|
|
59
|
+
{
|
|
60
|
+
enforceForClassMembers: true
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
'@stylistic/dot-location': [
|
|
64
|
+
'error',
|
|
65
|
+
'property'
|
|
66
|
+
],
|
|
67
|
+
'@stylistic/eol-last': 'error',
|
|
68
|
+
'@stylistic/function-call-spacing': [
|
|
69
|
+
'error',
|
|
70
|
+
'never'
|
|
71
|
+
],
|
|
72
|
+
'@stylistic/generator-star-spacing': [
|
|
73
|
+
'error',
|
|
74
|
+
{
|
|
75
|
+
after: true,
|
|
76
|
+
before: true
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
'@stylistic/indent': [
|
|
80
|
+
'error',
|
|
81
|
+
2,
|
|
82
|
+
{
|
|
83
|
+
ArrayExpression: 1,
|
|
84
|
+
CallExpression: {
|
|
85
|
+
arguments: 1
|
|
86
|
+
},
|
|
87
|
+
FunctionDeclaration: {
|
|
88
|
+
body: 1,
|
|
89
|
+
parameters: 1
|
|
90
|
+
},
|
|
91
|
+
FunctionExpression: {
|
|
92
|
+
body: 1,
|
|
93
|
+
parameters: 1
|
|
94
|
+
},
|
|
95
|
+
ImportDeclaration: 1,
|
|
96
|
+
MemberExpression: 1,
|
|
97
|
+
ObjectExpression: 1,
|
|
98
|
+
SwitchCase: 1,
|
|
99
|
+
VariableDeclarator: 1,
|
|
100
|
+
flatTernaryExpressions: false,
|
|
101
|
+
ignoreComments: false,
|
|
102
|
+
ignoredNodes: [
|
|
103
|
+
'TemplateLiteral *',
|
|
104
|
+
'JSXElement',
|
|
105
|
+
'JSXElement > *',
|
|
106
|
+
'JSXAttribute',
|
|
107
|
+
'JSXIdentifier',
|
|
108
|
+
'JSXNamespacedName',
|
|
109
|
+
'JSXMemberExpression',
|
|
110
|
+
'JSXSpreadAttribute',
|
|
111
|
+
'JSXExpressionContainer',
|
|
112
|
+
'JSXOpeningElement',
|
|
113
|
+
'JSXClosingElement',
|
|
114
|
+
'JSXFragment',
|
|
115
|
+
'JSXOpeningFragment',
|
|
116
|
+
'JSXClosingFragment',
|
|
117
|
+
'JSXText',
|
|
118
|
+
'JSXEmptyExpression',
|
|
119
|
+
'JSXSpreadChild'
|
|
120
|
+
],
|
|
121
|
+
offsetTernaryExpressions: true,
|
|
122
|
+
outerIIFEBody: 1
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
'@stylistic/key-spacing': [
|
|
126
|
+
'error',
|
|
127
|
+
{
|
|
128
|
+
afterColon: true,
|
|
129
|
+
beforeColon: false
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
'@stylistic/keyword-spacing': [
|
|
133
|
+
'error',
|
|
134
|
+
{
|
|
135
|
+
after: true,
|
|
136
|
+
before: true
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
'@stylistic/lines-between-class-members': [
|
|
140
|
+
'error',
|
|
141
|
+
'always',
|
|
142
|
+
{
|
|
143
|
+
exceptAfterSingleLine: true
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
'@stylistic/multiline-ternary': [
|
|
147
|
+
'error',
|
|
148
|
+
'always-multiline'
|
|
149
|
+
],
|
|
150
|
+
'@stylistic/new-parens': 'error',
|
|
151
|
+
'@stylistic/no-extra-parens': [
|
|
152
|
+
'error',
|
|
153
|
+
'functions'
|
|
154
|
+
],
|
|
155
|
+
'@stylistic/no-floating-decimal': 'error',
|
|
156
|
+
'@stylistic/no-mixed-operators': [
|
|
157
|
+
'error',
|
|
158
|
+
{
|
|
159
|
+
allowSamePrecedence: true,
|
|
160
|
+
groups: [
|
|
161
|
+
[
|
|
162
|
+
'==',
|
|
163
|
+
'!=',
|
|
164
|
+
'===',
|
|
165
|
+
'!==',
|
|
166
|
+
'>',
|
|
167
|
+
'>=',
|
|
168
|
+
'<',
|
|
169
|
+
'<='
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
'&&',
|
|
173
|
+
'||'
|
|
174
|
+
],
|
|
175
|
+
[
|
|
176
|
+
'in',
|
|
177
|
+
'instanceof'
|
|
178
|
+
]
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
|
183
|
+
'@stylistic/no-multi-spaces': 'error',
|
|
184
|
+
'@stylistic/no-multiple-empty-lines': [
|
|
185
|
+
'error',
|
|
186
|
+
{
|
|
187
|
+
max: 1,
|
|
188
|
+
maxBOF: 0,
|
|
189
|
+
maxEOF: 0
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
'@stylistic/no-tabs': 'error',
|
|
193
|
+
'@stylistic/no-trailing-spaces': 'error',
|
|
194
|
+
'@stylistic/no-whitespace-before-property': 'error',
|
|
195
|
+
'@stylistic/object-curly-newline': [
|
|
196
|
+
'error',
|
|
197
|
+
{
|
|
198
|
+
consistent: true,
|
|
199
|
+
multiline: true
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
'@stylistic/object-curly-spacing': [
|
|
203
|
+
'error',
|
|
204
|
+
'always'
|
|
205
|
+
],
|
|
206
|
+
// allowMultiplePropertiesPerLine was core's alias for allowAllPropertiesOnSameLine
|
|
207
|
+
// (the two were OR-ed); @stylistic only takes the latter.
|
|
208
|
+
'@stylistic/object-property-newline': [
|
|
209
|
+
'error',
|
|
210
|
+
{
|
|
211
|
+
allowAllPropertiesOnSameLine: true
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
'@stylistic/operator-linebreak': [
|
|
215
|
+
'error',
|
|
216
|
+
'after',
|
|
217
|
+
{
|
|
218
|
+
overrides: {
|
|
219
|
+
':': 'before',
|
|
220
|
+
'?': 'before',
|
|
221
|
+
'|>': 'before'
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
'@stylistic/padded-blocks': [
|
|
226
|
+
'error',
|
|
227
|
+
{
|
|
228
|
+
blocks: 'never',
|
|
229
|
+
classes: 'never',
|
|
230
|
+
switches: 'never'
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
'@stylistic/quote-props': [
|
|
234
|
+
'error',
|
|
235
|
+
'as-needed'
|
|
236
|
+
],
|
|
237
|
+
'@stylistic/quotes': [
|
|
238
|
+
'error',
|
|
239
|
+
'single',
|
|
240
|
+
{
|
|
241
|
+
allowTemplateLiterals: 'never',
|
|
242
|
+
avoidEscape: true
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
'@stylistic/rest-spread-spacing': [
|
|
246
|
+
'error',
|
|
247
|
+
'never'
|
|
248
|
+
],
|
|
249
|
+
'@stylistic/semi': [
|
|
250
|
+
'error',
|
|
251
|
+
'never'
|
|
252
|
+
],
|
|
253
|
+
'@stylistic/semi-spacing': [
|
|
254
|
+
'error',
|
|
255
|
+
{
|
|
256
|
+
after: true,
|
|
257
|
+
before: false
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
'@stylistic/space-before-blocks': [
|
|
261
|
+
'error',
|
|
262
|
+
'always'
|
|
263
|
+
],
|
|
264
|
+
'@stylistic/space-before-function-paren': [
|
|
265
|
+
'error',
|
|
266
|
+
'always'
|
|
267
|
+
],
|
|
268
|
+
'@stylistic/space-in-parens': [
|
|
269
|
+
'error',
|
|
270
|
+
'never'
|
|
271
|
+
],
|
|
272
|
+
'@stylistic/space-infix-ops': 'error',
|
|
273
|
+
'@stylistic/space-unary-ops': [
|
|
274
|
+
'error',
|
|
275
|
+
{
|
|
276
|
+
nonwords: false,
|
|
277
|
+
words: true
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
'@stylistic/spaced-comment': [
|
|
281
|
+
'error',
|
|
282
|
+
'always',
|
|
283
|
+
{
|
|
284
|
+
block: {
|
|
285
|
+
balanced: true,
|
|
286
|
+
exceptions: [
|
|
287
|
+
'*'
|
|
288
|
+
],
|
|
289
|
+
markers: [
|
|
290
|
+
'*package',
|
|
291
|
+
'!',
|
|
292
|
+
',',
|
|
293
|
+
':',
|
|
294
|
+
'::',
|
|
295
|
+
'flow-include'
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
line: {
|
|
299
|
+
markers: [
|
|
300
|
+
'*package',
|
|
301
|
+
'!',
|
|
302
|
+
'/',
|
|
303
|
+
',',
|
|
304
|
+
'='
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
'@stylistic/template-curly-spacing': [
|
|
310
|
+
'error',
|
|
311
|
+
'never'
|
|
312
|
+
],
|
|
313
|
+
'@stylistic/template-tag-spacing': [
|
|
314
|
+
'error',
|
|
315
|
+
'never'
|
|
316
|
+
],
|
|
317
|
+
'@stylistic/wrap-iife': [
|
|
318
|
+
'error',
|
|
319
|
+
'any',
|
|
320
|
+
{
|
|
321
|
+
functionPrototypeMethods: true
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
'@stylistic/yield-star-spacing': [
|
|
325
|
+
'error',
|
|
326
|
+
'both'
|
|
327
|
+
],
|
|
328
|
+
'accessor-pairs': [
|
|
329
|
+
'error',
|
|
330
|
+
{
|
|
331
|
+
enforceForClassMembers: true,
|
|
332
|
+
setWithoutGet: true
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
'array-callback-return': [
|
|
336
|
+
'error',
|
|
337
|
+
{
|
|
338
|
+
allowImplicit: false,
|
|
339
|
+
checkForEach: false
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
camelcase: [
|
|
343
|
+
'error',
|
|
344
|
+
{
|
|
345
|
+
allow: [
|
|
346
|
+
'^UNSAFE_'
|
|
347
|
+
],
|
|
348
|
+
ignoreGlobals: true,
|
|
349
|
+
properties: 'never'
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
'constructor-super': 'error',
|
|
353
|
+
curly: [
|
|
354
|
+
'error',
|
|
355
|
+
'multi-line'
|
|
356
|
+
],
|
|
357
|
+
'default-case-last': 'error',
|
|
358
|
+
'dot-notation': [
|
|
359
|
+
'error',
|
|
360
|
+
{
|
|
361
|
+
allowKeywords: true
|
|
362
|
+
}
|
|
363
|
+
],
|
|
364
|
+
eqeqeq: [
|
|
365
|
+
'error',
|
|
366
|
+
'always',
|
|
367
|
+
{
|
|
368
|
+
null: 'ignore'
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
'import-x/export': 'error',
|
|
372
|
+
'import-x/first': 'error',
|
|
373
|
+
'import-x/no-absolute-path': [
|
|
374
|
+
'error',
|
|
375
|
+
{
|
|
376
|
+
amd: false,
|
|
377
|
+
commonjs: true,
|
|
378
|
+
esmodule: true
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
'import-x/no-duplicates': 'error',
|
|
382
|
+
'import-x/no-named-default': 'error',
|
|
383
|
+
'import-x/no-webpack-loader-syntax': 'error',
|
|
384
|
+
'n/handle-callback-err': [
|
|
385
|
+
'error',
|
|
386
|
+
'^(err|error)$'
|
|
387
|
+
],
|
|
388
|
+
'n/no-callback-literal': 'error',
|
|
389
|
+
'n/no-deprecated-api': 'error',
|
|
390
|
+
'n/no-exports-assign': 'error',
|
|
391
|
+
'n/no-new-require': 'error',
|
|
392
|
+
'n/no-path-concat': 'error',
|
|
393
|
+
'n/process-exit-as-throw': 'error',
|
|
394
|
+
'new-cap': [
|
|
395
|
+
'error',
|
|
396
|
+
{
|
|
397
|
+
capIsNew: false,
|
|
398
|
+
newIsCap: true,
|
|
399
|
+
properties: true
|
|
400
|
+
}
|
|
401
|
+
],
|
|
402
|
+
'no-array-constructor': 'error',
|
|
403
|
+
'no-async-promise-executor': 'error',
|
|
404
|
+
'no-caller': 'error',
|
|
405
|
+
'no-case-declarations': 'error',
|
|
406
|
+
'no-class-assign': 'error',
|
|
407
|
+
'no-compare-neg-zero': 'error',
|
|
408
|
+
'no-cond-assign': 'error',
|
|
409
|
+
'no-const-assign': 'error',
|
|
410
|
+
'no-constant-condition': [
|
|
411
|
+
'error',
|
|
412
|
+
{
|
|
413
|
+
checkLoops: false
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
'no-control-regex': 'error',
|
|
417
|
+
'no-debugger': 'error',
|
|
418
|
+
'no-delete-var': 'error',
|
|
419
|
+
'no-dupe-args': 'error',
|
|
420
|
+
'no-dupe-class-members': 'error',
|
|
421
|
+
'no-dupe-keys': 'error',
|
|
422
|
+
'no-duplicate-case': 'error',
|
|
423
|
+
'no-empty': [
|
|
424
|
+
'error',
|
|
425
|
+
{
|
|
426
|
+
allowEmptyCatch: true
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
'no-empty-character-class': 'error',
|
|
430
|
+
'no-empty-pattern': 'error',
|
|
431
|
+
'no-eval': 'error',
|
|
432
|
+
'no-ex-assign': 'error',
|
|
433
|
+
'no-extend-native': 'error',
|
|
434
|
+
'no-extra-bind': 'error',
|
|
435
|
+
'no-extra-boolean-cast': 'error',
|
|
436
|
+
'no-fallthrough': 'error',
|
|
437
|
+
'no-func-assign': 'error',
|
|
438
|
+
'no-global-assign': 'error',
|
|
439
|
+
'no-implied-eval': 'error',
|
|
440
|
+
'no-import-assign': 'error',
|
|
441
|
+
'no-invalid-regexp': 'error',
|
|
442
|
+
'no-irregular-whitespace': 'error',
|
|
443
|
+
'no-iterator': 'error',
|
|
444
|
+
'no-labels': [
|
|
445
|
+
'error',
|
|
446
|
+
{
|
|
447
|
+
allowLoop: false,
|
|
448
|
+
allowSwitch: false
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
'no-lone-blocks': 'error',
|
|
452
|
+
'no-loss-of-precision': 'error',
|
|
453
|
+
'no-misleading-character-class': 'error',
|
|
454
|
+
'no-multi-str': 'error',
|
|
455
|
+
'no-new': 'error',
|
|
456
|
+
'no-new-func': 'error',
|
|
457
|
+
'no-new-native-nonconstructor': 'error',
|
|
458
|
+
'no-new-wrappers': 'error',
|
|
459
|
+
'no-obj-calls': 'error',
|
|
460
|
+
'no-object-constructor': 'error',
|
|
461
|
+
'no-octal': 'error',
|
|
462
|
+
'no-octal-escape': 'error',
|
|
463
|
+
'no-proto': 'error',
|
|
464
|
+
'no-prototype-builtins': 'error',
|
|
465
|
+
'no-redeclare': [
|
|
466
|
+
'error',
|
|
467
|
+
{
|
|
468
|
+
builtinGlobals: false
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
'no-regex-spaces': 'error',
|
|
472
|
+
'no-return-assign': [
|
|
473
|
+
'error',
|
|
474
|
+
'except-parens'
|
|
475
|
+
],
|
|
476
|
+
'no-self-assign': [
|
|
477
|
+
'error',
|
|
478
|
+
{
|
|
479
|
+
props: true
|
|
480
|
+
}
|
|
481
|
+
],
|
|
482
|
+
'no-self-compare': 'error',
|
|
483
|
+
'no-sequences': 'error',
|
|
484
|
+
'no-shadow-restricted-names': 'error',
|
|
485
|
+
'no-sparse-arrays': 'error',
|
|
486
|
+
'no-template-curly-in-string': 'error',
|
|
487
|
+
'no-this-before-super': 'error',
|
|
488
|
+
'no-throw-literal': 'error',
|
|
489
|
+
'no-undef': 'error',
|
|
490
|
+
'no-undef-init': 'error',
|
|
491
|
+
'no-unexpected-multiline': 'error',
|
|
492
|
+
'no-unmodified-loop-condition': 'error',
|
|
493
|
+
'no-unneeded-ternary': [
|
|
494
|
+
'error',
|
|
495
|
+
{
|
|
496
|
+
defaultAssignment: false
|
|
497
|
+
}
|
|
498
|
+
],
|
|
499
|
+
'no-unreachable': 'error',
|
|
500
|
+
'no-unreachable-loop': 'error',
|
|
501
|
+
'no-unsafe-finally': 'error',
|
|
502
|
+
'no-unsafe-negation': 'error',
|
|
503
|
+
'no-unused-expressions': [
|
|
504
|
+
'error',
|
|
505
|
+
{
|
|
506
|
+
allowShortCircuit: true,
|
|
507
|
+
allowTaggedTemplates: true,
|
|
508
|
+
allowTernary: true
|
|
509
|
+
}
|
|
510
|
+
],
|
|
511
|
+
'no-unused-vars': [
|
|
512
|
+
'error',
|
|
513
|
+
{
|
|
514
|
+
args: 'none',
|
|
515
|
+
caughtErrors: 'none',
|
|
516
|
+
ignoreRestSiblings: true,
|
|
517
|
+
vars: 'all'
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
'no-use-before-define': [
|
|
521
|
+
'error',
|
|
522
|
+
{
|
|
523
|
+
classes: false,
|
|
524
|
+
functions: false,
|
|
525
|
+
variables: false
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
'no-useless-backreference': 'error',
|
|
529
|
+
'no-useless-call': 'error',
|
|
530
|
+
'no-useless-catch': 'error',
|
|
531
|
+
'no-useless-computed-key': 'error',
|
|
532
|
+
'no-useless-constructor': 'error',
|
|
533
|
+
'no-useless-escape': 'error',
|
|
534
|
+
'no-useless-rename': 'error',
|
|
535
|
+
'no-useless-return': 'error',
|
|
536
|
+
'no-var': 'warn',
|
|
537
|
+
'no-void': 'error',
|
|
538
|
+
'no-with': 'error',
|
|
539
|
+
'object-shorthand': [
|
|
540
|
+
'warn',
|
|
541
|
+
'properties'
|
|
542
|
+
],
|
|
543
|
+
'one-var': [
|
|
544
|
+
'error',
|
|
545
|
+
{
|
|
546
|
+
initialized: 'never'
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
'prefer-const': [
|
|
550
|
+
'error',
|
|
551
|
+
{
|
|
552
|
+
destructuring: 'all'
|
|
553
|
+
}
|
|
554
|
+
],
|
|
555
|
+
'prefer-promise-reject-errors': 'error',
|
|
556
|
+
'prefer-regex-literals': [
|
|
557
|
+
'error',
|
|
558
|
+
{
|
|
559
|
+
disallowRedundantWrapping: true
|
|
560
|
+
}
|
|
561
|
+
],
|
|
562
|
+
'promise/param-names': 'error',
|
|
563
|
+
'symbol-description': 'error',
|
|
564
|
+
'unicode-bom': [
|
|
565
|
+
'error',
|
|
566
|
+
'never'
|
|
567
|
+
],
|
|
568
|
+
'use-isnan': [
|
|
569
|
+
'error',
|
|
570
|
+
{
|
|
571
|
+
enforceForIndexOf: true,
|
|
572
|
+
enforceForSwitchCase: true
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
'valid-typeof': [
|
|
576
|
+
'error',
|
|
577
|
+
{
|
|
578
|
+
requireStringLiterals: true
|
|
579
|
+
}
|
|
580
|
+
],
|
|
581
|
+
yoda: [
|
|
582
|
+
'error',
|
|
583
|
+
'never'
|
|
584
|
+
]
|
|
585
|
+
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"bugs": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/issues",
|
|
4
4
|
"description": "A collection of shared CI scripts and development environment used by @pezkuwi projects",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": ">=
|
|
6
|
+
"node": ">=20.19"
|
|
7
7
|
},
|
|
8
8
|
"homepage": "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-dev/tree/master/packages/dev#readme",
|
|
9
9
|
"license": "Apache-2.0",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"type": "module",
|
|
18
|
-
"version": "0.
|
|
18
|
+
"version": "0.86.1",
|
|
19
19
|
"bin": {
|
|
20
20
|
"pezkuwi-ci-ghact-build": "./scripts/pezkuwi-ci-ghact-build.mjs",
|
|
21
21
|
"pezkuwi-ci-ghact-docs": "./scripts/pezkuwi-ci-ghact-docs.mjs",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"pezkuwi-dev-copy-dir": "./scripts/pezkuwi-dev-copy-dir.mjs",
|
|
29
29
|
"pezkuwi-dev-copy-to": "./scripts/pezkuwi-dev-copy-to.mjs",
|
|
30
30
|
"pezkuwi-dev-deno-map": "./scripts/pezkuwi-dev-deno-map.mjs",
|
|
31
|
+
"pezkuwi-dev-migrate-eslint10": "./scripts/pezkuwi-dev-migrate-eslint10.mjs",
|
|
31
32
|
"pezkuwi-dev-run-lint": "./scripts/pezkuwi-dev-run-lint.mjs",
|
|
32
33
|
"pezkuwi-dev-run-node-ts": "./scripts/pezkuwi-dev-run-node-ts.mjs",
|
|
33
34
|
"pezkuwi-dev-run-test": "./scripts/pezkuwi-dev-run-test.mjs",
|
|
@@ -63,6 +64,7 @@
|
|
|
63
64
|
},
|
|
64
65
|
"./config/eslint": "./config/eslint.js",
|
|
65
66
|
"./config/eslint.rules": "./config/eslint.rules.js",
|
|
67
|
+
"./config/eslint.standard": "./config/eslint.standard.js",
|
|
66
68
|
"./config/prettier.cjs": "./config/prettier.cjs",
|
|
67
69
|
"./config/prettier": "./config/prettier.cjs",
|
|
68
70
|
"./config/rollup": "./config/rollup.js",
|
|
@@ -240,6 +242,8 @@
|
|
|
240
242
|
"./scripts/pezkuwi-dev-copy-to": "./scripts/pezkuwi-dev-copy-to.mjs",
|
|
241
243
|
"./scripts/pezkuwi-dev-deno-map.mjs": "./scripts/pezkuwi-dev-deno-map.mjs",
|
|
242
244
|
"./scripts/pezkuwi-dev-deno-map": "./scripts/pezkuwi-dev-deno-map.mjs",
|
|
245
|
+
"./scripts/pezkuwi-dev-migrate-eslint10.mjs": "./scripts/pezkuwi-dev-migrate-eslint10.mjs",
|
|
246
|
+
"./scripts/pezkuwi-dev-migrate-eslint10": "./scripts/pezkuwi-dev-migrate-eslint10.mjs",
|
|
243
247
|
"./scripts/pezkuwi-dev-run-lint.mjs": "./scripts/pezkuwi-dev-run-lint.mjs",
|
|
244
248
|
"./scripts/pezkuwi-dev-run-lint": "./scripts/pezkuwi-dev-run-lint.mjs",
|
|
245
249
|
"./scripts/pezkuwi-dev-run-node-ts.mjs": "./scripts/pezkuwi-dev-run-node-ts.mjs",
|
|
@@ -282,47 +286,47 @@
|
|
|
282
286
|
}
|
|
283
287
|
},
|
|
284
288
|
"dependencies": {
|
|
285
|
-
"@eslint/
|
|
286
|
-
"@
|
|
287
|
-
"@pezkuwi/dev-
|
|
289
|
+
"@eslint/compat": "^2.1.1",
|
|
290
|
+
"@eslint/js": "^10.0.1",
|
|
291
|
+
"@pezkuwi/dev-test": "^0.86.1",
|
|
292
|
+
"@pezkuwi/dev-ts": "^0.86.1",
|
|
288
293
|
"@rollup/plugin-alias": "^5.1.1",
|
|
289
|
-
"@rollup/plugin-commonjs": "^
|
|
294
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
290
295
|
"@rollup/plugin-dynamic-import-vars": "^2.1.5",
|
|
291
296
|
"@rollup/plugin-inject": "^5.0.5",
|
|
292
297
|
"@rollup/plugin-json": "^6.1.0",
|
|
293
|
-
"@rollup/plugin-node-resolve": "^
|
|
298
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
299
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
294
300
|
"@tsconfig/strictest": "^2.0.2",
|
|
295
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
296
|
-
"@typescript-eslint/parser": "^
|
|
297
|
-
"eslint": "^
|
|
298
|
-
"eslint-config-standard": "^17.1.0",
|
|
301
|
+
"@typescript-eslint/eslint-plugin": "^8.71.1",
|
|
302
|
+
"@typescript-eslint/parser": "^8.71.1",
|
|
303
|
+
"eslint": "^10.12.0",
|
|
299
304
|
"eslint-import-resolver-node": "^0.3.9",
|
|
300
|
-
"eslint-import-resolver-typescript": "^
|
|
301
|
-
"eslint-plugin-deprecation": "^2.0.0",
|
|
305
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
302
306
|
"eslint-plugin-header": "^3.1.1",
|
|
303
|
-
"eslint-plugin-import": "^2.
|
|
304
|
-
"eslint-plugin-import-
|
|
305
|
-
"eslint-plugin-jest": "^
|
|
306
|
-
"eslint-plugin-n": "^
|
|
307
|
-
"eslint-plugin-promise": "^
|
|
308
|
-
"eslint-plugin-react": "^7.
|
|
309
|
-
"eslint-plugin-react-hooks": "^
|
|
310
|
-
"eslint-plugin-simple-import-sort": "^
|
|
311
|
-
"eslint-plugin-sort-destructure-keys": "^
|
|
312
|
-
"espree": "^
|
|
307
|
+
"eslint-plugin-import-newlines": "^2.0.0",
|
|
308
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
309
|
+
"eslint-plugin-jest": "^29.16.6",
|
|
310
|
+
"eslint-plugin-n": "^18.4.1",
|
|
311
|
+
"eslint-plugin-promise": "^7.3.0",
|
|
312
|
+
"eslint-plugin-react": "^7.37.5",
|
|
313
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
314
|
+
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
315
|
+
"eslint-plugin-sort-destructure-keys": "^3.0.0",
|
|
316
|
+
"espree": "^11.2.0",
|
|
313
317
|
"gh-pages": "^6.1.1",
|
|
314
|
-
"gh-release": "^
|
|
315
|
-
"globals": "^13.
|
|
318
|
+
"gh-release": "^8.1.0",
|
|
319
|
+
"globals": "^17.13.0",
|
|
316
320
|
"json5": "^2.2.3",
|
|
317
|
-
"madge": "^
|
|
321
|
+
"madge": "^8.0.0",
|
|
318
322
|
"rollup": "^4.9.6",
|
|
319
323
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
320
324
|
"tslib": "^2.7.0",
|
|
321
325
|
"typescript": "^5.5.4",
|
|
322
326
|
"webpack": "^5.89.0",
|
|
323
|
-
"webpack-cli": "^
|
|
324
|
-
"webpack-dev-server": "^
|
|
325
|
-
"webpack-merge": "^
|
|
327
|
+
"webpack-cli": "^7.2.3",
|
|
328
|
+
"webpack-dev-server": "^6.0.0",
|
|
329
|
+
"webpack-merge": "^6.0.1",
|
|
326
330
|
"webpack-subresource-integrity": "^5.2.0-rc.1",
|
|
327
331
|
"yargs": "^17.7.2"
|
|
328
332
|
}
|
package/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@pezkuwi/dev', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.
|
|
1
|
+
export const packageInfo = { name: '@pezkuwi/dev', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.86.1' };
|
package/rootJs/index.js
CHANGED
|
@@ -14,7 +14,6 @@ export async function dynamic(a, b) {
|
|
|
14
14
|
// NOTE we go via this path so it points to the same location in both ESM
|
|
15
15
|
// and CJS output (a './dynamic' import would be different otherwise)
|
|
16
16
|
const { sum } = await import('@pezkuwi/dev/rootJs/dynamic.mjs');
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
18
17
|
return sum(a, b);
|
|
19
18
|
}
|
|
20
19
|
/** Function to ensure we have json correctly imported */
|
|
@@ -1119,8 +1119,8 @@ function lintInput (dir) {
|
|
|
1119
1119
|
// file will also be caught in the net, i.e. we expect all files to conform
|
|
1120
1120
|
if (n === 0 && (
|
|
1121
1121
|
!/\/\/ Copyright .* @pezkuwi\//.test(l) &&
|
|
1122
|
-
|
|
1123
|
-
|
|
1122
|
+
!l.includes('// Auto-generated via `') &&
|
|
1123
|
+
!l.includes('#!/usr/bin/env node')
|
|
1124
1124
|
)) {
|
|
1125
1125
|
return createError(full, l, n, 'Invalid header definition');
|
|
1126
1126
|
}
|
|
@@ -1281,7 +1281,7 @@ function extractPackageInfoImports (filepath, withDetectImport) {
|
|
|
1281
1281
|
.readFileSync(filepath, { encoding: 'utf-8' })
|
|
1282
1282
|
.split('\n')
|
|
1283
1283
|
.forEach((l) => {
|
|
1284
|
-
const match =
|
|
1284
|
+
const match = /import \{ packageInfo as (.*) \}/.exec(l);
|
|
1285
1285
|
|
|
1286
1286
|
if (match) {
|
|
1287
1287
|
otherImports.push(l);
|
|
@@ -1290,8 +1290,8 @@ function extractPackageInfoImports (filepath, withDetectImport) {
|
|
|
1290
1290
|
});
|
|
1291
1291
|
|
|
1292
1292
|
otherImports.sort((a, b) => {
|
|
1293
|
-
const am =
|
|
1294
|
-
const bm =
|
|
1293
|
+
const am = /\} from '(.*)';/.exec(a);
|
|
1294
|
+
const bm = /\} from '(.*)';/.exec(b);
|
|
1295
1295
|
|
|
1296
1296
|
if (!am) {
|
|
1297
1297
|
throw new Error(`Unable to extract from import from ${a}`);
|
|
@@ -19,7 +19,7 @@ const [e, i] = fs
|
|
|
19
19
|
|
|
20
20
|
if (!fs.existsSync('mod.ts')) {
|
|
21
21
|
fs.writeFileSync('mod.ts', `// Copyright 2017-${new Date().getFullYear()} @pezkuwi/dev authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// auto-generated via pezkuwi-dev-deno-map, do not edit\n\n// This is a Deno file, so we can allow .ts imports
|
|
22
|
-
/* eslint-disable import/extensions */\n\n${e.join('\n')}\n`);
|
|
22
|
+
/* eslint-disable import-x/extensions */\n\n${e.join('\n')}\n`);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
if (fs.existsSync('import_map.in.json')) {
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Copyright 2017-2026 @pezkuwi/dev authors & contributors
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
// Renames rules in eslint-disable / eslint-enable comments for the 0.86
|
|
6
|
+
// toolchain (eslint 10, typescript-eslint 8, @stylistic, import-x).
|
|
7
|
+
//
|
|
8
|
+
// A disable comment that names a rule which no longer exists under that name
|
|
9
|
+
// disables nothing: eslint reports it as unused and `--fix` deletes it, after
|
|
10
|
+
// which the rule it was meant to silence applies. Run this before the first
|
|
11
|
+
// lint on 0.86, in the repository root:
|
|
12
|
+
//
|
|
13
|
+
// pezkuwi-dev-migrate-eslint10 # rewrite tracked files
|
|
14
|
+
// pezkuwi-dev-migrate-eslint10 --check # report, change nothing (exit 1 if anything would change)
|
|
15
|
+
//
|
|
16
|
+
// It also rewrites such comments inside string literals, which is how code
|
|
17
|
+
// generators emit them.
|
|
18
|
+
|
|
19
|
+
import stylisticPlugin from '@stylistic/eslint-plugin';
|
|
20
|
+
import { builtinRules } from 'eslint/use-at-your-own-risk';
|
|
21
|
+
import importPlugin from 'eslint-plugin-import-x';
|
|
22
|
+
import { execFileSync } from 'node:child_process';
|
|
23
|
+
import fs from 'node:fs';
|
|
24
|
+
|
|
25
|
+
const STYLISTIC = new Set(Object.keys(stylisticPlugin.rules));
|
|
26
|
+
const IMPORT_X = new Set(Object.keys(importPlugin.rules));
|
|
27
|
+
|
|
28
|
+
/** @type {Map<string, string[]>} */
|
|
29
|
+
const RENAME = new Map();
|
|
30
|
+
|
|
31
|
+
// Core rules eslint 10 deprecated, with the successor it names itself. The
|
|
32
|
+
// rule metadata (meta.deprecated.replacedBy) is only exposed here, so this
|
|
33
|
+
// reads it rather than keeping a hand-written copy that could drift.
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
35
|
+
for (const [name, rule] of builtinRules) {
|
|
36
|
+
const replacedBy = rule.meta?.deprecated && typeof rule.meta.deprecated === 'object'
|
|
37
|
+
? rule.meta.deprecated.replacedBy
|
|
38
|
+
: undefined;
|
|
39
|
+
|
|
40
|
+
if (replacedBy?.length === 1) {
|
|
41
|
+
const [{ plugin, rule: next }] = replacedBy;
|
|
42
|
+
|
|
43
|
+
if (next?.name) {
|
|
44
|
+
RENAME.set(name, [plugin?.name === '@stylistic/eslint-plugin' ? `@stylistic/${next.name}` : next.name]);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// typescript-eslint 8 removed its formatting rules; they live in @stylistic.
|
|
50
|
+
for (const name of ['block-spacing', 'brace-style', 'comma-dangle', 'comma-spacing', 'func-call-spacing', 'indent', 'key-spacing', 'keyword-spacing', 'lines-around-comment', 'lines-between-class-members', 'member-delimiter-style', 'no-extra-parens', 'no-extra-semi', 'object-curly-spacing', 'padding-line-between-statements', 'quotes', 'semi', 'space-before-blocks', 'space-before-function-paren', 'space-infix-ops', 'type-annotation-spacing']) {
|
|
51
|
+
const next = name === 'func-call-spacing' ? 'function-call-spacing' : name;
|
|
52
|
+
|
|
53
|
+
if (STYLISTIC.has(next)) {
|
|
54
|
+
RENAME.set(`@typescript-eslint/${name}`, [`@stylistic/${next}`]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Other typescript-eslint 8 removals and renames.
|
|
59
|
+
RENAME.set('@typescript-eslint/ban-types', ['@typescript-eslint/no-empty-object-type', '@typescript-eslint/no-unsafe-function-type', '@typescript-eslint/no-wrapper-object-types']);
|
|
60
|
+
RENAME.set('@typescript-eslint/no-empty-interface', ['@typescript-eslint/no-empty-object-type']);
|
|
61
|
+
RENAME.set('@typescript-eslint/no-loss-of-precision', ['no-loss-of-precision']);
|
|
62
|
+
RENAME.set('@typescript-eslint/no-throw-literal', ['@typescript-eslint/only-throw-error']);
|
|
63
|
+
RENAME.set('@typescript-eslint/no-var-requires', ['@typescript-eslint/no-require-imports']);
|
|
64
|
+
RENAME.set('deprecation/deprecation', ['@typescript-eslint/no-deprecated']);
|
|
65
|
+
|
|
66
|
+
// The react formatting rules config/eslint.rules.js (overrideJsx) now takes
|
|
67
|
+
// from @stylistic; keep this list in step with it. (The config is not
|
|
68
|
+
// imported here: loading it reads the repository's tsconfig.base.json.)
|
|
69
|
+
for (const name of ['jsx-closing-bracket-location', 'jsx-first-prop-new-line', 'jsx-max-props-per-line', 'jsx-newline', 'jsx-props-no-multi-spaces', 'jsx-sort-props', 'jsx-tag-spacing']) {
|
|
70
|
+
if (STYLISTIC.has(name)) {
|
|
71
|
+
RENAME.set(`react/${name}`, [`@stylistic/${name}`]);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @param {string} name
|
|
77
|
+
* @returns {string[]}
|
|
78
|
+
*/
|
|
79
|
+
function rename (name) {
|
|
80
|
+
if (RENAME.has(name)) {
|
|
81
|
+
return /** @type {string[]} */ (RENAME.get(name));
|
|
82
|
+
} else if (name.startsWith('import/') && IMPORT_X.has(name.slice(7))) {
|
|
83
|
+
return [`import-x/${name.slice(7)}`];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return [name];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// eslint-disable, eslint-disable-line, eslint-disable-next-line, eslint-enable
|
|
90
|
+
// followed by a rule list, optionally ending in `-- description`.
|
|
91
|
+
const DIRECTIVE = /(eslint-(?:disable(?:-next-line|-line)?|enable))([ \t]+)([^\n*'"`]*?)([ \t]*(?:--[^\n*]*)?)(?=\*\/|\n|$|['"`])/g;
|
|
92
|
+
|
|
93
|
+
const files = execFileSync('git', ['ls-files', '-z', '--', '*.ts', '*.tsx', '*.js', '*.jsx', '*.mjs', '*.cjs', '*.cts', '*.mts'], { encoding: 'utf-8' })
|
|
94
|
+
.split('\0')
|
|
95
|
+
.filter((f) => f && !/(^|\/)(node_modules|build|build-[^/]+)\//.test(f));
|
|
96
|
+
const check = process.argv.includes('--check');
|
|
97
|
+
let changedFiles = 0;
|
|
98
|
+
let changedComments = 0;
|
|
99
|
+
|
|
100
|
+
for (const file of files) {
|
|
101
|
+
const src = fs.readFileSync(file, 'utf-8');
|
|
102
|
+
const out = src.replace(DIRECTIVE, (/** @type {string} */ all, /** @type {string} */ kind, /** @type {string} */ gap, /** @type {string} */ list, /** @type {string} */ tail) => {
|
|
103
|
+
if (!list.trim()) {
|
|
104
|
+
return all;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const names = list.split(',').map((n) => n.trim()).filter(Boolean);
|
|
108
|
+
const next = [...new Set(names.flatMap(rename))];
|
|
109
|
+
|
|
110
|
+
if (next.join(',') === names.join(',')) {
|
|
111
|
+
return all;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
changedComments++;
|
|
115
|
+
|
|
116
|
+
return `${kind}${gap}${next.join(', ')}${tail}`;
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
if (out !== src) {
|
|
120
|
+
changedFiles++;
|
|
121
|
+
|
|
122
|
+
if (check) {
|
|
123
|
+
console.log(`would change: ${file}`);
|
|
124
|
+
} else {
|
|
125
|
+
fs.writeFileSync(file, out);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
console.log(`${check ? 'would rewrite' : 'rewrote'} ${changedComments} directive(s) in ${changedFiles} file(s)`);
|
|
131
|
+
|
|
132
|
+
if (check && changedFiles) {
|
|
133
|
+
process.exit(1);
|
|
134
|
+
}
|
|
@@ -122,7 +122,7 @@ function getFilename (r) {
|
|
|
122
122
|
.split('\n')
|
|
123
123
|
.map((l) => l.trim())
|
|
124
124
|
.filter((l) => l.startsWith('at ') && (l.includes('.spec.') || l.includes('.test.')))
|
|
125
|
-
.map((l) =>
|
|
125
|
+
.map((l) => (/\(.*:\d\d?:\d\d?\)$/.exec(l))?.[0])
|
|
126
126
|
.map((l) => l?.replace('(', '')?.replace(')', ''));
|
|
127
127
|
|
|
128
128
|
if (stack.length) {
|
|
@@ -186,7 +186,7 @@ function complete () {
|
|
|
186
186
|
|
|
187
187
|
if (typeof r === 'string') {
|
|
188
188
|
console.log(r); // Node.js <= 18.14
|
|
189
|
-
} else if (r.file
|
|
189
|
+
} else if (r.file?.includes('@pezkuwi/dev/scripts')) {
|
|
190
190
|
// Ignore internal diagnostics
|
|
191
191
|
} else {
|
|
192
192
|
if (lastFilename !== r.file) {
|
|
@@ -328,11 +328,11 @@ if (isMainThread) {
|
|
|
328
328
|
} else {
|
|
329
329
|
run({ files: workerData.files, timeout: 3_600_000 })
|
|
330
330
|
.on('data', () => undefined)
|
|
331
|
-
.on('end', () => parentPort
|
|
331
|
+
.on('end', () => parentPort?.postMessage(stats))
|
|
332
332
|
.on('test:coverage', () => undefined)
|
|
333
333
|
.on('test:diagnostic', (/** @type {DiagStat} */data) => {
|
|
334
334
|
stats.diag.push(data);
|
|
335
|
-
parentPort
|
|
335
|
+
parentPort?.postMessage({ data: stats, type: 'result' });
|
|
336
336
|
})
|
|
337
337
|
.on('test:fail', (/** @type {FailStat} */ data) => {
|
|
338
338
|
const statFail = structuredClone(data);
|
|
@@ -343,7 +343,7 @@ if (isMainThread) {
|
|
|
343
343
|
|
|
344
344
|
stats.fail.push(statFail);
|
|
345
345
|
stats.total++;
|
|
346
|
-
parentPort
|
|
346
|
+
parentPort?.postMessage({ data: 'x', type: 'progress' });
|
|
347
347
|
|
|
348
348
|
if (bail) {
|
|
349
349
|
complete();
|
|
@@ -361,7 +361,7 @@ if (isMainThread) {
|
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
stats.total++;
|
|
364
|
-
parentPort
|
|
364
|
+
parentPort?.postMessage({ data: symbol, type: 'progress' });
|
|
365
365
|
})
|
|
366
366
|
.on('test:plan', () => undefined)
|
|
367
367
|
.on('test:start', () => undefined);
|
package/scripts/util.mjs
CHANGED
|
@@ -83,7 +83,7 @@ export function copyDirSync (src, dest, include, exclude) {
|
|
|
83
83
|
if (fs.statSync(srcPath).isDirectory()) {
|
|
84
84
|
copyDirSync(srcPath, path.join(dest, file), include, exclude);
|
|
85
85
|
} else if (!include?.length || include.some((e) => file.endsWith(e))) {
|
|
86
|
-
if (!exclude
|
|
86
|
+
if (!exclude?.some((e) => file.endsWith(e))) {
|
|
87
87
|
copyFileSync(srcPath, dest);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -480,7 +480,7 @@ export function topoSort (dirs) {
|
|
|
480
480
|
visited[key] = true;
|
|
481
481
|
|
|
482
482
|
node.vertices.forEach((i) => {
|
|
483
|
-
if (ancestors.
|
|
483
|
+
if (ancestors.includes(i)) {
|
|
484
484
|
console.log('CIRCULAR: closed chain : ' + i + ' is in ' + id);
|
|
485
485
|
|
|
486
486
|
if (nodes[id].vertices.includes(i)) {
|