react-i18next 17.0.13 → 17.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.json DELETED
@@ -1,74 +0,0 @@
1
- {
2
- "extends": ["airbnb", "prettier"],
3
- "parser": "@babel/eslint-parser",
4
- "parserOptions": {
5
- "ecmaVersion": 8,
6
- "ecmaFeatures": {
7
- "experimentalObjectRestSpread": true,
8
- "impliedStrict": true,
9
- "classes": true
10
- }
11
- },
12
- "env": {
13
- "browser": true,
14
- "node": true
15
- },
16
- "reportUnusedDisableDirectives": true,
17
- "rules": {
18
- "no-debugger": 0,
19
- "no-alert": 0,
20
- "no-unused-vars": [1, { "argsIgnorePattern": "res|next|^err" }],
21
- "prefer-arrow-callback": ["error", { "allowNamedFunctions": true }],
22
- "prefer-const": ["error", { "destructuring": "all" }],
23
- "arrow-body-style": [2, "as-needed"],
24
- "no-unused-expressions": [2, { "allowTaggedTemplates": true }],
25
- "no-param-reassign": [2, { "props": false }],
26
- "no-console": 0,
27
- "no-use-before-define": 0,
28
- "no-nested-ternary": 0,
29
- "import/prefer-default-export": 0,
30
- "import/no-extraneous-dependencies": 1,
31
- "import/no-named-as-default-member": 1,
32
- "import": 0,
33
- "func-names": 0,
34
- "space-before-function-paren": 0,
35
- "comma-dangle": 0,
36
- "max-len": 0,
37
- "import/extensions": 0,
38
- "no-underscore-dangle": 0,
39
- "consistent-return": 0,
40
- "react/display-name": 1,
41
- "react/no-array-index-key": 0,
42
- "react/jsx-no-useless-fragment": ["error", { "allowExpressions": true }],
43
- "react/react-in-jsx-scope": 0,
44
- "react/prefer-stateless-function": 0,
45
- "react/forbid-prop-types": 0,
46
- "react/no-unescaped-entities": 0,
47
- "react/prop-types": 0,
48
- "jsx-a11y/accessible-emoji": 0,
49
- "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
50
- "react/no-unknown-property": ["error", { "ignore": ["i18nIsDynamicList"] }],
51
- "radix": 0,
52
- "no-shadow": [
53
- 2,
54
- { "hoist": "all", "allow": ["resolve", "reject", "done", "next", "err", "error"] }
55
- ],
56
- "quotes": [2, "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
57
- "jsx-a11y/href-no-hash": "off",
58
- "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }],
59
- "react/jsx-props-no-spreading": 0
60
- },
61
- "overrides": [
62
- {
63
- "files": ["test/*"],
64
- "extends": ["plugin:testing-library/react", "plugin:jest-dom/recommended"],
65
- "globals": {
66
- "globalThis": false
67
- },
68
- "rules": {
69
- "testing-library/no-node-access": ["error", { "allowContainerFirstChild": true }],
70
- "testing-library/no-manual-cleanup": "off"
71
- }
72
- }
73
- ]
74
- }
package/.husky/pre-commit DELETED
@@ -1 +0,0 @@
1
- npm exec lint-staged
package/.prettierignore DELETED
@@ -1,4 +0,0 @@
1
- **/dist/
2
- **/react-i18next.js
3
- **/react-i18next.min.js
4
- **/example/
@@ -1,4 +0,0 @@
1
- export default {
2
- '!*.?(c|m){js,ts}?(x)': ['prettier --write --ignore-unknown'],
3
- '*.?(c|m){js,ts}?(x)': ['prettier --write --ignore-unknown', 'eslint --cache --fix --env-info'],
4
- };
@@ -1,54 +0,0 @@
1
- import { readdirSync } from 'node:fs';
2
- import { defineConfig, defineProject } from 'vitest/config';
3
-
4
- export default defineConfig({
5
- test: {
6
- projects: readdirSync('./test/typescript', { withFileTypes: true })
7
- .filter((dir) => dir.isDirectory())
8
- // Exclude issue-1899 - it runs separately via test:typescript:issue-1899
9
- // because it requires skipLibCheck: false which exposes @types/node errors
10
- .filter((dir) => dir.name !== 'issue-1899')
11
- .reduce<ReturnType<typeof defineProject>[]>((workspaces, dir) => {
12
- const dirPath = `test/typescript/${dir.name}` as const;
13
-
14
- const tsConfigFiles = readdirSync(dirPath).filter(
15
- // Do not include temporary vitest tsconfig files
16
- (it) => it.startsWith('tsconfig.') && it.endsWith('.json') && !it.includes('vitest-temp'),
17
- );
18
-
19
- tsConfigFiles.forEach((tsConfigFileName) => {
20
- const workspaceName =
21
- tsConfigFileName === 'tsconfig.json'
22
- ? `typescript-${dir.name}`
23
- : `${dir.name}-${tsConfigFileName.split('.')[1]}`;
24
-
25
- workspaces.push(
26
- defineProject({
27
- test: {
28
- name: workspaceName,
29
- alias: {
30
- /**
31
- * Imports are resolved even if we are running only typecheck tests.
32
- * This will result in:
33
- * ```text
34
- * Error: Failed to resolve entry for package "react-i18next". The package may have incorrect main/module/exports specified in its package.json.
35
- * ```
36
- * To avoid a useless build process before running these tests a stub alias to `react-i18next` is added.
37
- */
38
- 'react-i18next': './test/typescript/_stub.js',
39
- },
40
- typecheck: {
41
- enabled: true,
42
- only: true,
43
- include: [`./${dirPath}/*.test.{ts,tsx}`],
44
- tsconfig: `./${dirPath}/${tsConfigFileName}`,
45
- },
46
- },
47
- }),
48
- );
49
- });
50
-
51
- return workspaces;
52
- }, []),
53
- },
54
- });