An ESLint configuration to help with localizing Sanity Studios.
This ESLint config provides rules to enforce specific code standards in internationalization practices, particularly focusing on strings literals in JSX. It aims to improve code quality and maintainability in projects with internationalization concerns.
Depends on:
pnpm add eslint @sanity/eslint-config-i18n --save-dev
or
npm install eslint @sanity/eslint-config-i18n --save-dev
Update your eslint.config.mjs
to include "@sanity/eslint-config-i18n"
import studio from '@sanity/eslint-config-studio'
+import i18n from '@sanity/eslint-config-i18n'
export default [
...studio,
+ ...i18n,
]
This package is designed to work with ESLint >= 9, which supports/uses the new "flat configuration" format.
If you are using ESLint <= 8, you should install and use @sanity/eslint-config-i18n@1
.
Run "CI & Release" workflow. Make sure to select the main branch and check "Release new version".
Semantic release will only release on configured branches, so it is safe to run release on any branch.