eslint-plugin-lube 0.2.4 → 0.3.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.
- package/README.md +4 -4
- package/docs/pretty-imports.md +73 -0
- package/docs/pretty-jsdoc-casting.md +24 -0
- package/docs/svelte-naming-convention.md +48 -0
- package/index.js +5 -3
- package/package.json +26 -26
- package/private.d.ts +43 -22
- package/rules/pretty-imports.js +41 -29
- package/rules/pretty-jsdoc-casting.js +215 -0
- package/rules/svelte-naming-convention.js +169 -205
- package/test/pretty-imports/{check_exports.js → ExportNamedDeclaration.js} +4 -4
- package/test/pretty-imports/{check_imports.js → ImportDeclaration.js} +4 -4
- package/test/pretty-imports.js +2 -2
- package/test/pretty-jsdoc-casting/case_by_expression.js +240 -0
- package/test/pretty-jsdoc-casting/nested_casting.js +96 -0
- package/test/pretty-jsdoc-casting.js +19 -0
- package/test/svelte-naming-convention/basic_snake_case.js +0 -7
- package/test/svelte-naming-convention/case_by_identifier.js +0 -137
- package/test/svelte-naming-convention/snake_case_with_symbols.js +0 -8
- package/node-type.text +0 -71
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
const error = {
|
|
2
|
-
messageId: "not_match",
|
|
3
|
-
type: "Identifier"
|
|
4
|
-
}
|
|
5
1
|
/**
|
|
6
2
|
* @param {import("eslint").RuleTester.ValidTestCase[]} valid
|
|
7
3
|
* @param {import("eslint").RuleTester.InvalidTestCase[]} invalid
|
|
@@ -21,7 +17,6 @@ exports.module = (valid, invalid) => {
|
|
|
21
17
|
{
|
|
22
18
|
code: "var __camelCase$$ = 'Hello'",
|
|
23
19
|
errors: [{
|
|
24
|
-
...error,
|
|
25
20
|
line: 1,
|
|
26
21
|
column: 5
|
|
27
22
|
}],
|
|
@@ -30,7 +25,6 @@ exports.module = (valid, invalid) => {
|
|
|
30
25
|
{
|
|
31
26
|
code: "var ___ = 'Hello'",
|
|
32
27
|
errors: [{
|
|
33
|
-
...error,
|
|
34
28
|
line: 1,
|
|
35
29
|
column: 5
|
|
36
30
|
}],
|
|
@@ -39,7 +33,6 @@ exports.module = (valid, invalid) => {
|
|
|
39
33
|
{
|
|
40
34
|
code: "var $$$ = 'Hello'",
|
|
41
35
|
errors: [{
|
|
42
|
-
...error,
|
|
43
36
|
line: 1,
|
|
44
37
|
column: 5
|
|
45
38
|
}],
|
|
@@ -48,7 +41,6 @@ exports.module = (valid, invalid) => {
|
|
|
48
41
|
{
|
|
49
42
|
code: "var $snake$case$ = 'Hello'",
|
|
50
43
|
errors: [{
|
|
51
|
-
...error,
|
|
52
44
|
line: 1,
|
|
53
45
|
column: 5
|
|
54
46
|
}],
|
package/node-type.text
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/* ArrayExpression */
|
|
2
|
-
/* ArrayPattern */
|
|
3
|
-
/* ArrowFunctionExpression */
|
|
4
|
-
/* AssignmentExpression */
|
|
5
|
-
/* AssignmentPattern */
|
|
6
|
-
/* AwaitExpression */
|
|
7
|
-
/* BinaryExpression */
|
|
8
|
-
/* BlockStatement */
|
|
9
|
-
/* BreakStatement */
|
|
10
|
-
/* CallExpression */
|
|
11
|
-
/* CatchClause */
|
|
12
|
-
/* ChainExpression */
|
|
13
|
-
/* ClassBody */
|
|
14
|
-
/* ClassDeclaration */
|
|
15
|
-
/* ClassExpression */
|
|
16
|
-
/* ConditionalExpression */
|
|
17
|
-
/* ContinueStatement */
|
|
18
|
-
/* DebuggerStatement */
|
|
19
|
-
/* DoWhileStatement */
|
|
20
|
-
/* EmptyStatement */
|
|
21
|
-
/* ExportAllDeclaration */
|
|
22
|
-
/* ExportDefaultDeclaration */
|
|
23
|
-
/* ExportNamedDeclaration */
|
|
24
|
-
/* ExportSpecifier */
|
|
25
|
-
/* ExpressionStatement */
|
|
26
|
-
/* ForInStatement */
|
|
27
|
-
/* ForOfStatement */
|
|
28
|
-
/* ForStatement */
|
|
29
|
-
/* FunctionDeclaration */
|
|
30
|
-
/* FunctionExpression */
|
|
31
|
-
/* Identifier */
|
|
32
|
-
/* IfStatement */
|
|
33
|
-
/* ImportDeclaration */
|
|
34
|
-
/* ImportDefaultSpecifier */
|
|
35
|
-
/* ImportExpression */
|
|
36
|
-
/* ImportNamespaceSpecifier */
|
|
37
|
-
/* ImportSpecifier */
|
|
38
|
-
/* LabeledStatement */
|
|
39
|
-
/* Literal */
|
|
40
|
-
/* LogicalExpression */
|
|
41
|
-
/* MemberExpression */
|
|
42
|
-
/* MetaProperty */
|
|
43
|
-
/* MethodDefinition */
|
|
44
|
-
/* NewExpression */
|
|
45
|
-
/* ObjectExpression */
|
|
46
|
-
/* ObjectPattern */
|
|
47
|
-
/* PrivateIdentifier */
|
|
48
|
-
/* Program */
|
|
49
|
-
/* Property */
|
|
50
|
-
/* PropertyDefinition */
|
|
51
|
-
/* RestElement */
|
|
52
|
-
/* ReturnStatement */
|
|
53
|
-
/* SequenceExpression */
|
|
54
|
-
/* SpreadElement */
|
|
55
|
-
/* StaticBlock */
|
|
56
|
-
/* Super */
|
|
57
|
-
/* SwitchCase */
|
|
58
|
-
/* SwitchStatement */
|
|
59
|
-
/* TaggedTemplateExpression */
|
|
60
|
-
/* TemplateElement */
|
|
61
|
-
/* TemplateLiteral */
|
|
62
|
-
/* ThisExpression */
|
|
63
|
-
/* ThrowStatement */
|
|
64
|
-
/* TryStatement */
|
|
65
|
-
/* UnaryExpression */
|
|
66
|
-
/* UpdateExpression */
|
|
67
|
-
/* VariableDeclaration */
|
|
68
|
-
/* VariableDeclarator */
|
|
69
|
-
/* WhileStatement */
|
|
70
|
-
/* WithStatement */
|
|
71
|
-
/* YieldExpression */
|