Skip to content

Commit

Permalink
fix: override root config of prettier if a config file exist in packa…
Browse files Browse the repository at this point in the history
…ges (#4995)
  • Loading branch information
smouillour authored Nov 20, 2023
1 parent 8b1dc1f commit a90f6e9
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 31 deletions.
18 changes: 18 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
module.exports = {
...require('@talend/scripts-config-prettier'),
overrides: [
{
files: 'fork/module-to-cdn/**/*',
...require('./fork/module-to-cdn/.prettierrc'),
},
{
files: 'packages/design-system/**/*',
...require('./packages/design-system/.prettierrc'),
},
{
files: 'packages/stepper/**/*',
...require('./packages/stepper/.prettierrc'),
},
{
files: 'packages/storybook-docs/**/*',
...require('./packages/storybook-docs/.prettierrc'),
},
],
};
8 changes: 0 additions & 8 deletions fork/module-to-cdn/.prettierrc

This file was deleted.

8 changes: 8 additions & 0 deletions fork/module-to-cdn/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
printWidth: 100,
singleQuote: true,
trailingComma: 'none',
semi: true,
arrowParens: 'avoid',
bracketSpacing: false
};
23 changes: 0 additions & 23 deletions packages/storybook-docs/.prettierrc

This file was deleted.

23 changes: 23 additions & 0 deletions packages/storybook-docs/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
arrowParens: 'avoid',
printWidth: 100,
singleQuote: true,
trailingComma: 'all',
semi: true,
useTabs: true,
overrides: [
{
files: '**/*.json',
options: {
tabWidth: 2,
useTabs: false,
},
},
{
files: '**/*.scss',
options: {
printWidth: 1000,
},
},
],
};

0 comments on commit a90f6e9

Please sign in to comment.