eslint-plugin-quintoandar
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -5,2 +5,8 @@ # Changelog | ||
## 1.1.0 - no-dynamic-import-index rule | ||
### Features | ||
- Create no-dynamic-import-index rule to disallow dynamic imports of 'index' files, i.e. `import('./index')`, `import('../index')` | ||
## 1.0.1 - Fixes in readme | ||
@@ -7,0 +13,0 @@ |
/* eslint-disable global-require */ | ||
module.exports = { | ||
rules: { | ||
'no-dynamic-import-index': require('./rules/no-dynamic-import-index'), | ||
'no-target-blank': require('./rules/no-target-blank'), | ||
@@ -5,0 +6,0 @@ 'no-typo-components': require('./rules/no-typo-components'), |
{ | ||
"name": "eslint-plugin-quintoandar", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "An eslint-plugin for PWA-Tenants custom rules", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,3 +8,3 @@ <div align="center"> | ||
* [Getting start](#getting-start) | ||
* [Getting started](#getting-started) | ||
* [Rules](#rules) | ||
@@ -14,5 +14,5 @@ * [Versioning](#versioning) | ||
## Getting start | ||
## Getting started | ||
This package provides QuintoAndar's custom eslint rules, that are created by our engineer's demand. | ||
This package provides QuintoAndar's custom eslint rules, that are created by our engineers' demand. | ||
All these rules are accessible in the eslint config that is plugged in. For example, the package `eslint-config-quintoandar-pwa` uses it as a plugin. | ||
@@ -23,5 +23,4 @@ | ||
- use directly, applying to everybody | ||
- use new custom rule progressive | ||
- use new custom rule progressively | ||
### How to add in a project as an eslint plugin | ||
@@ -53,2 +52,14 @@ | ||
### No dynamic import index | ||
Do not allow dynamically importing `index` files i.e. `import('./index')`, `import('../index')`. This rule was created because if multiple [react-loadable](https://github.com/jamiebuilds/react-loadable) components used the same path in the `import()` call, it would cause problems during chunk resolution and a page would load more JS chunks than necessary. Since most of the problems arose with multiple files named 'index', this rules suggests to rename them with a more specific name. | ||
#### How to use it | ||
Just add the code below in your rules array: | ||
```js | ||
"quintoandar/no-dynamic-import-index": 2, | ||
``` | ||
### No target blank | ||
@@ -63,3 +74,3 @@ | ||
```js | ||
"internal/no-target-blank": 2, | ||
"quintoandar/no-target-blank": 2, | ||
``` | ||
@@ -73,3 +84,3 @@ | ||
Just add the code below in your rules array | ||
Just add the code below in your rules array: | ||
@@ -82,3 +93,3 @@ ```js | ||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [CHANGELOG.md](https://github.com/quintoandar/eslint-config-quintoandar/blob/master/eslint-config-quintoandar-pwa/CHANGELOG.md) | ||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [CHANGELOG.md](https://github.com/quintoandar/eslint-config-quintoandar/blob/master/eslint-plugin-quintoandar/CHANGELOG.md) | ||
@@ -85,0 +96,0 @@ |
15436
10
273
115