Skip to content

Commit c659478

Browse files
committed
fix: apply correct formatting for FixIt Hints
This commit updates the dependencies to provide better support of FixIt Hints, incl. formatting aligned with the LLVM specifications In addition, we improve the ESLint strictness to avoid unwanted behavior due to type-inconsistencies.
1 parent 6f7d123 commit c659478

19 files changed

+118303
-30102
lines changed

.eslintrc.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

.eslintrc.json.license

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# SPDX-FileCopyrightText: 2023 Kevin de Jong <monkaii@hotmail.com>
2+
# SPDX-License-Identifier: CC0-1.0
3+
---
4+
plugins:
5+
- jest
6+
- "@typescript-eslint"
7+
- import
8+
9+
extends:
10+
- plugin:import/recommended
11+
- plugin:import/typescript
12+
- plugin:@typescript-eslint/recommended
13+
14+
env:
15+
node: true
16+
es2021: true
17+
commonjs: true
18+
jest/globals: true
19+
20+
settings:
21+
import/resolver:
22+
typescript: true
23+
node: true
24+
25+
parser: "@typescript-eslint/parser"
26+
parserOptions:
27+
ecmaVersion: latest
28+
project: "./tsconfig.json"
29+
30+
rules:
31+
i18n-text/no-en: off
32+
eslint-comments/no-use: off
33+
filenames/match-regex: off
34+
import/no-namespace: off
35+
no-console: off
36+
one-var: off
37+
"@typescript-eslint/no-unused-vars":
38+
- error
39+
- argsIgnorePattern: "^_"
40+
varsIgnorePattern: "^_"
41+
caughtErrorsIgnorePattern: "^_"
42+
no-unused-vars: off
43+
"@typescript-eslint/explicit-member-accessibility":
44+
- error
45+
- accessibility: no-public
46+
"@typescript-eslint/no-require-imports": error
47+
"@typescript-eslint/array-type": error
48+
"@typescript-eslint/await-thenable": error
49+
"@typescript-eslint/ban-ts-comment": error
50+
camelcase: off
51+
"@typescript-eslint/consistent-type-assertions": error
52+
"@typescript-eslint/explicit-function-return-type":
53+
- error
54+
- allowExpressions: true
55+
"@typescript-eslint/func-call-spacing": [error, never]
56+
"@typescript-eslint/no-array-constructor": error
57+
"@typescript-eslint/no-empty-interface": error
58+
"@typescript-eslint/no-explicit-any": error
59+
"@typescript-eslint/no-extraneous-class": error
60+
"@typescript-eslint/no-for-in-array": error
61+
"@typescript-eslint/no-inferrable-types": error
62+
"@typescript-eslint/no-misused-new": error
63+
"@typescript-eslint/no-namespace": error
64+
"@typescript-eslint/no-non-null-assertion": warn
65+
"@typescript-eslint/no-unnecessary-qualifier": error
66+
"@typescript-eslint/no-unnecessary-type-assertion": error
67+
"@typescript-eslint/no-useless-constructor": error
68+
"@typescript-eslint/no-var-requires": error
69+
"@typescript-eslint/prefer-for-of": warn
70+
"@typescript-eslint/prefer-function-type": warn
71+
"@typescript-eslint/prefer-includes": error
72+
"@typescript-eslint/prefer-string-starts-ends-with": error
73+
"@typescript-eslint/promise-function-async": error
74+
"@typescript-eslint/require-array-sort-compare": error
75+
"@typescript-eslint/restrict-plus-operands": error
76+
semi: off
77+
"@typescript-eslint/type-annotation-spacing": error
78+
"@typescript-eslint/unbound-method": error
79+
import/order:
80+
- error
81+
- groups:
82+
- builtin
83+
- external
84+
- internal
85+
- parent
86+
- sibling
87+
- index
88+
newlines-between: always
89+
alphabetize:
90+
order: asc
91+
caseInsensitive: true
92+
import/extensions: # see https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/extensions.md
93+
- error
94+
- never
95+
- pattern:
96+
json: ignorePackages

.gitattributes

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-FileCopyrightText: 2023 Kevin de Jong <monkaii@hotmail.com>
22
# SPDX-License-Identifier: CC0-1.0
33

4-
/lib/cli/index.js linguist-generated=true
5-
/lib/action/index.js linguist-generated=true
6-
/lib/precommit/index.js linguist-generated=true
4+
/lib/**/index.js linguist-generated=true
5+
package-lock.json -diff
6+
lib/**/index.js -diff

docs/images/cli_example.svg

Lines changed: 3 additions & 4 deletions
Loading

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SPDX-License-Identifier: CC0-1.0
44
*/
55

66
module.exports = {
7-
transform: { "^.+\\.(t|j)sx?$": "@swc/jest" },
7+
transform: { "^.+\\.(t|j)sx?$": "ts-jest" },
88
testEnvironment: "node",
99
testRegex: "/test/.*\\.(test|spec)?\\.(ts|tsx)$",
1010
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"]

0 commit comments

Comments
 (0)