Как я использую «переопределения» в моем tseslint.config? < /P>
Код: Выделить всё
export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended, importPlugin.flatConfigs.recommended, i18next.configs['flat/recommended']],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
'eslint-plugin-react': eslintPluginReact,
'eslint-plugin-i18next': i18next
},
rules: {
...reactHooks.configs.recommended.rules,
'i18next/no-literal-string': [
"error",
{
framework: 'react',
mode: "jsx-only",
'jsx-attributes': {
include: [],
exclude: ['*'],
},
callees: {
exclude: [
'content: '
],
},
},
],
},
"settings": {
"import/resolver": {
"typescript": true,
"node": true,
},
},
"overrides": [
{
"files": ['**/*.stories.{ts,tsx}'],
"rules": {
'i18next/no-literal-string': "off"
}
}
],
}
)
Подробнее здесь: https://stackoverflow.com/questions/797 ... int-config