@swiftwc/eslint-plugin 1.1.4 → 1.1.6-canary.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.
@@ -1,12 +1,12 @@
1
1
  import { readFileSync } from 'fs';
2
2
  export const DIRECT_PARENT_RULES = {
3
3
  'v-keyboard': ['template', 'body'],
4
- 'scroll-view': ['template', 'body-view', 'dialog', 'navigation-stack', 'navigation-split-view', 'detail-placeholder'],
4
+ 'scroll-view': ['template', 'content-view', 'dialog', 'navigation-stack', 'navigation-split-view', 'detail-placeholder'],
5
5
  dialog: ['template', 'tab-view', 'navigation-split-view'],
6
- 'tool-bar': ['template', 'dialog', 'body-view', 'navigation-split-view', 'navigation-stack'],
6
+ 'tool-bar': ['template', 'dialog', 'content-view', 'navigation-split-view', 'navigation-stack'],
7
7
  'tool-bar-item': ['template', 'tool-bar', 'tool-bar-item-group', 'sidebar-toggle'],
8
- 'sidebar-toggle': ['template', 'tab-view', 'form', 'navigation-split-view'],
9
- 'body-view': ['template', 'dialog', 'body-view', 'navigation-stack', 'navigation-split-view'],
8
+ 'sidebar-toggle': ['template', 'tab-view', 'form', 'navigation-split-view', 'tool-bar'],
9
+ 'content-view': ['template', 'dialog', 'content-view', 'navigation-stack', 'navigation-split-view'],
10
10
  };
11
11
  export function validate(tag, getParentTag, allowedParents, context, node) {
12
12
  const parentTag = getParentTag(node);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swiftwc/eslint-plugin",
3
- "version": "1.1.4",
3
+ "version": "1.1.6-canary.0",
4
4
  "description": "Rules enforcing best practices while using SwiftWC.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -30,10 +30,12 @@
30
30
  "./emberjs/en": "./generated/emberjs/en.js"
31
31
  },
32
32
  "scripts": {
33
+ "typecheck": "tsc --noEmit",
33
34
  "prebuild": "rm -rf generated",
34
35
  "build": "npm run build:ts",
35
36
  "build:ts": "tsc",
36
- "start": "npm run prebuild && tsc --watch",
37
+ "build:ts:watch": "npm run prebuild && tsc --watch",
38
+ "prepublishOnly": "npm run build",
37
39
  "format:check": "prettier . --check",
38
40
  "format:write": "prettier . --write"
39
41
  },
package/src/index.ts CHANGED
@@ -10,17 +10,17 @@ export type TagNode = {
10
10
  export const DIRECT_PARENT_RULES: Record<string, string[]> = {
11
11
  'v-keyboard': ['template', 'body'],
12
12
 
13
- 'scroll-view': ['template', 'body-view', 'dialog', 'navigation-stack', 'navigation-split-view', 'detail-placeholder'],
13
+ 'scroll-view': ['template', 'content-view', 'dialog', 'navigation-stack', 'navigation-split-view', 'detail-placeholder'],
14
14
 
15
15
  dialog: ['template', 'tab-view', 'navigation-split-view'],
16
16
 
17
- 'tool-bar': ['template', 'dialog', 'body-view', 'navigation-split-view', 'navigation-stack'],
17
+ 'tool-bar': ['template', 'dialog', 'content-view', 'navigation-split-view', 'navigation-stack'],
18
18
 
19
19
  'tool-bar-item': ['template', 'tool-bar', 'tool-bar-item-group', 'sidebar-toggle'],
20
20
 
21
- 'sidebar-toggle': ['template', 'tab-view', 'form', 'navigation-split-view'],
21
+ 'sidebar-toggle': ['template', 'tab-view', 'form', 'navigation-split-view', 'tool-bar'],
22
22
 
23
- 'body-view': ['template', 'dialog', 'body-view', 'navigation-stack', 'navigation-split-view'],
23
+ 'content-view': ['template', 'dialog', 'content-view', 'navigation-stack', 'navigation-split-view'],
24
24
  }
25
25
 
26
26
  export function validate(