Skip to content

Commit

Permalink
fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
smouillour committed Oct 23, 2023
1 parent 2e97a30 commit 1906997
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
5 changes: 1 addition & 4 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ prefer-workspace-packages=true

#https://pnpm.io/blog/2020/10/17/node-modules-configuration-options-with-pnpm#plugnplay-the-strictest-configuration
hoist=false
# hoist-pattern[]=autoprefixer
# hoist-pattern[]=redux-mock-store

#########################################
# WARNGING Add public-hoist-pattern ONLY if you don't have other solution
#########################################

# ES LINT
public-hoist-pattern[]=eslint-plugin-angular
public-hoist-pattern[]=eslint-plugin-cypress
Expand All @@ -24,7 +22,6 @@ public-hoist-pattern[]=eslint-plugin-testing-library
# STYLE LINT
public-hoist-pattern[]=postcss-scss
public-hoist-pattern[]=stylelint-config-sass-guidelines
#public-hoist-pattern[]=*eslint*

# JEST
public-hoist-pattern[]=jest-environment-jsdom
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
"prettier.configPath": ".prettierrc.js",
"eslint.workingDirectories": [
{
"pattern": "packages/**"
Expand Down
39 changes: 23 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tools/scripts-config-prettier/.prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const path = require('path');
const isTS = fs.existsSync(path.join(process.cwd(), 'tsconfig.json'));

module.exports = {
plugins: [require.resolve('@trivago/prettier-plugin-sort-imports')],
importOrder: [
'^@babel/polyfill',
'jquery', // jquery needs to be imported before angular
Expand All @@ -15,7 +16,7 @@ module.exports = {
'.*scss',
],
importOrderSeparation: true,
experimentalBabelParserPluginsList: ['jsx', isTS && 'typescript'].filter(Boolean),
importOrderParserPlugins: ['jsx', isTS && 'typescript'].filter(Boolean),
printWidth: 100,
singleQuote: true,
trailingComma: 'all',
Expand Down
3 changes: 3 additions & 0 deletions tools/scripts-config-prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
"license": "Apache-2.0",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@trivago/prettier-plugin-sort-imports": "^3.4.0"
}
}

0 comments on commit 1906997

Please sign in to comment.