Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest dependency versions #1751

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 0 additions & 77 deletions .eslintrc.js

This file was deleted.

111 changes: 111 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import reactPlugin from 'eslint-plugin-react';
import importPlugin from 'eslint-plugin-import';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import reactRefreshPlugin from 'eslint-plugin-react-refresh';
import stylisticPlugin from '@stylistic/eslint-plugin'

import tsEslint from 'typescript-eslint';
import eslint from '@eslint/js';
import globals from 'globals';

import eslintTerrestris from '@terrestris/eslint-config-typescript';

export default tsEslint.config({
extends: [
eslint.configs.recommended,
...tsEslint.configs.recommended,
...tsEslint.configs.stylistic,
importPlugin.flatConfigs.recommended
],
files: [
'src/**/*.{js,mjs,cjs,ts,jsx,tsx}'
],
plugins: {
react: reactPlugin,
'@stylistic': stylisticPlugin,
'react-hooks': reactHooksPlugin,
'react-refresh': reactRefreshPlugin
},
languageOptions: {
globals: globals.browser,
ecmaVersion: 'latest',
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname
}
},
rules: {
...eslintTerrestris.rules,
...reactHooksPlugin.configs.recommended.rules,
'max-len': [
'warn',
{
'code': 160
}
],

'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',

'no-unused-vars': 'warn',
'arrow-spacing': 'warn',
'comma-spacing': 'warn',
'comma-dangle': 'warn',
'eol-last': 'warn',
'no-multi-spaces': 'warn',
'no-multiple-empty-lines': ['warn', {
max: 1
}],
'object-property-newline': 'warn',
'object-curly-newline': ['warn', {
consistent: true,
minProperties: 2
}],
'space-before-function-paren': ['warn', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always'
}],

'react/jsx-max-props-per-line': ['warn', {
maximum: 1
}],
'react/jsx-closing-tag-location': ['warn'],
'react/jsx-closing-bracket-location': ['warn'],

'import/no-unresolved': 'off',
'import/named': 'off',
'import/order': ['warn', {
groups: [
'builtin',
'external',
'parent',
'sibling',
'index',
'object'
],
'pathGroups': [{
pattern: 'react',
group: 'external',
position: 'before'
}, {
pattern: '@terrestris/**',
group: 'external',
position: 'after'
}],
'pathGroupsExcludedImportTypes': ['react'],
'newlines-between': 'always-and-inside-groups',
'alphabetize': {
order: 'asc',
caseInsensitive: true
}
}]
},
settings: {
react: {
version: 'detect'
}
}
});
9 changes: 9 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
import '@testing-library/jest-dom';
import {
TextDecoder,
TextEncoder
} from 'util';

Object.assign(global, {
TextDecoder,
TextEncoder
});
Loading
Loading