Merged in chore/eslint-curly-braces (pull request #3304)
Chore/eslint curly braces * Add eslint rule for curly braces * run eslint --fix for all files Approved-by: Linus Flood
This commit is contained in:
@@ -2,6 +2,7 @@ import { defineConfig, globalIgnores } from 'eslint/config'
|
||||
import globals from 'globals'
|
||||
import tsParser from '@typescript-eslint/parser'
|
||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
import react from 'eslint-plugin-react'
|
||||
import { FlatCompat } from '@eslint/eslintrc'
|
||||
import js from '@eslint/js'
|
||||
import importPlugin from 'eslint-plugin-import'
|
||||
@@ -35,6 +36,7 @@ export default defineConfig([
|
||||
'react-refresh': reactRefresh,
|
||||
import: importPlugin,
|
||||
formatjs,
|
||||
react,
|
||||
},
|
||||
settings: {
|
||||
// Ensure the plugin can resolve workspace packages and TS path aliases
|
||||
@@ -64,6 +66,14 @@ export default defineConfig([
|
||||
allowConstantExport: true,
|
||||
},
|
||||
],
|
||||
'react/jsx-curly-brace-presence': [
|
||||
'error',
|
||||
{
|
||||
props: 'never',
|
||||
children: 'never',
|
||||
propElementValues: 'always',
|
||||
},
|
||||
],
|
||||
|
||||
'formatjs/enforce-default-message': ['error', 'literal'],
|
||||
'formatjs/enforce-placeholders': ['error'],
|
||||
|
||||
Reference in New Issue
Block a user