Skip to content

Commit

Permalink
Merge pull request #204 from commercetools/dependabot/npm_and_yarn/pr…
Browse files Browse the repository at this point in the history
…ocessor/eslint-9.9.1

chore(deps-dev): bump eslint from 8.57.0 to 9.9.1 in /processor
  • Loading branch information
dasanorct authored Sep 16, 2024
2 parents 7b4c535 + 813435c commit f690c1e
Show file tree
Hide file tree
Showing 10 changed files with 378 additions and 2,632 deletions.
37 changes: 0 additions & 37 deletions processor/.eslintrc.json

This file was deleted.

76 changes: 76 additions & 0 deletions processor/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import jest from 'eslint-plugin-jest';
import prettier from 'eslint-plugin-prettier';
import unusedImports from 'eslint-plugin-unused-imports';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
),
{
plugins: {
'@typescript-eslint': typescriptEslint,
jest,
prettier,
'unused-imports': unusedImports,
},
files: ['*.ts'],
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},

parser: tsParser,
},

rules: {
'no-redeclare': ['warn'],
'no-console': ['error'],
'no-unused-vars': 'off',
'no-irregular-whitespace': 'warn',
'unused-imports/no-unused-imports': 'error',

'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],

'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',

'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
},
},
];
Loading

0 comments on commit f690c1e

Please sign in to comment.