eslint-plugin-t
Advanced tools
Comparing version 1.5.1 to 1.6.0
{ | ||
"name": "eslint-plugin-t", | ||
"version": "1.5.1", | ||
"main": "./src/index.js", | ||
"version": "1.6.0", | ||
"main": "./lib/index.js", | ||
"files": [ | ||
"lib" | ||
], | ||
"scripts": { | ||
"format": "prettier --write \"src/**/*.js\"", | ||
"format:check": "prettier --check \"src/**/*.js\"", | ||
"lint": "eslint --max-warnings 0 \"src/**/*.js\"", | ||
"test": "yarn format:check && yarn lint" | ||
"lint": "eslint --max-warnings 0 \"src/**/*.ts\"", | ||
"typecheck": "tsc --noEmit", | ||
"format": "prettier --write src", | ||
"format:lib": "prettier --write lib", | ||
"format:check": "prettier --check src", | ||
"test": "yarn lint && yarn typecheck && yarn format:check", | ||
"clean": "rm -rf lib", | ||
"build": "yarn clean && rollup -c && yarn format:lib", | ||
"prepublishOnly": "yarn build" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "^8.3.2", | ||
"@types/eslint": "^8.4.2", | ||
"eslint": "^8.17.0", | ||
"eslint-config-xt": "^1.5.0", | ||
"prettier": "^2.6.2", | ||
"rollup": "^2.75.5", | ||
"typescript": "^4.7.3" | ||
}, | ||
"eslintConfig": { | ||
"extends": "xt", | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": 0 | ||
} | ||
"extends": "xt" | ||
}, | ||
@@ -24,0 +32,0 @@ "prettier": { |
@@ -29,7 +29,7 @@ # eslint-plugin-t | ||
Currently there's only one rule. | ||
There's currently just one lint rule in this package. | ||
**string-literal** | ||
Ensures that only a string literal can be passed as the first argument to `t()`. | ||
This rule enforces that the first argument to `t()` is a string literal. This is useful if you intend to [statically extract](https://www.i18next.com/overview/plugins-and-utils#extraction-tools) language strings because static tooling [can't evaluate expressions](https://github.com/i18next/i18next-parser#caveats). | ||
@@ -43,3 +43,3 @@ Example: | ||
// Incorrect usage (raises lint warning) | ||
alert(t('Hello' + name + '!')); | ||
alert(t('Hello ' + Math.random().toString())); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3886
7
3
70