@salty-css/core 0.0.1-alpha.11 → 0.0.1-alpha.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/core",
3
- "version": "0.0.1-alpha.11",
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
- "eslint": "^9.x",
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
@@ -1,6 +0,0 @@
1
- declare const _default: {
2
- rules: {
3
- 'no-variants-in-base': import("eslint").Rule.RuleModule;
4
- };
5
- };
6
- export default _default;
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
- };
@@ -1,2 +0,0 @@
1
- import { Rule } from 'eslint';
2
- export declare const noVariantsInBase: Rule.RuleModule;