Skip to content

Commit 696e55d

Browse files
authored
Merge pull request #406 from furality/spr/main/689361d1
build(deps): update eslint
2 parents 489185f + c844cf3 commit 696e55d

File tree

7 files changed

+1082
-1841
lines changed

7 files changed

+1082
-1841
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.js

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

.github/dependabot.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "npm"
4-
directory: "/"
3+
- package-ecosystem: 'npm'
4+
directory: '/'
55
schedule:
6-
interval: "daily"
6+
interval: 'daily'
77
versioning-strategy: increase
88
open-pull-requests-limit: 10
99
commit-message:
10-
prefix: "build(deps)"
11-
prefix-development: "build(deps-dev)"
10+
prefix: 'build(deps)'
11+
prefix-development: 'build(deps-dev)'
1212
groups:
1313
dependencies:
1414
patterns:
15-
- "*"
16-
exclude-patterns:
17-
- eslint
18-
- eslint-plugin-sonarjs
19-
- eslint-plugin-unused-imports
15+
- '*'
2016

21-
- package-ecosystem: "github-actions"
22-
directory: "/"
17+
- package-ecosystem: 'github-actions'
18+
directory: '/'
2319
schedule:
24-
interval: "daily"
20+
interval: 'daily'
2521
open-pull-requests-limit: 10
2622
commit-message:
27-
prefix: "ci(action)"
28-
prefix-development: "ci(dev-action)"
23+
prefix: 'ci(action)'
24+
prefix-development: 'ci(dev-action)'
2925
groups:
30-
dependencies:
31-
patterns:
32-
- "*"
26+
dependencies:
27+
patterns:
28+
- '*'

eslint.config.mjs

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import eslint from '@eslint/js';
2+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
3+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
4+
import sonarjs from 'eslint-plugin-sonarjs';
5+
// @ts-ignore no types for some reason
6+
import unusedImports from 'eslint-plugin-unused-imports';
7+
import tseslint from 'typescript-eslint';
8+
9+
export default tseslint.config(
10+
eslint.configs.recommended,
11+
...tseslint.configs.strictTypeChecked,
12+
...tseslint.configs.stylisticTypeChecked,
13+
// @ts-ignore doesn't like this
14+
eslintPluginPrettierRecommended,
15+
sonarjs.configs.recommended,
16+
{
17+
languageOptions: {
18+
parserOptions: {
19+
projectService: true,
20+
// @ts-ignore incorrectly things node can't handle this
21+
tsconfigRootDir: import.meta.dirname,
22+
},
23+
},
24+
plugins: {
25+
'simple-import-sort': simpleImportSort,
26+
'unused-imports': unusedImports,
27+
},
28+
rules: {
29+
'simple-import-sort/imports': 'error',
30+
'simple-import-sort/exports': 'error',
31+
eqeqeq: 'error',
32+
'no-lonely-if': 'error',
33+
'no-multi-assign': 'error',
34+
'@typescript-eslint/no-shadow': 'error',
35+
'no-useless-return': 'error',
36+
'no-useless-rename': 'error',
37+
'object-shorthand': 'error',
38+
'one-var-declaration-per-line': 'error',
39+
'prefer-object-spread': 'error',
40+
'no-unreachable-loop': 'error',
41+
'no-template-curly-in-string': 'error',
42+
'default-case-last': 'error',
43+
'no-array-constructor': 'error',
44+
'no-else-return': 'error',
45+
'no-negated-condition': 'error',
46+
'array-callback-return': 'error',
47+
'@typescript-eslint/consistent-type-definitions': 'error',
48+
'@typescript-eslint/ban-ts-comment': 'error',
49+
'@typescript-eslint/no-unnecessary-condition': 'error',
50+
'@typescript-eslint/no-extraneous-class': 'off',
51+
'@typescript-eslint/prefer-nullish-coalescing': 'error',
52+
'@typescript-eslint/no-import-type-side-effects': 'error',
53+
'@typescript-eslint/consistent-type-imports': 'error',
54+
'@typescript-eslint/consistent-type-exports': 'error',
55+
curly: 'error',
56+
'no-console': 'error',
57+
quotes: [
58+
'error',
59+
'single',
60+
{
61+
avoidEscape: true,
62+
},
63+
],
64+
'prefer-template': 'error',
65+
'@typescript-eslint/return-await': ['error', 'always'],
66+
'unused-imports/no-unused-imports': 'error',
67+
},
68+
},
69+
);

lib/http.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export class HttpService {
2222
this.put = this.instance.put;
2323
this.post = this.instance.post;
2424
this.patch = this.instance.patch;
25-
// eslint-disable-next-line no-type-assertion/no-type-assertion
2625
this.head = this.instance.head as typeof axios.patch;
2726
this.delete = this.instance.delete;
2827
this.get = this.instance.get;

0 commit comments

Comments
 (0)