Skip to content

Commit

Permalink
Merge pull request #406 from furality/spr/main/689361d1
Browse files Browse the repository at this point in the history
build(deps): update eslint
  • Loading branch information
ttshivers authored Aug 8, 2024
2 parents 489185f + c844cf3 commit 696e55d
Show file tree
Hide file tree
Showing 7 changed files with 1,082 additions and 1,841 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

76 changes: 0 additions & 76 deletions .eslintrc.js

This file was deleted.

32 changes: 14 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
versioning-strategy: increase
open-pull-requests-limit: 10
commit-message:
prefix: "build(deps)"
prefix-development: "build(deps-dev)"
prefix: 'build(deps)'
prefix-development: 'build(deps-dev)'
groups:
dependencies:
patterns:
- "*"
exclude-patterns:
- eslint
- eslint-plugin-sonarjs
- eslint-plugin-unused-imports
- '*'

- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
open-pull-requests-limit: 10
commit-message:
prefix: "ci(action)"
prefix-development: "ci(dev-action)"
prefix: 'ci(action)'
prefix-development: 'ci(dev-action)'
groups:
dependencies:
patterns:
- "*"
dependencies:
patterns:
- '*'
69 changes: 69 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import eslint from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import sonarjs from 'eslint-plugin-sonarjs';
// @ts-ignore no types for some reason
import unusedImports from 'eslint-plugin-unused-imports';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
// @ts-ignore doesn't like this
eslintPluginPrettierRecommended,
sonarjs.configs.recommended,
{
languageOptions: {
parserOptions: {
projectService: true,
// @ts-ignore incorrectly things node can't handle this
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
'simple-import-sort': simpleImportSort,
'unused-imports': unusedImports,
},
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
eqeqeq: 'error',
'no-lonely-if': 'error',
'no-multi-assign': 'error',
'@typescript-eslint/no-shadow': 'error',
'no-useless-return': 'error',
'no-useless-rename': 'error',
'object-shorthand': 'error',
'one-var-declaration-per-line': 'error',
'prefer-object-spread': 'error',
'no-unreachable-loop': 'error',
'no-template-curly-in-string': 'error',
'default-case-last': 'error',
'no-array-constructor': 'error',
'no-else-return': 'error',
'no-negated-condition': 'error',
'array-callback-return': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/consistent-type-exports': 'error',
curly: 'error',
'no-console': 'error',
quotes: [
'error',
'single',
{
avoidEscape: true,
},
],
'prefer-template': 'error',
'@typescript-eslint/return-await': ['error', 'always'],
'unused-imports/no-unused-imports': 'error',
},
},
);
1 change: 0 additions & 1 deletion lib/http.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class HttpService {
this.put = this.instance.put;
this.post = this.instance.post;
this.patch = this.instance.patch;
// eslint-disable-next-line no-type-assertion/no-type-assertion
this.head = this.instance.head as typeof axios.patch;
this.delete = this.instance.delete;
this.get = this.instance.get;
Expand Down
Loading

0 comments on commit 696e55d

Please sign in to comment.