Skip to content

Commit

Permalink
fix: move to eslint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisvisser committed Nov 26, 2024
1 parent 0456ab7 commit 20a4808
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 31 deletions.
31 changes: 0 additions & 31 deletions services/API-service/.eslintrc.js

This file was deleted.

47 changes: 47 additions & 0 deletions services/API-service/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// @ts-check
const { FlatCompat } = require('@eslint/eslintrc');
const typescriptEslintParser = require('@typescript-eslint/parser');
const eslintPluginPrettier = require('eslint-plugin-prettier');
const eslintPluginJest = require('eslint-plugin-jest');
const tsEslintPlugin = require('@typescript-eslint/eslint-plugin');

const compat = new FlatCompat({
baseDirectory: __dirname,
});

module.exports = [
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
parser: typescriptEslintParser,
},
plugins: {
'@typescript-eslint': tsEslintPlugin,
prettier: eslintPluginPrettier,
jest: eslintPluginJest,
},
rules: {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
'@typescript-eslint/camelcase': 'off',
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
},
},
...compat.extends('plugin:@typescript-eslint/recommended'),
...compat.extends('plugin:prettier/recommended'),
...compat.extends('plugin:jest/recommended'),
];

0 comments on commit 20a4808

Please sign in to comment.