@salty-css/core 0.0.1-alpha.11 → 0.0.1-alpha.13
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +3 -4
- package/eslint/index.cjs +0 -1
- package/eslint/index.d.ts +0 -6
- package/eslint/index.js +0 -48
- package/eslint/rules/no-variants-in-base.d.ts +0 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salty-css/core",
|
3
|
-
"version": "0.0.1-alpha.
|
3
|
+
"version": "0.0.1-alpha.13",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"typings": "./dist/index.d.ts",
|
@@ -23,9 +23,8 @@
|
|
23
23
|
"name": "core"
|
24
24
|
},
|
25
25
|
"peerDependencies": {
|
26
|
-
"esbuild": "0.21.x",
|
27
|
-
"
|
28
|
-
"react": "^18.x",
|
26
|
+
"esbuild": ">=0.21.x",
|
27
|
+
"react": ">=18.x || >=19.x",
|
29
28
|
"winston": ">=3.x"
|
30
29
|
},
|
31
30
|
"exports": {
|
package/eslint/index.cjs
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";const l=require("../compiler/index.cjs"),c={meta:{type:"problem",docs:{description:"Ensure `variants` are not nested inside `base` in styled calls",category:"Errors",recommended:!0},messages:{nestedVariants:"`variants` should not be nested inside `base`."}},create(r){return l.isSaltyFile(r.filename)?{CallExpression:o=>{try{const{callee:s,arguments:d}=o;if(!(s.type==="Identifier"&&s.name==="styled"))return;const t=d[0];if(!t||!(t.type==="ObjectExpression"))return;const n=t.properties.find(e=>e.type==="Property"&&e.key.type==="Identifier"&&e.key.name==="base");if(!n)return;const{value:a}=n;if(!(a.type==="ObjectExpression"))return;const i=a.properties.find(e=>e.type==="Property"&&e.key.type==="Identifier"&&e.key.name==="variants");if(!i)return;r.report({node:i,messageId:"nestedVariants"})}catch(s){console.log("ESlint error",s);return}}}:{}}},y={rules:{"no-variants-in-base":c}};module.exports=y;
|
package/eslint/index.d.ts
DELETED
package/eslint/index.js
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
import { isSaltyFile as l } from "../compiler/index.js";
|
2
|
-
const y = {
|
3
|
-
meta: {
|
4
|
-
type: "problem",
|
5
|
-
docs: {
|
6
|
-
description: "Ensure `variants` are not nested inside `base` in styled calls",
|
7
|
-
category: "Errors",
|
8
|
-
recommended: !0
|
9
|
-
},
|
10
|
-
messages: {
|
11
|
-
nestedVariants: "`variants` should not be nested inside `base`."
|
12
|
-
}
|
13
|
-
},
|
14
|
-
create(r) {
|
15
|
-
return l(r.filename) ? {
|
16
|
-
CallExpression: (o) => {
|
17
|
-
try {
|
18
|
-
const { callee: s, arguments: d } = o;
|
19
|
-
if (!(s.type === "Identifier" && s.name === "styled")) return;
|
20
|
-
const t = d[0];
|
21
|
-
if (!t || !(t.type === "ObjectExpression")) return;
|
22
|
-
const n = t.properties.find((e) => e.type === "Property" && e.key.type === "Identifier" && e.key.name === "base");
|
23
|
-
if (!n) return;
|
24
|
-
const { value: a } = n;
|
25
|
-
if (!(a.type === "ObjectExpression")) return;
|
26
|
-
const i = a.properties.find(
|
27
|
-
(e) => e.type === "Property" && e.key.type === "Identifier" && e.key.name === "variants"
|
28
|
-
);
|
29
|
-
if (!i) return;
|
30
|
-
r.report({
|
31
|
-
node: i,
|
32
|
-
messageId: "nestedVariants"
|
33
|
-
});
|
34
|
-
} catch (s) {
|
35
|
-
console.log("ESlint error", s);
|
36
|
-
return;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
} : {};
|
40
|
-
}
|
41
|
-
}, b = {
|
42
|
-
rules: {
|
43
|
-
"no-variants-in-base": y
|
44
|
-
}
|
45
|
-
};
|
46
|
-
export {
|
47
|
-
b as default
|
48
|
-
};
|