mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
6e6d903f99
* eslint added and new string added * strings and translation hook added * more changes made * missing translation added * final errors resolve in progress * all errors resolved * fix(ui): fix missing import of `t()` * fix(ui): use plurals for moving images to board translation * fix(ui): fix typo in translation key * fix(ui): do not use translation for "invoke ai" * chore(ui): lint --------- Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
64 lines
1.4 KiB
JavaScript
64 lines
1.4 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es6: true,
|
|
node: true,
|
|
},
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:react/recommended',
|
|
'plugin:react-hooks/recommended',
|
|
'plugin:react/jsx-runtime',
|
|
'prettier',
|
|
],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
ecmaVersion: 2018,
|
|
sourceType: 'module',
|
|
},
|
|
plugins: [
|
|
'react',
|
|
'@typescript-eslint',
|
|
'eslint-plugin-react-hooks',
|
|
'i18next',
|
|
],
|
|
root: true,
|
|
rules: {
|
|
curly: 'error',
|
|
'i18next/no-literal-string': 2,
|
|
'react/jsx-no-bind': ['error', { allowBind: true }],
|
|
'react/jsx-curly-brace-presence': [
|
|
'error',
|
|
{ props: 'never', children: 'never' },
|
|
],
|
|
'react-hooks/exhaustive-deps': 'error',
|
|
'no-var': 'error',
|
|
'brace-style': 'error',
|
|
'prefer-template': 'error',
|
|
radix: 'error',
|
|
'space-before-blocks': 'error',
|
|
'import/prefer-default-export': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
|
|
],
|
|
'@typescript-eslint/ban-ts-comment': 'warn',
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/no-empty-interface': [
|
|
'error',
|
|
{
|
|
allowSingleExtends: true,
|
|
},
|
|
],
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
};
|