Skip to content

Commit

Permalink
Use the LWC flavor of web-component-analyzer and remove the unnecessa…
Browse files Browse the repository at this point in the history
…ry annotations
  • Loading branch information
priandsf committed Sep 7, 2020
1 parent c728d9d commit bfb9d45
Show file tree
Hide file tree
Showing 24 changed files with 475 additions and 439 deletions.
3 changes: 0 additions & 3 deletions packages/lwc-app/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
addDecorator,
setCustomElements,
} from '@storybook/web-components';
import { withA11y } from '@storybook/addon-a11y';

import '@lwc/synthetic-shadow';
import './build/main-storybook'; // This file is going to be generated by the `storybook:build` task and contains all the components
Expand All @@ -15,8 +14,6 @@ import './build/main-storybook'; // This file is going to be generated by the `s
import customElements from './build/custom-elements.json';
setCustomElements(customElements);

addDecorator(withA11y);

addParameters({
a11y: {
config: {},
Expand Down
38 changes: 19 additions & 19 deletions packages/lwc-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,28 @@

"lwc-library": "^0.0.1",

"@storybook/addon-a11y": "6.0.0-rc.28",
"@storybook/addon-actions": "6.0.0-rc.28",
"@storybook/addon-backgrounds": "6.0.0-rc.28",
"@storybook/addon-controls": "6.0.0-rc.28",
"@storybook/addon-docs": "6.0.0-rc.28",
"@storybook/addon-events": "6.0.0-rc.28",
"@storybook/addon-jest": "6.0.0-rc.28",
"@storybook/addon-links": "6.0.0-rc.28",
"@storybook/addon-storyshots": "6.0.0-rc.28",
"@storybook/addon-storysource": "6.0.0-rc.28",
"@storybook/addon-viewport": "6.0.0-rc.28",
"@storybook/addons": "6.0.0-rc.28",
"@storybook/client-api": "6.0.0-rc.28",
"@storybook/core": "6.0.0-rc.28",
"@storybook/core-events": "6.0.0-rc.28",
"@storybook/source-loader": "6.0.0-rc.28",
"@storybook/web-components": "6.0.0-rc.28",
"@storybook/addon-a11y": "^6.0.21",
"@storybook/addon-actions": "^6.0.21",
"@storybook/addon-backgrounds": "^6.0.21",
"@storybook/addon-controls": "^6.0.21",
"@storybook/addon-docs": "^6.0.21",
"@storybook/addon-events": "^6.0.21",
"@storybook/addon-jest": "^6.0.21",
"@storybook/addon-links": "^6.0.21",
"@storybook/addon-storyshots": "^6.0.21",
"@storybook/addon-storysource": "^6.0.21",
"@storybook/addon-viewport": "^6.0.21",
"@storybook/addons": "^6.0.21",
"@storybook/client-api": "^6.0.21",
"@storybook/core": "^6.0.21",
"@storybook/core-events": "^6.0.21",
"@storybook/source-loader": "^6.0.21",
"@storybook/web-components": "^6.0.21",

"@storybook/cli": "6.0.0-rc.28",
"@storybook/cli": "^6.0.21",
"lit-html": "^1.2.1",
"npm-run-all": "4.1.5",
"web-component-analyzer": "^1.0.3"
"web-component-analyzer": "1.2.0-next.0"
},
"engines": {
"node": ">=10.13.0",
Expand Down
1 change: 0 additions & 1 deletion packages/lwc-app/src/app/main/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LightningElement } from 'lwc';

/**
* @element app-main
*/
export default class Main extends LightningElement {
}
1 change: 0 additions & 1 deletion packages/lwc-app/src/unit/inherit3/inherit3.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Inherit2 from 'unit/inherit2'

/**
* Inherit component 3
* @element unit-inherit3
*/
export default class Inherit extends Inherit2 {

Expand Down
38 changes: 19 additions & 19 deletions packages/lwc-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,29 @@
"cross-env": "^6.0.3",
"lint-staged": "^9.4",

"@storybook/addon-a11y": "6.0.0-rc.28",
"@storybook/addon-actions": "6.0.0-rc.28",
"@storybook/addon-backgrounds": "6.0.0-rc.28",
"@storybook/addon-controls": "6.0.0-rc.28",
"@storybook/addon-docs": "6.0.0-rc.28",
"@storybook/addon-events": "6.0.0-rc.28",
"@storybook/addon-jest": "6.0.0-rc.28",
"@storybook/addon-links": "6.0.0-rc.28",
"@storybook/addon-storyshots": "6.0.0-rc.28",
"@storybook/addon-storysource": "6.0.0-rc.28",
"@storybook/addon-viewport": "6.0.0-rc.28",
"@storybook/addons": "6.0.0-rc.28",
"@storybook/client-api": "6.0.0-rc.28",
"@storybook/core": "6.0.0-rc.28",
"@storybook/core-events": "6.0.0-rc.28",
"@storybook/source-loader": "6.0.0-rc.28",
"@storybook/web-components": "6.0.0-rc.28",
"@storybook/addon-a11y": "^6.0.21",
"@storybook/addon-actions": "^6.0.21",
"@storybook/addon-backgrounds": "^6.0.21",
"@storybook/addon-controls": "^6.0.21",
"@storybook/addon-docs": "^6.0.21",
"@storybook/addon-events": "^6.0.21",
"@storybook/addon-jest": "^6.0.21",
"@storybook/addon-links": "^6.0.21",
"@storybook/addon-storyshots": "^6.0.21",
"@storybook/addon-storysource": "^6.0.21",
"@storybook/addon-viewport": "^6.0.21",
"@storybook/addons": "^6.0.21",
"@storybook/client-api": "^6.0.21",
"@storybook/core": "^6.0.21",
"@storybook/core-events": "^6.0.21",
"@storybook/source-loader": "^6.0.21",
"@storybook/web-components": "^6.0.21",

"@storybook/cli": "6.0.0-rc.28",
"@storybook/cli": "^6.0.21",
"lit-html": "^1.2.1",
"npm-run-all": "4.1.5",
"@open-wc/lit-helpers": "0.3.10",
"web-component-analyzer": "^1.0.3"
"web-component-analyzer": "1.2.0-next.0"
},
"engines": {
"node": ">=10.13.0",
Expand Down
7 changes: 0 additions & 7 deletions packages/lwc-library/src/hello/greetings/greetings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ import { Time } from '../../wire/time'

/**
* Greetings component that shows what an LWC component can provide.
*
* @element hello-greetings
*/
export default class Greetings extends LightningElement {

/**
* This is a property that can be set from an attribute
*
* @attribute
*/
@api name = ''

Expand All @@ -24,13 +20,10 @@ export default class Greetings extends LightningElement {

/**
* This is a simple property
*
* @property
*/
@api message = 'Glad to see you'

/**
* @readonly
*/
get greetings() {
return `${this.message}, ${this.name}`
Expand Down
3 changes: 0 additions & 3 deletions packages/lwc-library/src/hello/time/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ import { Time } from '../../wire/time'
* minutes: 18,
* seconds: 44
* }
*
* @element hello-time
*/
export default class DisplayTime extends LightningElement {

/**
* Time passed as a complex object.
* @attr
*/
@api time = {hours:0,minutes:0,seconds:0}

Expand Down
2 changes: 0 additions & 2 deletions packages/lwc-library/src/hello/world/world.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { LightningElement, buildCustomElementConstructor } from 'lwc';

/**
* The simpliest, possible Hello World component.
*
* @element hello-world
*/
export default class World extends LightningElement {
}
Expand Down
12 changes: 0 additions & 12 deletions packages/lwc-library/src/unit/attrs/attrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,50 @@ import { LightningElement, api, buildCustomElementConstructor } from 'lwc';

/**
* A component exposing attributes
*
* @element unit-attrs
*/
export default class UnitAttrs extends LightningElement {

/**
* @attr
* @type boolean
*/
@api attrBoolean

/**
* @attr
* @type number
*/
@api attrNumber

/**
* @attr
* @type string
*/
@api attrString

/**
* @attr
* @type Object
*/
@api attrObject

/**
* @attr
*/
@api attrBooleanImplicit = false

/**
* @attr
*/
@api attrNumberImplicit = 0

/**
* @attr
*/
@api attrStringImplicit = ""

/**
* @attr
*/
@api attrObjectImplicit = { name: 'attrObjectImplicit' }

/**
* @attr
*/
@api attrNoType

/**
* @attr
* @type string
* @readonly
*/
Expand Down
3 changes: 0 additions & 3 deletions packages/lwc-library/src/unit/cssvars/cssvars.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ import { LightningElement, api, buildCustomElementConstructor } from 'lwc';
* @cssprop unit-border-color
* @cssprop unit-text-color
* @cssprop unit-text-size
*
* @element unit-cssvars
*/
export default class UnitCssVars extends LightningElement {

/**
* @attr
*/
@api message = "Hello, CSS Variables!"

Expand Down
2 changes: 0 additions & 2 deletions packages/lwc-library/src/unit/events/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { LightningElement, api, buildCustomElementConstructor } from 'lwc';

/**
* A component that sends custom events
*
* @element unit-events
*/
export default class UnitEvents extends LightningElement {

Expand Down
1 change: 0 additions & 1 deletion packages/lwc-library/src/unit/inherit/inherit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { LightningElement, api } from 'lwc';

/**
* Base inherit component.
* @element unit-inherit
*/
export default class Inherit extends LightningElement {

Expand Down
1 change: 0 additions & 1 deletion packages/lwc-library/src/unit/inherit2/inherit2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import BaseInherit from '../inherit/inherit'

/**
* Inherit component 2.
* @element unit-inherit2
*/
export default class Inherit extends BaseInherit {

Expand Down
2 changes: 0 additions & 2 deletions packages/lwc-library/src/unit/jsdoc/jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import { LightningElement, api, buildCustomElementConstructor } from 'lwc';
*
* @csspart textspan - The span tag containing the text
* @csspart iconimg
*
* @element unit-jsdoc
*/
export default class UnitJSDocs extends LightningElement {

Expand Down
32 changes: 10 additions & 22 deletions packages/lwc-library/src/unit/props/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,58 @@ import { LightningElement, api, buildCustomElementConstructor } from 'lwc';

/**
* A component exposing properties.
*
* @element unit-props
*/
export default class UnitProps extends LightningElement {

/**
* @prop {boolean}
* @type {boolean}
*/
@api
propBoolean = false

/**
* @prop {number}
* @type {number}
*/
@api
propNumber = 0

/**
* @prop {string}
* @type {string}
*/
@api
propString = ""

/**
* @prop {Object}
* @type {Object}
*/
@api
propObject = { name: 'attrObject' }

/**
* @prop
* @type
*/
@api
propBooleanImplicit = false

/**
* @prop
* @type
*/
@api
propNumberImplicit = 0

/**
* @prop
* @type
*/
@api
propStringImplicit = ""

/**
* @prop
* @type
*/
@api
propObjectImplicit = { name: 'attrObjectImplicit' }

/**
* @prop
* @type
*/
@api
propNoType

/**
* @prop {string}
* @type {string}
* @readonly
*/
@api
propReadOnly

get _componentData() {
Expand Down
2 changes: 0 additions & 2 deletions packages/lwc-library/src/unit/slots/slots.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { LightningElement, api, buildCustomElementConstructor } from 'lwc';
* @slot - This component supports an unamed slot
* @slot header - This component supports a header slot
* @slot footer - This component supports a footer slot
*
* @element unit-slots
*/
export default class UnitSlots extends LightningElement {

Expand Down
Loading

0 comments on commit bfb9d45

Please sign in to comment.