ml-opensource / admin-panel-template-reactjs

25 stars 10 forks source link

migration: Prettier `v2.2.x` to `v2.4.x` #118

Closed yukinoda closed 3 years ago

yukinoda commented 3 years ago

What are you adding?

Breaking changes?

Related PR

yukinoda commented 3 years ago

@mvn-binhnguyen-hn cc: @jacksonjp Can anyone in your team using windows check if this changes 602758f work?

yannde commented 3 years ago

@yukinoda I had the following errors when running on windows

Failed to compile.

src\components\atoms\DebouncedInput\DebouncedInput.tsx
  Line 41:28:  Replace `⏎····(persistOnChange?:·React.ChangeEventHandler)·=>·(e:·React.ChangeEvent` with `·(persistOnChange?:·React.ChangeEventHandler)·=>·(⏎····e:·React.ChangeEvent⏎··`  prettier/prettier
  Line 43:1:   Delete `··`
                                               prettier/prettier
  Line 44:1:   Replace `······` with `····`
                                               prettier/prettier
  Line 45:1:   Delete `··`
                                               prettier/prettier
  Line 46:1:   Delete `··`
                                               prettier/prettier

src\features\localization\helpers\localization.helpers.ts
  Line 9:10:  Replace `·translation,·translationMeta,·availableLanguages·}·=⏎···` with `⏎····translation,⏎····translationMeta,⏎····availableLanguages,⏎··}·=`  prettier/prettier

src\hooks\useSearchParams.ts
  Line 45:27:  Insert `(`  prettier/prettier
  Line 48:24:  Insert `)`  prettier/prettier
yukinoda commented 3 years ago

On Windows by @yannde

 "format": "prettier 'src/**/*.{ts,tsx,json,scss,css}' --write",
 "lint": "eslint 'src/**/*.{ts,tsx}' --fix --quiet",

Gives an error

"format": "prettier src/**/*.{ts,tsx,json,scss,css} --write",
"lint": "eslint src/**/*.{ts,tsx} --fix --quiet",

Is OK

On my MacOS

 "format": "prettier 'src/**/*.{ts,tsx,json,scss,css}' --write",
 "lint": "eslint 'src/**/*.{ts,tsx}' --fix --quiet",

Is OK

"format": "prettier src/**/*.{ts,tsx,json,scss,css} --write",
"lint": "eslint src/**/*.{ts,tsx} --fix --quiet",

Gives an error

yukinoda commented 3 years ago

On Windows by @yannde

 "format": "prettier 'src/**/*.{ts,tsx,json,scss,css}' --write",
 "lint": "eslint 'src/**/*.{ts,tsx}' --fix --quiet",

Gives an error

"format": "prettier src/**/*.{ts,tsx,json,scss,css} --write",
"lint": "eslint src/**/*.{ts,tsx} --fix --quiet",

Is OK

On my MacOS

 "format": "prettier 'src/**/*.{ts,tsx,json,scss,css}' --write",
 "lint": "eslint 'src/**/*.{ts,tsx}' --fix --quiet",

Is OK

"format": "prettier src/**/*.{ts,tsx,json,scss,css} --write",
"lint": "eslint src/**/*.{ts,tsx} --fix --quiet",

Gives an error

I will bring this as a separate issue (https://github.com/monstar-lab-oss/admin-panel-template-reactjs/issues/119) and revert 602758f