Skip to content

Commit

Permalink
feat(eslint-plugin-experience): add i18n plugin (#649)
Browse files Browse the repository at this point in the history
* feat(eslint-plugin-experience): add i18n plugin

* chore: apply changes after linting [bot]

---------

Co-authored-by: taiga-family-bot <[email protected]>
  • Loading branch information
splincode and taiga-family-bot authored Oct 11, 2024
1 parent c29c871 commit 65bc5a1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions projects/eslint-plugin-experience/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ module.exports = {
'@stylistic/ts',
'@stylistic/plus',
'@angular-eslint/eslint-plugin',
'i18n',
],
extends: [
'eslint-config-airbnb-base',
Expand Down Expand Up @@ -616,6 +617,12 @@ module.exports = {
},
],
'guard-for-in': 'error',
'i18n/no-chinese-character': 'error',
'i18n/no-greek-character': 'error',
'i18n/no-japanese-character': 'error',
'i18n/no-korean-character': 'error',
'i18n/no-russian-character': 'error',
'i18n/no-thai-character': 'error',
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'import/first': 'error',
'import/newline-after-import': ['error', {count: 1}],
Expand Down Expand Up @@ -911,6 +918,17 @@ module.exports = {
'no-implicit-globals': 'error',
},
},
{
files: ['**/i18n/**/*.*', '*.spec.ts', '*.cy.ts'],
rules: {
'i18n/no-chinese-character': 'off',
'i18n/no-greek-character': 'off',
'i18n/no-japanese-character': 'off',
'i18n/no-korean-character': 'off',
'i18n/no-russian-character': 'off',
'i18n/no-thai-character': 'off',
},
},
{
files: ['*.spec.ts'],
parser: '@typescript-eslint/parser',
Expand Down
1 change: 1 addition & 0 deletions projects/eslint-plugin-experience/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslint-plugin-decorator-position": "^5.0.2",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-file-progress": "^1.5.0",
"eslint-plugin-i18n": "2.3.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-node-import": "^1.0.4",
Expand Down

0 comments on commit 65bc5a1

Please sign in to comment.