Skip to content

Commit

Permalink
fix: Upgrade packages and fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Raul-Cristian Kele <raulkeleblk@gmail.com>
  • Loading branch information
raulkele committed Dec 25, 2024
1 parent db349c0 commit 75dec9e
Show file tree
Hide file tree
Showing 16 changed files with 10,524 additions and 6,246 deletions.
10 changes: 0 additions & 10 deletions .eslintignore

This file was deleted.

54 changes: 0 additions & 54 deletions .eslintrc.json

This file was deleted.

108 changes: 108 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import react from 'eslint-plugin-react';
import globals from 'globals';
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 [
{
files: ['**/*.js', '**/*.jsx'],
ignores: [
'**/.git',
'**/.svn',
'**/.hg',
'**/node_modules',
'**/.github',
'**/README.md',
'**/LICENSE',
'**/Makefile',
'**/coverage',
'**/build'
]
},
...compat.extends('eslint:recommended', 'plugin:react/recommended', 'plugin:prettier/recommended'),
{
plugins: {
react
},

languageOptions: {
globals: {
...globals.browser,
...globals.jest,
...globals.node
},
ecmaVersion: 'latest',
sourceType: 'module'
},

settings: {
react: {
createClass: 'createReactClass',
pragma: 'React',
fragment: 'Fragment',
version: 'detect',
flowVersion: '0.53'
},

propWrapperFunctions: [
'forbidExtraProps',
{
property: 'freeze',
object: 'Object'
},
{
property: 'myFavoriteWrapper'
},
{
property: 'forbidExtraProps',
exact: true
}
],

componentWrapperFunctions: [
'observer',
{
property: 'styled'
},
{
property: 'observer',
object: 'Mobx'
},
{
property: 'observer',
object: '<pragma>'
}
],

formComponents: [
'CustomForm',
{
name: 'Form',
formAttribute: 'endpoint'
}
],

linkComponents: [
'Hyperlink',
{
name: 'Link',
linkAttribute: 'to'
}
]
},

rules: {
'react/prop-types': 'off'
}
}
];
Loading

0 comments on commit 75dec9e

Please sign in to comment.