@nkzw/eslint-plugin-fbtee 1.7.3 → 1.7.5
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/README.md
CHANGED
|
@@ -699,7 +699,3 @@ _Note: Some legacy behavior and options were removed from `fbtee`. If you have a
|
|
|
699
699
|
- `fbt` was originally created by [Facebook](https://github.com/facebook/fbt).
|
|
700
700
|
- The auto-import plugin was created by [@alexandernanberg](https://github.com/alexandernanberg).
|
|
701
701
|
- [Nakazawa Tech](https://nkzw.tech) rewrote `fbt` into `fbtee` and continues to maintain this project.
|
|
702
|
-
|
|
703
|
-
## Support
|
|
704
|
-
|
|
705
|
-
- Check out the [#fbtee channel on Reactiflux's Discord server](https://discord.gg/reactiflux).
|
package/lib/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as _typescript_eslint_utils_ts_eslint0 from "@typescript-eslint/utils/ts-eslint";
|
|
1
|
+
import * as _$_typescript_eslint_utils_ts_eslint0 from "@typescript-eslint/utils/ts-eslint";
|
|
2
2
|
|
|
3
3
|
//#region src/index.d.ts
|
|
4
4
|
declare const _default: {
|
|
@@ -22,15 +22,15 @@ declare const _default: {
|
|
|
22
22
|
version: string;
|
|
23
23
|
};
|
|
24
24
|
rules: {
|
|
25
|
-
'no-empty-strings': _typescript_eslint_utils_ts_eslint0.RuleModule<"emptyString" | "jsxEmptyString", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener> & {
|
|
25
|
+
'no-empty-strings': _$_typescript_eslint_utils_ts_eslint0.RuleModule<"emptyString" | "jsxEmptyString", [], unknown, _$_typescript_eslint_utils_ts_eslint0.RuleListener> & {
|
|
26
26
|
name: string;
|
|
27
27
|
};
|
|
28
|
-
'no-unhelpful-desc': _typescript_eslint_utils_ts_eslint0.RuleModule<"emptyDesc" | "jsxEmptyDesc" | "duplicateDesc" | "shortDesc", [], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener> & {
|
|
28
|
+
'no-unhelpful-desc': _$_typescript_eslint_utils_ts_eslint0.RuleModule<"emptyDesc" | "jsxEmptyDesc" | "duplicateDesc" | "shortDesc", [], unknown, _$_typescript_eslint_utils_ts_eslint0.RuleListener> & {
|
|
29
29
|
name: string;
|
|
30
30
|
};
|
|
31
|
-
'no-untranslated-strings': _typescript_eslint_utils_ts_eslint0.RuleModule<"unwrappedString", [{
|
|
31
|
+
'no-untranslated-strings': _$_typescript_eslint_utils_ts_eslint0.RuleModule<"unwrappedString", [{
|
|
32
32
|
ignoredWords: Array<string>;
|
|
33
|
-
}], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener> & {
|
|
33
|
+
}], unknown, _$_typescript_eslint_utils_ts_eslint0.RuleListener> & {
|
|
34
34
|
name: string;
|
|
35
35
|
};
|
|
36
36
|
};
|
package/lib/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
2
2
|
//#region package.json
|
|
3
3
|
var name = "@nkzw/eslint-plugin-fbtee";
|
|
4
|
-
var version = "1.7.
|
|
4
|
+
var version = "1.7.4";
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/utils.tsx
|
|
7
7
|
const createRule = ESLintUtils.RuleCreator((name) => `https://github.com/nkzw-tech/fbtee/blob/main/packages/eslint-plugin-fbtee/docs/rules/${name}.md`);
|
|
@@ -230,7 +230,7 @@ const shouldIgnoreParent = (node) => {
|
|
|
230
230
|
};
|
|
231
231
|
var no_untranslated_strings_default = createRule({
|
|
232
232
|
create(context, options) {
|
|
233
|
-
const ignoredWords = new Set(options[0].ignoredWords.map((value) => value.
|
|
233
|
+
const ignoredWords = new Set(options[0].ignoredWords.map((value) => value.toLowerCase()));
|
|
234
234
|
const isIgnoredWord = (value) => ignoredWords.has(value.replaceAll(/\s+/g, " ").toLowerCase());
|
|
235
235
|
return {
|
|
236
236
|
JSXAttribute(node) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nkzw/eslint-plugin-fbtee",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "lib/index.mjs",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@typescript-eslint/utils": "^8.
|
|
18
|
+
"@typescript-eslint/utils": "^8.58.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@typescript-eslint/rule-tester": "^8.
|
|
21
|
+
"@typescript-eslint/rule-tester": "^8.58.2"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "tsdown src/index.tsx -d lib --target=node22 --format=esm --clean --dts"
|
|
@@ -247,6 +247,26 @@ ruleTester.run('no-untranslated-strings', rule, {
|
|
|
247
247
|
},
|
|
248
248
|
],
|
|
249
249
|
},
|
|
250
|
+
{
|
|
251
|
+
code: `
|
|
252
|
+
<input placeholder=" " />
|
|
253
|
+
`,
|
|
254
|
+
options: [
|
|
255
|
+
{
|
|
256
|
+
ignoredWords: [' '],
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
code: `
|
|
262
|
+
<span>{' '}</span>
|
|
263
|
+
`,
|
|
264
|
+
options: [
|
|
265
|
+
{
|
|
266
|
+
ignoredWords: [' '],
|
|
267
|
+
},
|
|
268
|
+
],
|
|
269
|
+
},
|
|
250
270
|
{
|
|
251
271
|
code: `
|
|
252
272
|
<textarea rows={2}></textarea>
|
|
@@ -32,7 +32,7 @@ const shouldIgnoreParent = (node: TSESTree.Node) => {
|
|
|
32
32
|
export default createRule<Options, 'unwrappedString'>({
|
|
33
33
|
create(context, options) {
|
|
34
34
|
const ignoredWords = new Set(
|
|
35
|
-
options[0].ignoredWords.map((value) => value.
|
|
35
|
+
options[0].ignoredWords.map((value) => value.toLowerCase()),
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
const isIgnoredWord = (value: string) =>
|