change api to the gateway - add some pkgs - and add eslint
This commit is contained in:
31
eslint.config.mjs
Normal file
31
eslint.config.mjs
Normal 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,
|
||||
];
|
||||
Reference in New Issue
Block a user