@plumeria/eslint-plugin 0.1.1 → 0.2.0
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.
|
@@ -42,7 +42,6 @@ module.exports = {
|
|
|
42
42
|
},
|
|
43
43
|
CallExpression(node) {
|
|
44
44
|
if (functionDepth > 0) {
|
|
45
|
-
// メンバー式(MemberExpression)の場合の処理
|
|
46
45
|
if (node.callee.type === 'MemberExpression') {
|
|
47
46
|
const objectName = node.callee.object.name;
|
|
48
47
|
const propertyName = node.callee.property.name;
|
|
@@ -53,7 +52,8 @@ module.exports = {
|
|
|
53
52
|
propertyName === 'create' ||
|
|
54
53
|
propertyName === 'global' ||
|
|
55
54
|
propertyName === 'keyframes' ||
|
|
56
|
-
propertyName === '
|
|
55
|
+
propertyName === 'defineVars' ||
|
|
56
|
+
propertyName === 'defineTheme'
|
|
57
57
|
) {
|
|
58
58
|
context.report({
|
|
59
59
|
node,
|
|
@@ -39,14 +39,11 @@ module.exports = {
|
|
|
39
39
|
const referencedKeys = new Set();
|
|
40
40
|
|
|
41
41
|
return {
|
|
42
|
-
// Filter out `css.global` and find objects in functions
|
|
43
42
|
CallExpression(node) {
|
|
44
43
|
if (
|
|
45
44
|
node.callee.type === 'MemberExpression' &&
|
|
46
45
|
node.callee.object.name === 'css' &&
|
|
47
|
-
node.callee.property.name
|
|
48
|
-
node.callee.property.name !== 'defineThemeVars' &&
|
|
49
|
-
node.callee.property.name !== 'keyframes'
|
|
46
|
+
node.callee.property.name === 'create'
|
|
50
47
|
) {
|
|
51
48
|
const arg = node.arguments[0];
|
|
52
49
|
if (
|
|
@@ -71,7 +68,6 @@ module.exports = {
|
|
|
71
68
|
}
|
|
72
69
|
}
|
|
73
70
|
},
|
|
74
|
-
// `styles.header_main` の参照を記録
|
|
75
71
|
MemberExpression(node) {
|
|
76
72
|
if (
|
|
77
73
|
node.object.type === 'Identifier' &&
|
|
@@ -80,7 +76,6 @@ module.exports = {
|
|
|
80
76
|
const fullKey = `${node.object.name}.${node.property.name}`;
|
|
81
77
|
referencedKeys.add(fullKey);
|
|
82
78
|
|
|
83
|
-
// TypeScript の型情報を取得し、ジャンプ可能かチェック
|
|
84
79
|
if (parserServices && checker) {
|
|
85
80
|
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
|
|
86
81
|
const symbol = checker.getSymbolAtLocation(tsNode);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Zero-runtime CSS in JS - Compile at build-time. No runtime overhead.",
|
|
5
5
|
"repository": "github:zss-in-js/plumeria",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|