Skip to content

Commit

Permalink
chore(i18n): add the i18next/no-literal-string eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpetty committed Oct 16, 2023
1 parent 49cbdc6 commit 5422e0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const baseConfig = {
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['import', '@typescript-eslint', 'prettier', 'react', 'tsdoc'],
plugins: ['import', '@typescript-eslint', 'prettier', 'react', 'tsdoc','i18next'],
rules: {
'@typescript-eslint/no-var-requires': 'off', // prefer import/no-dynamic-require
'import/extensions': ['error', {pattern: {cjs: 'always', json: 'always'}}],
Expand All @@ -32,6 +32,7 @@ const baseConfig = {
additionalHooks: '(useMemoObservable|useObservableCallback|useAsync)',
},
],
'i18next/no-literal-string': 2,
},
settings: {
'import/extensions': ['.cjs', '.mjs', '.js', '.jsx', '.ts', '.tsx'],
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,8 @@
"node-notifier": "^10.0.0"
},
"packageManager": "[email protected]",
"isSanityMonorepo": true
"isSanityMonorepo": true,
"dependencies": {
"eslint-plugin-i18next": "^6.0.3"
}
}

0 comments on commit 5422e0e

Please sign in to comment.