A selection of code quality configs intended for use in Invoke's applications.
- eslint-config-react An
eslint
config package. - prettier-config-react A
prettier
config package. - ruff.toml A
ruff
config template. - pyrightconfig.json A
pyright
config template.
The templates must be copied and pasted.
Be sure to install the peer dependencies.
You may need to add auto-install-peers=true
to your .npmrc
for this to happen automatically.
-
Install the package.
pnpm i -D @invoke-ai/eslint-config-react
-
Extend the config in your
eslint
config. You can then override any rules per usual.// .eslintrc.cjs module.exports = { extends: ['@invoke-ai/eslint-config-react'], rules: { 'i18next/no-literal-string': 'off', // no i18n here }, };
-
Install the package.
pnpm i -D @invoke-ai/prettier-config-react
-
Spread the config in your
prettier
config. You can then override any individual rules by specifying them after the spread.// .prettierrc.cjs module.exports = { ...require('@invoke-ai/prettier-config-react'), printWidth: 9001, // slightly increase printWidth };