Skip to content

Commit

Permalink
docs(extensions): improved cases for using @/...
Browse files Browse the repository at this point in the history
  • Loading branch information
wenfangdu committed Aug 9, 2021
1 parent 202e5e0 commit 99f3158
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/rules/extensions.md
Expand Up @@ -109,6 +109,8 @@ import foo from './foo';
import bar from './bar';

import Component from './Component';

import foo from '@/foo';
```

The following patterns are not considered problems when configuration set to "always":
Expand All @@ -121,6 +123,8 @@ import bar from './bar.json';
import Component from './Component.jsx';

import * as path from 'path';

import foo from '@/foo.js';
```

The following patterns are considered problems when configuration set to "ignorePackages":
Expand All @@ -145,6 +149,7 @@ import Component from './Component.jsx';

import express from 'express';

import foo from '@/foo'
```

The following patterns are not considered problems when configuration set to `['error', 'always', {ignorePackages: true} ]`:
Expand All @@ -156,6 +161,7 @@ import baz from 'foo/baz.js';

import express from 'express';

import foo from '@/foo';
```

## When Not To Use It
Expand Down

0 comments on commit 99f3158

Please sign in to comment.