pasika 0.5.7 → 0.5.9
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/dist/eslint/pasika/index.js +20 -8
- package/package.json +1 -1
|
@@ -123,9 +123,12 @@ function findSimpleRoot(component, _text, _filename) {
|
|
|
123
123
|
ts.forEachChild(node, visit);
|
|
124
124
|
};
|
|
125
125
|
visit(body);
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
|
|
126
|
+
const rendered = returns.filter((statement) => statement.expression?.kind !== ts.SyntaxKind.NullKeyword);
|
|
127
|
+
const roots = rendered.map((statement) => statement.expression && ts.isExpression(statement.expression) ? rootFromExpression(statement.expression) : void 0).filter((root) => root !== void 0);
|
|
128
|
+
if (roots.length !== rendered.length || roots.length === 0) return void 0;
|
|
129
|
+
const firstTag = roots[0]?.tagName;
|
|
130
|
+
if (roots.some((root) => root.tagName !== firstTag)) return void 0;
|
|
131
|
+
return roots[0];
|
|
129
132
|
}
|
|
130
133
|
function getTestId(root) {
|
|
131
134
|
const attribute = root.attributes.find(
|
|
@@ -1861,16 +1864,25 @@ var namedExportsRule = {
|
|
|
1861
1864
|
// eslint/rules/data-testid-case.ts
|
|
1862
1865
|
import path15 from "path";
|
|
1863
1866
|
var NEXT_ROUTING_FILES2 = /* @__PURE__ */ new Set([
|
|
1864
|
-
"
|
|
1867
|
+
"default",
|
|
1868
|
+
"error",
|
|
1869
|
+
"global-error",
|
|
1870
|
+
"instrumentation",
|
|
1865
1871
|
"layout",
|
|
1866
1872
|
"loading",
|
|
1867
|
-
"
|
|
1873
|
+
"middleware",
|
|
1868
1874
|
"not-found",
|
|
1875
|
+
"page",
|
|
1869
1876
|
"route",
|
|
1870
1877
|
"template",
|
|
1871
|
-
|
|
1872
|
-
"
|
|
1873
|
-
"
|
|
1878
|
+
// File conventions Next.js requires to keep their exact names in src/app/
|
|
1879
|
+
"apple-icon",
|
|
1880
|
+
"icon",
|
|
1881
|
+
"manifest",
|
|
1882
|
+
"opengraph-image",
|
|
1883
|
+
"robots",
|
|
1884
|
+
"sitemap",
|
|
1885
|
+
"twitter-image"
|
|
1874
1886
|
]);
|
|
1875
1887
|
var isPascalCase5 = (value) => /^[A-Z][A-Za-z0-9]*$/.test(value);
|
|
1876
1888
|
var isKebabCase3 = (value) => /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(value);
|