Skip to content

Commit

Permalink
chore(deps-dev): bump @dhis2/cli-style from 4.2.0 to 5.0.4 (#219)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump @dhis2/cli-style from 4.2.0 to 5.0.2

Bumps [@dhis2/cli-style](https://github.com/dhis2/cli) from 4.2.0 to 5.0.2.
- [Release notes](https://github.com/dhis2/cli/releases)
- [Changelog](https://github.com/dhis2/cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dhis2/cli/commits)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* chore(deps-dev): update cli-style and hooks

* style: update code to comply with code style

* chore(deps-dev): remove eslint and babel-eslint

* chore(eslintignore): move eslintignore back to shell

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
  • Loading branch information
varl and dependabot-preview[bot] authored Dec 21, 2019
1 parent 0484971 commit 4c66ab9
Show file tree
Hide file tree
Showing 11 changed files with 402 additions and 569 deletions.
5 changes: 5 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
> 0.5%
last 2 versions
Firefox ESR
not ie 11
not dead
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
const { config } = require('@dhis2/cli-style')

module.exports = {
parser: 'babel-eslint',
extends: [config.eslint],
extends: [config.eslintReact],
parserOptions: {
allowImportExportEverywhere: true,
},
Expand Down
12 changes: 10 additions & 2 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
const { config } = require('@dhis2/cli-style')
const husky = require(config.husky)

const tasks = arr => arr.join(' && ')

module.exports = {
hooks: {
'commit-msg': 'd2-style commit check',
'pre-commit': 'd2-style validate',
...husky.hooks,
'pre-commit': tasks([
'd2-style js check --staged',
'd2-style text check --staged',
]),
},
}
3 changes: 1 addition & 2 deletions cli/config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const bundle = ({
pkg,
mode,
bundleDeps,
cwd,
}) => {
const externals = new RegExp(
Object.keys({
Expand Down Expand Up @@ -88,7 +87,7 @@ const bundle = ({
template: 'treemap',
}),
],
onwarn(warning, warn) {
onwarn(warning) {
// skip certain warnings
if (warning.code === 'UNRESOLVED_IMPORT') {
reporter.error(
Expand Down
2 changes: 1 addition & 1 deletion cli/src/lib/compiler/compileApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const watchFiles = ({ inputDir, outputDir, processFileCallback, watch }) => {
})
}

const compileApp = async ({ config, paths, mode, watch }) => {
const compileApp = async ({ config, paths, watch }) => {
await overwriteEntrypoint({ config, paths })

fs.removeSync(paths.shellApp)
Expand Down
1 change: 0 additions & 1 deletion cli/src/lib/generateManifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module.exports = (paths, config, publicUrl) => {
display: 'standalone',
theme_color: '#ffffff',
background_color: '#ffffff',
display: 'standalone',

scope: publicUrl,
}
Expand Down
2 changes: 1 addition & 1 deletion cli/src/lib/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { reporter } = require('@dhis2/cli-helpers-engine')

const shellAppDirname = 'src/D2App'

module.exports = makePaths = (cwd = process.cwd()) => {
module.exports = (cwd = process.cwd()) => {
const base = path.resolve(cwd)
const paths = {
babelConfig: path.join(__dirname, '../../config/babel.config.js'),
Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
"cli"
],
"devDependencies": {
"@dhis2/cli-style": "^4.1.1",
"@dhis2/cli-style": "^5.0.4",
"@dhis2/cli-utils-docsite": "^1.1.2",
"babel-eslint": "^10.0.3",
"concurrently": "^5.0.0",
"eslint": "^6.4.0"
"concurrently": "^5.0.0"
},
"scripts": {
"format": "d2-style js apply --all --no-stage",
"format": "d2-style js apply",
"install:shell": "cd shell && yarn --force --check-files",
"install:adapter": "cd shell/adapter && yarn --frozen-lockfile",
"install:example": "cd examples/simple-app && yarn --frozen-lockfile",
Expand Down
2 changes: 1 addition & 1 deletion shell/adapter/src/AuthBoundary/LoginModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {

const staticUrl = process.env.REACT_APP_DHIS2_BASE_URL

export const LoginModal = ({ url }) => {
export const LoginModal = () => {
const [server, setServer] = useState(
staticUrl || window.localStorage.DHIS2_BASE_URL || ''
)
Expand Down
1 change: 1 addition & 0 deletions shell/adapter/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Provider } from '@dhis2/app-runtime'
import { FatalErrorBoundary } from './FatalErrorBoundary'
import { AuthBoundary } from './AuthBoundary'

// eslint-disable-next-line react/prop-types
const App = ({ url, apiVersion, appName, children }) => (
<FatalErrorBoundary>
<Provider config={{ baseUrl: url, apiVersion: apiVersion }}>
Expand Down
Loading

0 comments on commit 4c66ab9

Please sign in to comment.