Skip to content

Commit

Permalink
docs: update default settings for rules in config (#1232)
Browse files Browse the repository at this point in the history
* docs: update default settings for rules in config

* docs: change require default to require.resolve
  • Loading branch information
WJCHumble committed Apr 3, 2023
1 parent 3402908 commit 4b75b2d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,22 @@ module.exports = {
```js
[
{
action: require('@linaria/shaker').default,
action: require.resolve('@linaria/shaker'),
},
{
test: /\/node_modules\//,
test: /[\\/]node_modules[\\/]/,
action: 'ignore',
},
{
test: (filename, code) => {
if (!/[\\/]node_modules[\\/]/.test(filename)) {
return false;
}
return /(?:^|\n|;)\s*(?:export|import)\s+/.test(code);
},
action: require.resolve('@linaria/shaker'),
}
];
```
Expand Down

0 comments on commit 4b75b2d

Please sign in to comment.