@averay/codeformat 0.2.11 → 0.2.12
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/.github/workflows/lint.yml +65 -0
- package/README.md +1 -1
- package/dist/rulesets/eslint/ruleset-typescript.d.ts +218 -1
- package/package.json +19 -18
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Lint
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- develop
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: ['*']
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
php-version: [8.4]
|
|
19
|
+
|
|
20
|
+
env:
|
|
21
|
+
NODE_ENV: development
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v3
|
|
25
|
+
|
|
26
|
+
- name: Use Bun ${{ matrix.bun-version }}
|
|
27
|
+
uses: oven-sh/setup-bun@v1
|
|
28
|
+
with: { bun-version: latest }
|
|
29
|
+
|
|
30
|
+
- name: Use PHP ${{ matrix.php-version }}
|
|
31
|
+
uses: shivammathur/setup-php@v2
|
|
32
|
+
with:
|
|
33
|
+
php-version: ${{ matrix.php-version }}
|
|
34
|
+
env:
|
|
35
|
+
fail-fast: true
|
|
36
|
+
|
|
37
|
+
- name: Cache NPM packages
|
|
38
|
+
uses: actions/cache@v4
|
|
39
|
+
env: { cache-name: npm }
|
|
40
|
+
with:
|
|
41
|
+
path: node_modules
|
|
42
|
+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('bun.lock') }}
|
|
43
|
+
restore-keys: |
|
|
44
|
+
${{ runner.os }}-${{ env.cache-name }}-
|
|
45
|
+
|
|
46
|
+
- name: Cache Composer packages
|
|
47
|
+
uses: actions/cache@v4
|
|
48
|
+
env: { cache-name: composer }
|
|
49
|
+
with:
|
|
50
|
+
path: vendor
|
|
51
|
+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('composer.lock') }}
|
|
52
|
+
restore-keys: |-
|
|
53
|
+
${{ runner.os }}-${{ env.cache-name }}-
|
|
54
|
+
|
|
55
|
+
- name: Install NPM packages
|
|
56
|
+
run: bun install --frozen-lockfile
|
|
57
|
+
|
|
58
|
+
- name: Install Composer packages
|
|
59
|
+
run: composer install
|
|
60
|
+
|
|
61
|
+
- name: Build package
|
|
62
|
+
run: bun run build
|
|
63
|
+
|
|
64
|
+
- name: Lint code
|
|
65
|
+
run: bun run lint
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ A very opinionated collection of configurations for a number of code formatting
|
|
|
21
21
|
Create a `prettier.config.mjs` file with the following configuration:
|
|
22
22
|
|
|
23
23
|
```js
|
|
24
|
-
import makePrettierConfig from '@averay/codeformat';
|
|
24
|
+
import { makePrettierConfig } from '@averay/codeformat';
|
|
25
25
|
|
|
26
26
|
export default makePrettierConfig(/* Customisations can be made here */);
|
|
27
27
|
```
|
|
@@ -1,4 +1,221 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'@typescript-eslint/adjacent-overload-signatures': "error";
|
|
3
|
+
'@typescript-eslint/array-type': "error";
|
|
4
|
+
'@typescript-eslint/await-thenable': "error";
|
|
5
|
+
'@typescript-eslint/ban-ts-comment': "error";
|
|
6
|
+
'@typescript-eslint/class-literal-property-style': "off";
|
|
7
|
+
'@typescript-eslint/consistent-indexed-object-style': "error";
|
|
8
|
+
'@typescript-eslint/consistent-type-assertions': ["error", {
|
|
9
|
+
assertionStyle: string;
|
|
10
|
+
objectLiteralTypeAssertions: string;
|
|
11
|
+
}];
|
|
12
|
+
'@typescript-eslint/consistent-type-definitions': ["error", string];
|
|
13
|
+
'@typescript-eslint/consistent-type-exports': ["error", {
|
|
14
|
+
fixMixedExportsWithInlineTypeSpecifier: boolean;
|
|
15
|
+
}];
|
|
16
|
+
'@typescript-eslint/consistent-type-imports': "error";
|
|
17
|
+
'@typescript-eslint/default-param-last': "error";
|
|
18
|
+
'@typescript-eslint/dot-notation': "error";
|
|
19
|
+
'@typescript-eslint/explicit-function-return-type': ["error", {
|
|
20
|
+
allowExpressions: boolean;
|
|
21
|
+
}];
|
|
22
|
+
'@typescript-eslint/explicit-member-accessibility': ["error", {
|
|
23
|
+
overrides: {
|
|
24
|
+
constructors: string;
|
|
25
|
+
};
|
|
26
|
+
}];
|
|
27
|
+
'@typescript-eslint/explicit-module-boundary-types': ["error", {
|
|
28
|
+
allowArgumentsExplicitlyTypedAsAny: boolean;
|
|
29
|
+
}];
|
|
30
|
+
'@typescript-eslint/member-ordering': "off";
|
|
31
|
+
'@typescript-eslint/method-signature-style': "off";
|
|
32
|
+
'@typescript-eslint/naming-convention': ["error", {
|
|
33
|
+
selector: string;
|
|
34
|
+
format: string[];
|
|
35
|
+
}, {
|
|
36
|
+
selector: string;
|
|
37
|
+
format: null;
|
|
38
|
+
}, {
|
|
39
|
+
selector: string;
|
|
40
|
+
modifiers: string[];
|
|
41
|
+
format: string[];
|
|
42
|
+
}, {
|
|
43
|
+
selector: string;
|
|
44
|
+
modifiers: string[];
|
|
45
|
+
filter: {
|
|
46
|
+
regex: string;
|
|
47
|
+
match: boolean;
|
|
48
|
+
};
|
|
49
|
+
format: string[];
|
|
50
|
+
leadingUnderscore: string;
|
|
51
|
+
}, {
|
|
52
|
+
selector: string;
|
|
53
|
+
format: string[];
|
|
54
|
+
leadingUnderscore: string;
|
|
55
|
+
}, {
|
|
56
|
+
selector: string;
|
|
57
|
+
format: string[];
|
|
58
|
+
}, {
|
|
59
|
+
selector: string;
|
|
60
|
+
modifiers: string[];
|
|
61
|
+
format: string[];
|
|
62
|
+
}, {
|
|
63
|
+
selector: string;
|
|
64
|
+
format: string[];
|
|
65
|
+
}, {
|
|
66
|
+
selector: string;
|
|
67
|
+
format: string[];
|
|
68
|
+
}, {
|
|
69
|
+
selector: string;
|
|
70
|
+
format: string[];
|
|
71
|
+
}, {
|
|
72
|
+
selector: string[];
|
|
73
|
+
format: null;
|
|
74
|
+
}, {
|
|
75
|
+
selector: string[];
|
|
76
|
+
format: string[];
|
|
77
|
+
}, {
|
|
78
|
+
selector: string;
|
|
79
|
+
format: null;
|
|
80
|
+
custom: {
|
|
81
|
+
regex: string;
|
|
82
|
+
match: boolean;
|
|
83
|
+
};
|
|
84
|
+
}];
|
|
85
|
+
'@typescript-eslint/no-array-constructor': "error";
|
|
86
|
+
'@typescript-eslint/no-base-to-string': "error";
|
|
87
|
+
'@typescript-eslint/no-confusing-non-null-assertion': "error";
|
|
88
|
+
'@typescript-eslint/no-confusing-void-expression': "error";
|
|
89
|
+
'@typescript-eslint/no-dupe-class-members': "error";
|
|
90
|
+
'@typescript-eslint/no-dynamic-delete': "off";
|
|
91
|
+
'@typescript-eslint/no-empty-function': "error";
|
|
92
|
+
'@typescript-eslint/no-empty-interface': ["error", {
|
|
93
|
+
allowSingleExtends: boolean;
|
|
94
|
+
}];
|
|
95
|
+
'@typescript-eslint/no-explicit-any': "off";
|
|
96
|
+
'@typescript-eslint/no-extra-non-null-assertion': "error";
|
|
97
|
+
'@typescript-eslint/no-extraneous-class': "error";
|
|
98
|
+
'@typescript-eslint/no-floating-promises': "error";
|
|
99
|
+
'@typescript-eslint/no-for-in-array': "error";
|
|
100
|
+
'@typescript-eslint/no-implied-eval': "error";
|
|
101
|
+
'@typescript-eslint/no-inferrable-types': ["error", {
|
|
102
|
+
ignoreParameters: boolean;
|
|
103
|
+
}];
|
|
104
|
+
'@typescript-eslint/no-invalid-this': "error";
|
|
105
|
+
'@typescript-eslint/no-invalid-void-type': "error";
|
|
106
|
+
'@typescript-eslint/no-loop-func': "error";
|
|
107
|
+
'@typescript-eslint/no-loss-of-precision': "error";
|
|
108
|
+
'@typescript-eslint/no-magic-numbers': ["error", {
|
|
109
|
+
detectObjects: boolean;
|
|
110
|
+
enforceConst: boolean;
|
|
111
|
+
ignore: (string | number)[];
|
|
112
|
+
ignoreArrayIndexes: boolean;
|
|
113
|
+
ignoreClassFieldInitialValues: boolean;
|
|
114
|
+
ignoreDefaultValues: boolean;
|
|
115
|
+
}];
|
|
116
|
+
'@typescript-eslint/no-meaningless-void-operator': "error";
|
|
117
|
+
'@typescript-eslint/no-misused-new': "error";
|
|
118
|
+
'@typescript-eslint/no-misused-promises': "error";
|
|
119
|
+
'@typescript-eslint/no-namespace': "error";
|
|
120
|
+
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error";
|
|
121
|
+
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
|
|
122
|
+
'@typescript-eslint/no-non-null-assertion': "error";
|
|
123
|
+
'@typescript-eslint/no-redeclare': "error";
|
|
124
|
+
'@typescript-eslint/no-require-imports': "error";
|
|
125
|
+
'@typescript-eslint/no-restricted-imports': "error";
|
|
126
|
+
'@typescript-eslint/no-shadow': ["error", {
|
|
127
|
+
hoist: string;
|
|
128
|
+
}];
|
|
129
|
+
'@typescript-eslint/no-this-alias': "error";
|
|
130
|
+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "error";
|
|
131
|
+
'@typescript-eslint/no-unnecessary-condition': ["error", {
|
|
132
|
+
allowConstantLoopConditions: boolean;
|
|
133
|
+
}];
|
|
134
|
+
'@typescript-eslint/no-unnecessary-qualifier': "error";
|
|
135
|
+
'@typescript-eslint/no-unnecessary-type-arguments': "error";
|
|
136
|
+
'@typescript-eslint/no-unnecessary-type-assertion': "error";
|
|
137
|
+
'@typescript-eslint/no-unnecessary-type-constraint': "error";
|
|
138
|
+
'@typescript-eslint/no-unused-expressions': "error";
|
|
139
|
+
'@typescript-eslint/no-unused-vars': ["error", {
|
|
140
|
+
argsIgnorePattern: string;
|
|
141
|
+
caughtErrorsIgnorePattern: string;
|
|
142
|
+
varsIgnorePattern: string;
|
|
143
|
+
}];
|
|
144
|
+
'@typescript-eslint/no-use-before-define': "error";
|
|
145
|
+
'@typescript-eslint/no-useless-constructor': "error";
|
|
146
|
+
'@typescript-eslint/no-useless-empty-export': "error";
|
|
147
|
+
'@typescript-eslint/no-var-requires': "error";
|
|
148
|
+
'@typescript-eslint/non-nullable-type-assertion-style': "error";
|
|
149
|
+
'@typescript-eslint/only-throw-error': "error";
|
|
150
|
+
'@typescript-eslint/prefer-as-const': "error";
|
|
151
|
+
'@typescript-eslint/prefer-enum-initializers': "error";
|
|
152
|
+
'@typescript-eslint/prefer-for-of': "error";
|
|
153
|
+
'@typescript-eslint/prefer-function-type': "error";
|
|
154
|
+
'@typescript-eslint/prefer-includes': "error";
|
|
155
|
+
'@typescript-eslint/prefer-literal-enum-member': "error";
|
|
156
|
+
'@typescript-eslint/prefer-namespace-keyword': "error";
|
|
157
|
+
'@typescript-eslint/prefer-nullish-coalescing': ["error", {
|
|
158
|
+
ignoreConditionalTests: boolean;
|
|
159
|
+
ignoreMixedLogicalExpressions: boolean;
|
|
160
|
+
}];
|
|
161
|
+
'@typescript-eslint/prefer-optional-chain': "error";
|
|
162
|
+
'@typescript-eslint/prefer-readonly': "error";
|
|
163
|
+
'@typescript-eslint/prefer-reduce-type-parameter': "error";
|
|
164
|
+
'@typescript-eslint/prefer-return-this-type': "error";
|
|
165
|
+
'@typescript-eslint/prefer-string-starts-ends-with': "error";
|
|
166
|
+
'@typescript-eslint/prefer-ts-expect-error': "error";
|
|
167
|
+
'@typescript-eslint/promise-function-async': "error";
|
|
168
|
+
'@typescript-eslint/require-array-sort-compare': "error";
|
|
169
|
+
'@typescript-eslint/restrict-plus-operands': "error";
|
|
170
|
+
'@typescript-eslint/restrict-template-expressions': "error";
|
|
171
|
+
'@typescript-eslint/return-await': "error";
|
|
172
|
+
'@typescript-eslint/strict-boolean-expressions': ["error", {
|
|
173
|
+
allowNullableObject: boolean;
|
|
174
|
+
allowNullableString: boolean;
|
|
175
|
+
allowNumber: boolean;
|
|
176
|
+
allowString: boolean;
|
|
177
|
+
}];
|
|
178
|
+
'@typescript-eslint/switch-exhaustiveness-check': ["error", {
|
|
179
|
+
allowDefaultCaseForExhaustiveSwitch: boolean;
|
|
180
|
+
considerDefaultExhaustiveForUnions: boolean;
|
|
181
|
+
requireDefaultForNonUnion: boolean;
|
|
182
|
+
}];
|
|
183
|
+
'@typescript-eslint/triple-slash-reference': "error";
|
|
184
|
+
'@typescript-eslint/unbound-method': "off";
|
|
185
|
+
'@typescript-eslint/unified-signatures': "off";
|
|
186
|
+
'import-x/no-unresolved': "off";
|
|
187
|
+
'jsdoc/no-types': "error";
|
|
188
|
+
'jsdoc/require-param-type': "off";
|
|
189
|
+
'jsdoc/require-returns-type': "off";
|
|
190
|
+
'sonarjs/super-invocation': "off";
|
|
191
|
+
'array-callback-return': "off";
|
|
192
|
+
'consistent-return': "off";
|
|
193
|
+
'default-case': "off";
|
|
194
|
+
'default-param-last': "off";
|
|
195
|
+
'dot-notation': "off";
|
|
196
|
+
'lines-between-class-members': "off";
|
|
197
|
+
'no-array-constructor': "off";
|
|
198
|
+
'no-dupe-class-members': "off";
|
|
199
|
+
'no-duplicate-imports': "off";
|
|
200
|
+
'no-empty-function': "off";
|
|
201
|
+
'no-implied-eval': "off";
|
|
202
|
+
'no-invalid-this': "off";
|
|
203
|
+
'no-loop-func': "off";
|
|
204
|
+
'no-loss-of-precision': "off";
|
|
205
|
+
'no-magic-numbers': "off";
|
|
206
|
+
'no-redeclare': "off";
|
|
207
|
+
'no-restricted-imports': "off";
|
|
208
|
+
'no-restricted-syntax': ["error", string];
|
|
209
|
+
'no-return-await': "off";
|
|
210
|
+
'no-shadow': "off";
|
|
211
|
+
'no-throw-literal': "off";
|
|
212
|
+
'no-unused-expressions': "off";
|
|
213
|
+
'no-unused-vars': "off";
|
|
214
|
+
'no-use-before-define': "off";
|
|
215
|
+
'no-useless-constructor': "off";
|
|
216
|
+
'padding-line-between-statements': "off";
|
|
217
|
+
'import-x/named': "off";
|
|
218
|
+
};
|
|
2
219
|
export default _default;
|
|
3
220
|
export declare const moduleDeclarations: {
|
|
4
221
|
'no-duplicate-imports': "off";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@averay/codeformat",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"author": "Adam Averay (https://adamaveray.com.au/)",
|
|
5
5
|
"homepage": "https://github.com/adamaveray/codeformat",
|
|
6
6
|
"repository": {
|
|
@@ -32,40 +32,41 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@averay/css-properties-sort-order": "^1.0.3",
|
|
35
|
-
"@eslint/js": "^9.
|
|
35
|
+
"@eslint/js": "^9.33.0",
|
|
36
36
|
"@prettier/plugin-php": "^0.24.0",
|
|
37
37
|
"@prettier/plugin-xml": "^3.4.2",
|
|
38
|
-
"@stylistic/eslint-plugin": "^5.2.
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
40
|
-
"@typescript-eslint/parser": "^8.
|
|
41
|
-
"@typescript-eslint/utils": "^8.
|
|
42
|
-
"eslint
|
|
38
|
+
"@stylistic/eslint-plugin": "^5.2.3",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
|
40
|
+
"@typescript-eslint/parser": "^8.39.0",
|
|
41
|
+
"@typescript-eslint/utils": "^8.39.0",
|
|
42
|
+
"eslint": "^9.33.0",
|
|
43
|
+
"eslint-config-prettier": "^10.1.8",
|
|
43
44
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
44
45
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
45
46
|
"eslint-plugin-import-x": "^4.16.1",
|
|
46
|
-
"eslint-plugin-jsdoc": "^
|
|
47
|
+
"eslint-plugin-jsdoc": "^52.0.4",
|
|
47
48
|
"eslint-plugin-promise": "^7.2.1",
|
|
48
|
-
"eslint-plugin-regexp": "^2.
|
|
49
|
+
"eslint-plugin-regexp": "^2.10.0",
|
|
49
50
|
"eslint-plugin-sonarjs": "^3.0.4",
|
|
50
|
-
"eslint-plugin-unicorn": "^
|
|
51
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
51
52
|
"globals": "^16.3.0",
|
|
52
|
-
"knip": "^5.
|
|
53
|
+
"knip": "^5.62.0",
|
|
53
54
|
"postcss-scss": "^4.0.9",
|
|
54
55
|
"prettier": "^3.6.2",
|
|
55
|
-
"stylelint": "^16.
|
|
56
|
-
"stylelint-config-recommended": "^
|
|
57
|
-
"stylelint-config-recommended-scss": "^
|
|
58
|
-
"stylelint-config-standard": "^
|
|
56
|
+
"stylelint": "^16.23.1",
|
|
57
|
+
"stylelint-config-recommended": "^17.0.0",
|
|
58
|
+
"stylelint-config-recommended-scss": "^16.0.0",
|
|
59
|
+
"stylelint-config-standard": "^39.0.0",
|
|
59
60
|
"stylelint-config-standard-scss": "^15.0.1",
|
|
60
61
|
"stylelint-order": "^7.0.0",
|
|
61
62
|
"stylelint-scss": "^6.12.1",
|
|
62
63
|
"stylelint-use-logical": "^2.1.2",
|
|
63
|
-
"typescript-eslint": "^8.
|
|
64
|
+
"typescript-eslint": "^8.39.0"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
67
|
"@types/bun": "latest",
|
|
67
|
-
"bumpp": "^10.2.
|
|
68
|
+
"bumpp": "^10.2.2",
|
|
68
69
|
"husky": "^9.1.7",
|
|
69
|
-
"typescript": "^5.
|
|
70
|
+
"typescript": "^5.9.2"
|
|
70
71
|
}
|
|
71
72
|
}
|