2023-02-04 00:36:31 +00:00
|
|
|
module.exports = {
|
2024-01-27 09:51:28 +00:00
|
|
|
extends: ['@invoke-ai/eslint-config-react'],
|
2024-02-01 11:02:11 +00:00
|
|
|
plugins: ['path', 'i18next'],
|
2023-02-04 00:36:31 +00:00
|
|
|
rules: {
|
2024-01-27 09:51:28 +00:00
|
|
|
// TODO(psyche): Enable this rule. Requires no default exports in components - many changes.
|
|
|
|
'react-refresh/only-export-components': 'off',
|
|
|
|
// TODO(psyche): Enable this rule. Requires a lot of eslint-disable-next-line comments.
|
|
|
|
'@typescript-eslint/consistent-type-assertions': 'off',
|
2024-02-01 11:02:11 +00:00
|
|
|
// https://github.com/qdanik/eslint-plugin-path
|
|
|
|
'path/no-relative-imports': ['error', { maxDepth: 0 }],
|
|
|
|
// https://github.com/edvardchen/eslint-plugin-i18next/blob/HEAD/docs/rules/no-literal-string.md
|
2024-02-24 06:45:31 +00:00
|
|
|
'i18next/no-literal-string': 'error',
|
2024-05-13 05:12:43 +00:00
|
|
|
// https://eslint.org/docs/latest/rules/no-console
|
|
|
|
'no-console': 'error',
|
2023-02-04 00:36:31 +00:00
|
|
|
},
|
2024-02-01 11:02:11 +00:00
|
|
|
overrides: [
|
|
|
|
/**
|
|
|
|
* Overrides for stories
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
files: ['*.stories.tsx'],
|
|
|
|
rules: {
|
|
|
|
// We may not have i18n available in stories.
|
|
|
|
'i18next/no-literal-string': 'off',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2023-02-04 00:36:31 +00:00
|
|
|
};
|