mirror of
https://github.com/mue/mue.git
synced 2026-06-05 23:45:53 +02:00
Refactor state updates for consistency and readability across components
- Simplified state updates in Background, Favourite, PhotoInformation, GreetingOptions, Added, Browse, About, Overview, Navbar, Apps, Notes, QuickLinksOptions, Quote, and QuoteOptions components by consolidating multiple lines into single line updates. - Improved readability by reducing unnecessary line breaks and maintaining consistent formatting in JSX elements. - Enhanced maintainability by ensuring uniformity in how state is set and how JSX is structured.
This commit is contained in:
@@ -24,11 +24,7 @@ export default [
|
||||
languageOptions: {
|
||||
ecmaVersion: 2024,
|
||||
sourceType: 'module',
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
parserOptions: { ecmaFeatures: { jsx: true } },
|
||||
globals: {
|
||||
// Browser globals
|
||||
window: 'readonly',
|
||||
@@ -60,16 +56,8 @@ export default [
|
||||
require: 'readonly',
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
react,
|
||||
'react-hooks': reactHooks,
|
||||
'jsx-a11y': jsxA11y,
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
},
|
||||
plugins: { react, 'react-hooks': reactHooks, 'jsx-a11y': jsxA11y },
|
||||
settings: { react: { version: 'detect' } },
|
||||
rules: {
|
||||
...js.configs.recommended.rules,
|
||||
...react.configs.recommended.rules,
|
||||
@@ -84,7 +72,7 @@ export default [
|
||||
// General rules
|
||||
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
||||
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
||||
|
||||
|
||||
// Modern JS
|
||||
'prefer-const': 'warn',
|
||||
'no-var': 'error',
|
||||
|
||||
Reference in New Issue
Block a user