Skip to content

Commit

Permalink
Merge pull request #1763 from rodekruis/dependabot/npm_and_yarn/tests…
Browse files Browse the repository at this point in the history
…/e2e/eslint-9.14.0

chore(deps-dev): bump eslint from 8.57.1 to 9.14.0 in /tests/e2e
  • Loading branch information
jannisvisser authored Nov 5, 2024
2 parents 3579792 + a42842a commit ce807f6
Show file tree
Hide file tree
Showing 7 changed files with 276 additions and 222 deletions.
6 changes: 3 additions & 3 deletions interfaces/IBF-dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 0 additions & 61 deletions tests/e2e/.eslintrc.js

This file was deleted.

76 changes: 76 additions & 0 deletions tests/e2e/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// @ts-check
const globals = require('globals');
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
const eslintPluginSimpleSort = require('eslint-plugin-simple-import-sort');
const typescriptEslintParser = require('@typescript-eslint/parser');
const eslintPluginPrettier = require('eslint-plugin-prettier');

module.exports = tseslint.config(
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features
sourceType: 'script', // Allows for the use of imports
globals: {
...globals.node,
},
},
plugins: {
'simple-import-sort': eslintPluginSimpleSort,
},
extends: [eslintPluginPrettierRecommended],
rules: {},
},
{
files: ['**/*.ts'],
languageOptions: {
ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
globals: {
...globals.node,
},
parser: typescriptEslintParser,
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
},
plugins: {
eslintPluginPrettier,
'simple-import-sort': eslintPluginSimpleSort,
},
extends: [
// eslint.configs.recommended,
tseslint.configs.eslintRecommended,
...tseslint.configs.stylisticTypeChecked,
eslintPluginPrettierRecommended,
],
rules: {
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
caughtErrors: 'none',
},
],
'object-shorthand': 'error',
// There was a promise with using the eslint-plugin-promise package when migrating from .eslintrc.js to eslint.config.js. So switching this off as not actually used.
// 'promise/no-nesting': 'error',
// 'promise/no-callback-in-promise': 'error',
// 'promise/no-multiple-resolved': 'error',
// 'promise/no-promise-in-callback': 'error',
// 'promise/no-return-in-finally': 'error',
// 'promise/prefer-await-to-callbacks': 'error',
// 'promise/prefer-await-to-then': 'error',
// 'promise/valid-params': 'error',
'simple-import-sort/imports': ['error'],
'simple-import-sort/exports': 'error',
'prettier/prettier': ['error', { endOfLine: 'auto' }],
},
},
);
Loading

0 comments on commit ce807f6

Please sign in to comment.