Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): upgrade to new cli-style version to fix editors plugins #580

Merged
merged 2 commits into from
May 6, 2021
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
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.yarn/
/packages/icons/src/react/**/*.js
**/locales/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# Editor settings
/.vscode
/.vscode/
/.idea/

# dependencies
node_modules/
Expand Down
1 change: 1 addition & 0 deletions .hooks/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn d2-style check commit "$1"
4 changes: 4 additions & 0 deletions .hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn d2-style check --staged
15 changes: 0 additions & 15 deletions .huskyrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.yarn/
**/locales/
cypress/assets/*.js
7 changes: 2 additions & 5 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ module.exports = {
// with the storybook babel configuration.
return {
...config,
presets: [
...config.presets,
...custom.presets,
],
presets: [...config.presets, ...custom.presets],
plugins: [
...config.plugins,
...custom.plugins,
Expand All @@ -72,5 +69,5 @@ module.exports = {
},
reactOptions: {
fastRefresh: true,
}
},
}
2 changes: 1 addition & 1 deletion .storybook/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { addons } from '@storybook/addons'
import theme from './theme'

addons.setConfig({
theme: theme
theme: theme,
})
7 changes: 4 additions & 3 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CssReset } from '@dhis2/ui-core'
import '@fontsource/roboto/latin.css'
import React, { Fragment } from 'react'
import { jsxDecorator } from 'storybook-addon-jsx'
import '@storybook/addon-console'
import {
Title,
Expand All @@ -11,7 +10,8 @@ import {
Stories,
PRIMARY_STORY,
} from '@storybook/addon-docs/blocks'
import { CssReset } from '@dhis2/ui-core'
import React, { Fragment } from 'react'
import { jsxDecorator } from 'storybook-addon-jsx'

export const decorators = [
// Enable storybook jsx visualization
Expand Down Expand Up @@ -64,6 +64,7 @@ export const parameters = {
},
docs: {
// Customize docs page layout (in order to rename 'Stories' section)
/* eslint-disable-next-line react/display-name */
This conversation was marked as resolved.
Show resolved Hide resolved
page: () => (
<>
<Title />
Expand Down
2 changes: 1 addition & 1 deletion .storybook/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { create } from '@storybook/theming/create'
import { colors } from '@dhis2/ui-constants'
import { create } from '@storybook/theming/create'

/**
* See here for an example of these values:
Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@
"cy:run": "d2-utils-cypress run --appStart 'yarn cy:server' --waitOn 'http-get://localhost:5001'",
"demo": "EXTEND_ESLINT=true build-storybook -o ./dist/demo --quiet -s .storybook/static",
"docs": "d2-utils-docsite build ./docs -o ./dist --jsdoc ./packages/**/src --jsdoc-output-file api.md",
"format": "yarn format:js && yarn format:text",
"format:staged": "yarn format:js --staged && yarn format:text --staged",
"format:js": "d2-style js apply",
"format:text": "d2-style text apply",
"lint": "concurrently -n w: \"yarn:lint:*\"",
"lint:js": "d2-style js check",
"lint:text": "d2-style text check",
"format": "d2-style apply",
"format:staged": "d2-style apply --staged",
"lint": "d2-style check",
"start": "yarn build:icons && concurrently -n w: \"yarn:watch:*\" --kill-others",
"storybook:dev": "EXTEND_ESLINT=true start-storybook --port 5002 --quiet --ci -s .storybook/static --no-manager-cache",
"test": "d2-app-scripts test",
Expand All @@ -52,7 +48,7 @@
"devDependencies": {
"@dhis2/app-runtime": "^2.7.1",
"@dhis2/cli-app-scripts": "^5.7.2",
"@dhis2/cli-style": "^7.3.0",
"@dhis2/cli-style": "^8.0.0",
"@dhis2/cli-utils-cypress": "^5.1.0",
"@dhis2/cli-utils-docsite": "^2.0.2",
"@dhis2/cypress-commands": "^5.1.1",
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/Chip/Chip.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ Chip.propTypes = {
}

export { Chip }
export default Chip
2 changes: 1 addition & 1 deletion packages/core/src/Chip/Chip.stories.e2e.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { storiesOf } from '@storybook/react'
import React from 'react'
import Chip from './Chip.js'
import { Chip } from './Chip.js'

window.onClick = window.Cypress && window.Cypress.cy.stub()
window.onRemove = window.Cypress && window.Cypress.cy.stub()
Expand Down
Loading