eslint-plugin-lube 0.4.3 → 0.5.1
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/index.js +126 -125
- package/package.json +39 -31
- package/rules/pretty-imports.js +15 -15
- package/rules/pretty-jsdoc-casting.js +37 -29
- package/rules/pretty-sequence.js +61 -52
- package/rules/svelte-naming-convention.js +19 -19
- package/test/pretty-imports/ExportNamedDeclaration.js +32 -24
- package/test/pretty-imports/ImportDeclaration.js +32 -24
- package/test/pretty-imports.js +3 -3
- package/test/pretty-jsdoc-casting/case_by_expression.js +73 -25
- package/test/pretty-jsdoc-casting/various_situations.js +31 -11
- package/test/pretty-jsdoc-casting.js +3 -3
- package/test/pretty-sequence/case_by_node_type.js +62 -30
- package/test/pretty-sequence/case_by_option.js +31 -15
- package/test/pretty-sequence/various_situations.js +34 -9
- package/test/pretty-sequence.js +3 -3
- package/test/svelte-naming-convention/basic_snake_case.js +21 -8
- package/test/svelte-naming-convention/case_by_identifier.js +761 -195
- package/test/svelte-naming-convention/snake_case_with_symbols.js +28 -7
- package/test/svelte-naming-convention.js +3 -3
- package/tsconfig.json +10 -2
- package/types/index.d.ts +15 -0
- package/types/index.d.ts.map +1 -0
- package/types/rules/pretty-imports.d.ts +3 -0
- package/types/rules/pretty-imports.d.ts.map +1 -0
- package/types/rules/pretty-jsdoc-casting.d.ts +3 -0
- package/types/rules/pretty-jsdoc-casting.d.ts.map +1 -0
- package/types/rules/pretty-sequence.d.ts +3 -0
- package/types/rules/pretty-sequence.d.ts.map +1 -0
- package/types/rules/svelte-naming-convention.d.ts +3 -0
- package/types/rules/svelte-naming-convention.d.ts.map +1 -0
- package/types/test/pretty-imports/ExportNamedDeclaration.d.ts +2 -0
- package/types/test/pretty-imports/ExportNamedDeclaration.d.ts.map +1 -0
- package/types/test/pretty-imports/ImportDeclaration.d.ts +2 -0
- package/types/test/pretty-imports/ImportDeclaration.d.ts.map +1 -0
- package/types/test/pretty-imports.d.ts +2 -0
- package/types/test/pretty-imports.d.ts.map +1 -0
- package/types/test/pretty-jsdoc-casting/case_by_expression.d.ts +2 -0
- package/types/test/pretty-jsdoc-casting/case_by_expression.d.ts.map +1 -0
- package/types/test/pretty-jsdoc-casting/various_situations.d.ts +2 -0
- package/types/test/pretty-jsdoc-casting/various_situations.d.ts.map +1 -0
- package/types/test/pretty-jsdoc-casting.d.ts +2 -0
- package/types/test/pretty-jsdoc-casting.d.ts.map +1 -0
- package/types/test/pretty-sequence/case_by_node_type.d.ts +2 -0
- package/types/test/pretty-sequence/case_by_node_type.d.ts.map +1 -0
- package/types/test/pretty-sequence/case_by_option.d.ts +2 -0
- package/types/test/pretty-sequence/case_by_option.d.ts.map +1 -0
- package/types/test/pretty-sequence/various_situations.d.ts +2 -0
- package/types/test/pretty-sequence/various_situations.d.ts.map +1 -0
- package/types/test/pretty-sequence.d.ts +2 -0
- package/types/test/pretty-sequence.d.ts.map +1 -0
- package/types/test/svelte-naming-convention/basic_snake_case.d.ts +2 -0
- package/types/test/svelte-naming-convention/basic_snake_case.d.ts.map +1 -0
- package/types/test/svelte-naming-convention/case_by_identifier.d.ts +2 -0
- package/types/test/svelte-naming-convention/case_by_identifier.d.ts.map +1 -0
- package/types/test/svelte-naming-convention/snake_case_with_symbols.d.ts +2 -0
- package/types/test/svelte-naming-convention/snake_case_with_symbols.d.ts.map +1 -0
- package/types/test/svelte-naming-convention.d.ts +2 -0
- package/types/test/svelte-naming-convention.d.ts.map +1 -0
|
@@ -24,23 +24,44 @@ exports.module = (valid, invalid) => {
|
|
|
24
24
|
invalid.push(
|
|
25
25
|
{
|
|
26
26
|
code: "var __camelCase$$ = 'Hello'",
|
|
27
|
-
errors: [
|
|
27
|
+
errors: [
|
|
28
|
+
{
|
|
29
|
+
column: 5,
|
|
30
|
+
line: 1,
|
|
31
|
+
messageId: "not_match"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
28
34
|
output: "var __camel_case$$ = 'Hello'"
|
|
29
35
|
},
|
|
30
36
|
{
|
|
31
37
|
code: "var ___ = 'Hello'",
|
|
32
|
-
errors: [
|
|
33
|
-
|
|
38
|
+
errors: [
|
|
39
|
+
{
|
|
40
|
+
column: 5,
|
|
41
|
+
line: 1,
|
|
42
|
+
messageId: "not_match"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
34
45
|
},
|
|
35
46
|
{
|
|
36
47
|
code: "var $$$ = 'Hello'",
|
|
37
|
-
errors: [
|
|
38
|
-
|
|
48
|
+
errors: [
|
|
49
|
+
{
|
|
50
|
+
column: 5,
|
|
51
|
+
line: 1,
|
|
52
|
+
messageId: "not_match"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
39
55
|
},
|
|
40
56
|
{
|
|
41
57
|
code: "var $snake$case$ = 'Hello'",
|
|
42
|
-
errors: [
|
|
43
|
-
|
|
58
|
+
errors: [
|
|
59
|
+
{
|
|
60
|
+
column: 5,
|
|
61
|
+
line: 1,
|
|
62
|
+
messageId: "not_match"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
44
65
|
}
|
|
45
66
|
)
|
|
46
67
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict"
|
|
2
|
-
|
|
2
|
+
const { RuleTester } = require("eslint")
|
|
3
3
|
|
|
4
4
|
/** @type {RuleTester.ValidTestCase[]} */
|
|
5
|
-
|
|
5
|
+
const valid = []
|
|
6
6
|
/** @type {RuleTester.InvalidTestCase[]} */
|
|
7
|
-
|
|
7
|
+
const invalid = []
|
|
8
8
|
|
|
9
9
|
require(
|
|
10
10
|
"./svelte-naming-convention/basic_snake_case"
|
package/tsconfig.json
CHANGED
|
@@ -3,11 +3,19 @@
|
|
|
3
3
|
"allowJs": true,
|
|
4
4
|
"allowSyntheticDefaultImports": true,
|
|
5
5
|
"checkJs": true,
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationDir": "types",
|
|
8
|
+
"declarationMap": true,
|
|
9
|
+
"emitDeclarationOnly": true,
|
|
10
|
+
"exactOptionalPropertyTypes": true,
|
|
6
11
|
"lib": [ "ES2020", "DOM", "DOM.Iterable" ],
|
|
7
12
|
"module": "CommonJS",
|
|
8
|
-
"
|
|
13
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
14
|
+
// "noUncheckedIndexedAccess": true,
|
|
15
|
+
"outDir": "silences wrong TS error, we don't compile, we only typecheck",
|
|
9
16
|
"skipLibCheck": true,
|
|
10
17
|
"strict": true,
|
|
11
18
|
"target": "ESNext"
|
|
12
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"include": [ "**/*.js" ],
|
|
13
21
|
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare namespace configs {
|
|
2
|
+
let plugins: {};
|
|
3
|
+
let rules: {};
|
|
4
|
+
}
|
|
5
|
+
export declare namespace meta {
|
|
6
|
+
let name: string;
|
|
7
|
+
}
|
|
8
|
+
declare let rules_1: {
|
|
9
|
+
"pretty-imports": import("eslint").Rule.RuleModule;
|
|
10
|
+
"pretty-jsdoc-casting": import("eslint").Rule.RuleModule;
|
|
11
|
+
"pretty-sequence": import("eslint").Rule.RuleModule;
|
|
12
|
+
"svelte-naming-convention": import("eslint").Rule.RuleModule;
|
|
13
|
+
};
|
|
14
|
+
export { rules_1 as rules };
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pretty-imports.d.ts","sourceRoot":"","sources":["../../rules/pretty-imports.js"],"names":[],"mappings":"wBACW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pretty-jsdoc-casting.d.ts","sourceRoot":"","sources":["../../rules/pretty-jsdoc-casting.js"],"names":[],"mappings":"wBAgBW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pretty-sequence.d.ts","sourceRoot":"","sources":["../../rules/pretty-sequence.js"],"names":[],"mappings":"wBAkBW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svelte-naming-convention.d.ts","sourceRoot":"","sources":["../../rules/svelte-naming-convention.js"],"names":[],"mappings":"wBACW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportNamedDeclaration.d.ts","sourceRoot":"","sources":["../../../test/pretty-imports/ExportNamedDeclaration.js"],"names":[],"mappings":"AAIiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QAwHvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportDeclaration.d.ts","sourceRoot":"","sources":["../../../test/pretty-imports/ImportDeclaration.js"],"names":[],"mappings":"AAIiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QA0HvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pretty-imports.d.ts","sourceRoot":"","sources":["../../test/pretty-imports.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case_by_expression.d.ts","sourceRoot":"","sources":["../../../test/pretty-jsdoc-casting/case_by_expression.js"],"names":[],"mappings":"AAiEiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QAiOvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"various_situations.d.ts","sourceRoot":"","sources":["../../../test/pretty-jsdoc-casting/various_situations.js"],"names":[],"mappings":"AAIiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QA4GvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pretty-jsdoc-casting.d.ts","sourceRoot":"","sources":["../../test/pretty-jsdoc-casting.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case_by_node_type.d.ts","sourceRoot":"","sources":["../../../test/pretty-sequence/case_by_node_type.js"],"names":[],"mappings":"AAIiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QAqWvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case_by_option.d.ts","sourceRoot":"","sources":["../../../test/pretty-sequence/case_by_option.js"],"names":[],"mappings":"AAIiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QA2IvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"various_situations.d.ts","sourceRoot":"","sources":["../../../test/pretty-sequence/various_situations.js"],"names":[],"mappings":"AAIiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QAyMvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pretty-sequence.d.ts","sourceRoot":"","sources":["../../test/pretty-sequence.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic_snake_case.d.ts","sourceRoot":"","sources":["../../../test/svelte-naming-convention/basic_snake_case.js"],"names":[],"mappings":"AAIiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QAgEvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case_by_identifier.d.ts","sourceRoot":"","sources":["../../../test/svelte-naming-convention/case_by_identifier.js"],"names":[],"mappings":"AAIiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QA+2CvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snake_case_with_symbols.d.ts","sourceRoot":"","sources":["../../../test/svelte-naming-convention/snake_case_with_symbols.js"],"names":[],"mappings":"AAIiB,8BAHN,OAAO,QAAQ,EAAE,UAAU,CAAC,aAAa,EAAE,WAC3C,OAAO,QAAQ,EAAE,UAAU,CAAC,eAAe,EAAE,QAgEvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svelte-naming-convention.d.ts","sourceRoot":"","sources":["../../test/svelte-naming-convention.js"],"names":[],"mappings":""}
|