change api to the gateway - add some pkgs - and add eslint

This commit is contained in:
2025-01-13 21:50:39 +01:00
parent 000f46d583
commit fdb8284b51
4 changed files with 110 additions and 1 deletions

31
eslint.config.mjs Normal file
View File

@@ -0,0 +1,31 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import pluginReact from 'eslint-plugin-react';
export default [
{
files: ['**/*.{js,mjs,cjs,jsx}'],
rules: {
semi: 0,
'no-unused-vars': 1,
'comma-dangle': [1, {
arrays: 'only-multiline',
objects: 'only-multiline',
imports: 'only-multiline',
exports: 'only-multiline',
functions: 'only-multiline',
}],
yoda: ['error', 'always'],
'operator-linebreak': ['error', 'before'],
indent: ['error', 2, { SwitchCase: 1 }],
'space-before-function-paren': ['error', {
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
}],
},
},
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
pluginReact.configs.flat.recommended,
];