Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

EnableMcritic #235

Merged
merged 8 commits into from
Dec 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .soycriticrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"callToImportRegex": "(\\S+)",
"callToImportReplace": "{$1|param}",
"callToImport": [
{
"regex": "(\\S+)",
"replace": "{$1|param}"
},
{
"regex": "(\\S+)",
"replace": "{$1}"
}
],
"implicitParams": {
"Clay*": ["elementClasses", "visible"],
"Chart*": ["loading"]
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"jest": "jest",
"lerna": "lerna bootstrap -- --no-optional --no-package-lock",
"lint": "eslint packages/clay-*/src/*.js packages/clay-*/src/**/*.js && npm run mcritic",
"mcritic": "mcritic packages/ --ignore '**/{browserslist-config-clay-components,generator-metal-clay,clay-dropdown,clay-alert,clay-card-grid,clay-list,clay-management-toolbar,clay-card,clay-table,node_modules}/**'",
"mcritic": "mcritic packages/ --ignore '**/{browserslist-config-clay-components,generator-metal-clay,node_modules}/**'",
"precommit": "lint-staged",
"prettier": "prettier-eslint packages/clay-*/src/*.js packages/clay-*/src/**/*.js",
"start": "http-server . -p 4000",
Expand All @@ -28,7 +28,7 @@
"lint-staged": "^4.0.0",
"metal-a11y-checker": "^1.0.5",
"metal-jest-serializer": "^1.0.1",
"metal-soy-critic": "^2.3.0",
"metal-soy-critic": "^2.4.0",
"prettier-eslint-cli": "^4.3.2"
},
"jest": {
Expand Down
10 changes: 9 additions & 1 deletion packages/clay-card-grid/src/ClayCardGrid.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import 'clay-card';
import Component from 'metal-component';
import defineWebComponent from 'metal-web-component';
import Soy from 'metal-soy';
/* eslint-disable */
import {
ClayCard,
ClayFileCard,
ClayHorizontalCard,
ClayImageCard,
ClayUserCard
} from 'clay-card';
/* eslint-enable */
import {Config} from 'metal-state';

import templates from './ClayCardGrid.soy.js';
Expand Down
5 changes: 3 additions & 2 deletions packages/clay-card/src/ClayCard.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import 'clay-checkbox';
import 'clay-dropdown';
import 'clay-label';
import 'clay-link';
import 'clay-sticker';
// eslint-disable-next-line
import { ClayActionsDropdown } from 'clay-dropdown';
import {Config} from 'metal-state';
import Component from 'metal-component';
import defineWebComponent from 'metal-web-component';
import Soy from 'metal-soy';
import {Config} from 'metal-state';

import actionItemsValidator from './action_items_validator';
import templates from './ClayCard.soy.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/clay-card/src/ClayFileCard.soy
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
{param events: ['itemToggled': $handleItemToggled_ ] /}
{param fileType: $fileType /}
{param fileTypeStyle: $fileTypeStyle /}
{param href: $href /}
{param icon: $icon ?: 'documents-and-media' /}
{param id: $id /}
{param inputName: $inputName /}
Expand All @@ -55,7 +56,6 @@
{param spritemap: $spritemap /}
{param subtitle: $subtitle /}
{param title: $title /}
{param href: $href /}
{/call}
{/template}

Expand Down
5 changes: 3 additions & 2 deletions packages/clay-card/src/ClayHorizontalCard.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'clay-checkbox';
import 'clay-dropdown';
import 'clay-link';
import 'clay-sticker';
// eslint-disable-next-line
import { ClayActionsDropdown } from 'clay-dropdown';
import {Config} from 'metal-state';
import Component from 'metal-component';
import defineWebComponent from 'metal-web-component';
import Soy from 'metal-soy';
import {Config} from 'metal-state';

import actionItemsValidator from './action_items_validator';
import templates from './ClayHorizontalCard.soy.js';
Expand Down
7 changes: 4 additions & 3 deletions packages/clay-card/src/ClayUserCard.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import './ClayCard';
import 'clay-link';
import 'clay-dropdown';
import 'clay-sticker';
import './ClayCard';
// eslint-disable-next-line
import { ClayActionsDropdown } from 'clay-dropdown';
import {Config} from 'metal-state';
import Component from 'metal-component';
import defineWebComponent from 'metal-web-component';
import Soy from 'metal-soy';
import {Config} from 'metal-state';

import actionItemsValidator from './action_items_validator';
import templates from './ClayUserCard.soy.js';
Expand Down
4 changes: 2 additions & 2 deletions packages/clay-dropdown/src/ClayDropdownBase.soy
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
{param active: $item.active /}
{param checked: $item.checked /}
{param disabled: $item.disabled /}
{param href: $item.href /}
{param icon: $item.icon /}
{param inputName: $item.inputName /}
{param inputValue: $item.inputValue /}
Expand All @@ -82,7 +83,6 @@
{param label: $item.label ?: '' /}
{param separator: $item.separator /}
{param spritemap: $spritemap /}
{param href: $item.href /}
{/delcall}
{/foreach}
{/template}
Expand Down Expand Up @@ -372,6 +372,7 @@
{@param? active: bool}
{@param? checked: bool}
{@param? disabled: bool}
{@param? href: string}
{@param? icon: string}
{@param? inputName: string}
{@param? inputValue: string}
Expand All @@ -380,7 +381,6 @@
{@param? itemsIconAlignment: string}
{@param? separator: bool}
{@param? spritemap: string}
{@param? href: string}

{if $label != ''}
{if $isInList}
Expand Down
6 changes: 3 additions & 3 deletions packages/clay-list/src/ClayListItem.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import 'clay-checkbox';
import 'clay-dropdown';
import 'clay-icon';
import 'clay-label';
import 'clay-link';
import 'clay-sticker';

// eslint-disable-next-line
import { ClayActionsDropdown } from 'clay-dropdown';
import {Config} from 'metal-state';
import Component from 'metal-component';
import defineWebComponent from 'metal-web-component';
import Soy from 'metal-soy';
import {Config} from 'metal-state';

import templates from './ClayListItem.soy.js';

Expand Down
5 changes: 3 additions & 2 deletions packages/clay-management-toolbar/src/ClayManagementToolbar.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import 'clay-button';
import 'clay-checkbox';
import 'clay-dropdown';
// eslint-disable-next-line
import { ClayActionsDropdown } from 'clay-dropdown';
import {Config} from 'metal-state';
import Component from 'metal-component';
import defineWebComponent from 'metal-web-component';
import Soy from 'metal-soy';
import {Config} from 'metal-state';

import templates from './ClayManagementToolbar.soy.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@
{param elementClasses: 'nav-btn nav-btn-monospaced' /}
{param events: ['click': $handlePlusButtonClicked_ ] /}
{param icon: 'plus' /}
{param spritemap: $spritemap /}
{param ref: 'plusButton' /}
{param spritemap: $spritemap /}
{/call}
</li>
</ul>
Expand Down
5 changes: 3 additions & 2 deletions packages/clay-table/src/ClayTable.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import 'clay-button';
import 'clay-checkbox';
import 'clay-dropdown';
import 'clay-label';
import 'clay-link';
import 'clay-progress-bar';
// eslint-disable-next-line
import { ClayActionsDropdown } from 'clay-dropdown';
import {Config} from 'metal-state';
import {EventHandler} from 'metal-events';
import Component from 'metal-component';
import dom from 'metal-dom';
import defineWebComponent from 'metal-web-component';
import dom from 'metal-dom';
import Soy from 'metal-soy';

import templates from './ClayTable.soy.js';
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5545,9 +5545,9 @@ metal-soy-bundle@^2.14.1:
dependencies:
metal-incremental-dom "^2.14.1"

metal-soy-critic@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/metal-soy-critic/-/metal-soy-critic-2.3.0.tgz#122f4424c5df7cd4c5e8f3fce4d2b358517d38c4"
metal-soy-critic@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/metal-soy-critic/-/metal-soy-critic-2.4.0.tgz#51b19f05e77573e05e2f3ba0d7eb0a474d88820d"
dependencies:
babel-traverse "^6.23.1"
babel-types "^6.23.0"
Expand Down