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.
Files changed (59) hide show
  1. package/index.js +126 -125
  2. package/package.json +39 -31
  3. package/rules/pretty-imports.js +15 -15
  4. package/rules/pretty-jsdoc-casting.js +37 -29
  5. package/rules/pretty-sequence.js +61 -52
  6. package/rules/svelte-naming-convention.js +19 -19
  7. package/test/pretty-imports/ExportNamedDeclaration.js +32 -24
  8. package/test/pretty-imports/ImportDeclaration.js +32 -24
  9. package/test/pretty-imports.js +3 -3
  10. package/test/pretty-jsdoc-casting/case_by_expression.js +73 -25
  11. package/test/pretty-jsdoc-casting/various_situations.js +31 -11
  12. package/test/pretty-jsdoc-casting.js +3 -3
  13. package/test/pretty-sequence/case_by_node_type.js +62 -30
  14. package/test/pretty-sequence/case_by_option.js +31 -15
  15. package/test/pretty-sequence/various_situations.js +34 -9
  16. package/test/pretty-sequence.js +3 -3
  17. package/test/svelte-naming-convention/basic_snake_case.js +21 -8
  18. package/test/svelte-naming-convention/case_by_identifier.js +761 -195
  19. package/test/svelte-naming-convention/snake_case_with_symbols.js +28 -7
  20. package/test/svelte-naming-convention.js +3 -3
  21. package/tsconfig.json +10 -2
  22. package/types/index.d.ts +15 -0
  23. package/types/index.d.ts.map +1 -0
  24. package/types/rules/pretty-imports.d.ts +3 -0
  25. package/types/rules/pretty-imports.d.ts.map +1 -0
  26. package/types/rules/pretty-jsdoc-casting.d.ts +3 -0
  27. package/types/rules/pretty-jsdoc-casting.d.ts.map +1 -0
  28. package/types/rules/pretty-sequence.d.ts +3 -0
  29. package/types/rules/pretty-sequence.d.ts.map +1 -0
  30. package/types/rules/svelte-naming-convention.d.ts +3 -0
  31. package/types/rules/svelte-naming-convention.d.ts.map +1 -0
  32. package/types/test/pretty-imports/ExportNamedDeclaration.d.ts +2 -0
  33. package/types/test/pretty-imports/ExportNamedDeclaration.d.ts.map +1 -0
  34. package/types/test/pretty-imports/ImportDeclaration.d.ts +2 -0
  35. package/types/test/pretty-imports/ImportDeclaration.d.ts.map +1 -0
  36. package/types/test/pretty-imports.d.ts +2 -0
  37. package/types/test/pretty-imports.d.ts.map +1 -0
  38. package/types/test/pretty-jsdoc-casting/case_by_expression.d.ts +2 -0
  39. package/types/test/pretty-jsdoc-casting/case_by_expression.d.ts.map +1 -0
  40. package/types/test/pretty-jsdoc-casting/various_situations.d.ts +2 -0
  41. package/types/test/pretty-jsdoc-casting/various_situations.d.ts.map +1 -0
  42. package/types/test/pretty-jsdoc-casting.d.ts +2 -0
  43. package/types/test/pretty-jsdoc-casting.d.ts.map +1 -0
  44. package/types/test/pretty-sequence/case_by_node_type.d.ts +2 -0
  45. package/types/test/pretty-sequence/case_by_node_type.d.ts.map +1 -0
  46. package/types/test/pretty-sequence/case_by_option.d.ts +2 -0
  47. package/types/test/pretty-sequence/case_by_option.d.ts.map +1 -0
  48. package/types/test/pretty-sequence/various_situations.d.ts +2 -0
  49. package/types/test/pretty-sequence/various_situations.d.ts.map +1 -0
  50. package/types/test/pretty-sequence.d.ts +2 -0
  51. package/types/test/pretty-sequence.d.ts.map +1 -0
  52. package/types/test/svelte-naming-convention/basic_snake_case.d.ts +2 -0
  53. package/types/test/svelte-naming-convention/basic_snake_case.d.ts.map +1 -0
  54. package/types/test/svelte-naming-convention/case_by_identifier.d.ts +2 -0
  55. package/types/test/svelte-naming-convention/case_by_identifier.d.ts.map +1 -0
  56. package/types/test/svelte-naming-convention/snake_case_with_symbols.d.ts +2 -0
  57. package/types/test/svelte-naming-convention/snake_case_with_symbols.d.ts.map +1 -0
  58. package/types/test/svelte-naming-convention.d.ts +2 -0
  59. 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: [ { line: 1, column: 5 } ],
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: [ { line: 1, column: 5 } ],
33
- output: "var ___ = 'Hello'"
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: [ { line: 1, column: 5 } ],
38
- output: "var $$$ = 'Hello'"
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: [ { line: 1, column: 5 } ],
43
- output: "var $snake$case$ = 'Hello'"
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
- let { RuleTester } = require("eslint")
2
+ const { RuleTester } = require("eslint")
3
3
 
4
4
  /** @type {RuleTester.ValidTestCase[]} */
5
- let valid = []
5
+ const valid = []
6
6
  /** @type {RuleTester.InvalidTestCase[]} */
7
- let invalid = []
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
- "noEmit": true,
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
  }
@@ -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,3 @@
1
+ declare const _exports: import("eslint").Rule.RuleModule;
2
+ export = _exports;
3
+ //# sourceMappingURL=pretty-imports.d.ts.map
@@ -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,3 @@
1
+ declare const _exports: import("eslint").Rule.RuleModule;
2
+ export = _exports;
3
+ //# sourceMappingURL=pretty-jsdoc-casting.d.ts.map
@@ -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,3 @@
1
+ declare const _exports: import("eslint").Rule.RuleModule;
2
+ export = _exports;
3
+ //# sourceMappingURL=pretty-sequence.d.ts.map
@@ -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,3 @@
1
+ declare const _exports: import("eslint").Rule.RuleModule;
2
+ export = _exports;
3
+ //# sourceMappingURL=svelte-naming-convention.d.ts.map
@@ -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,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=ExportNamedDeclaration.d.ts.map
@@ -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,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=ImportDeclaration.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pretty-imports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pretty-imports.d.ts","sourceRoot":"","sources":["../../test/pretty-imports.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=case_by_expression.d.ts.map
@@ -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,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=various_situations.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pretty-jsdoc-casting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pretty-jsdoc-casting.d.ts","sourceRoot":"","sources":["../../test/pretty-jsdoc-casting.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=case_by_node_type.d.ts.map
@@ -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,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=case_by_option.d.ts.map
@@ -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,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=various_situations.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pretty-sequence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pretty-sequence.d.ts","sourceRoot":"","sources":["../../test/pretty-sequence.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=basic_snake_case.d.ts.map
@@ -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,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=case_by_identifier.d.ts.map
@@ -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,2 @@
1
+ export function module(valid: import("eslint").RuleTester.ValidTestCase[], invalid: import("eslint").RuleTester.InvalidTestCase[]): void;
2
+ //# sourceMappingURL=snake_case_with_symbols.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=svelte-naming-convention.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svelte-naming-convention.d.ts","sourceRoot":"","sources":["../../test/svelte-naming-convention.js"],"names":[],"mappings":""}