Tibfib / Eslint Plugin Import Helpers
ESLint plugin to help enforce a configurable order for import statements
Stars: ✭ 198
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Eslint Plugin Import Helpers
Eslint Plugin Import
ESLint plugin with rules that help validate proper imports.
Stars: ✭ 3,722 (+1779.8%)
Mutual labels: eslint, import
Eslint Import Resolver Jest
🃏 Jest import resolution plugin for eslint-plugin-import
Stars: ✭ 29 (-85.35%)
Mutual labels: eslint, import
Eslint Plugin Boundaries
Eslint plugin checking architecture boundaries between elements
Stars: ✭ 157 (-20.71%)
Mutual labels: eslint, import
Awesome Vue Cli3 Example
🦅 Awesome example for rapid Vue.js development using vue-cli3 .
Stars: ✭ 160 (-19.19%)
Mutual labels: eslint
Eslint docs
🇨🇳A translation of ESLint Documents, including configration and rules.
Stars: ✭ 163 (-17.68%)
Mutual labels: eslint
React Molin
react-molin是一个全新的基于webpack3、react15、react-router4、antd-mobile的前端架构实现方案(h5)
Stars: ✭ 184 (-7.07%)
Mutual labels: eslint
100 Days Of Code Frontend
Curriculum for learning front-end development during #100DaysOfCode.
Stars: ✭ 2,419 (+1121.72%)
Mutual labels: eslint
Hitrava
Convert your Huawei Health sport activities and import them in Strava.
Stars: ✭ 156 (-21.21%)
Mutual labels: import
Eslint Config Wesbos
No-Sweat™ Eslint and Prettier Setup - with or without VS Code
Stars: ✭ 2,293 (+1058.08%)
Mutual labels: eslint
Eslint Config Standard
ESLint Config for JavaScript Standard Style
Stars: ✭ 2,229 (+1025.76%)
Mutual labels: eslint
Poetic
Automatically install and maintain ESLint, Prettier, EditorConfig and Airbnb rules for JavaScript, TypeScript and React.
Stars: ✭ 165 (-16.67%)
Mutual labels: eslint
Eslint Config Alloy
Progressive ESLint config for your React/Vue/TypeScript projects
Stars: ✭ 2,202 (+1012.12%)
Mutual labels: eslint
Wanna
💡✔ Wanna is an implementation of a 21st-century to-do list app.
Stars: ✭ 189 (-4.55%)
Mutual labels: eslint
Eslint Plugin Jquery
Disallow jQuery functions with native equivalents.
Stars: ✭ 188 (-5.05%)
Mutual labels: eslint
Csvreader
csvreader library / gem - read tabular data in the comma-separated values (csv) format the right way (uses best practices out-of-the-box with zero-configuration)
Stars: ✭ 169 (-14.65%)
Mutual labels: import
Express React Boilerplate
Express, MySQL, React/Redux, NodeJs Application Boilerplate
Stars: ✭ 179 (-9.6%)
Mutual labels: eslint
eslint-plugin-import-helpers
Originally forked/inspired by eslint-plugin-import and this fork
This package was created to supplement the rules provided by eslint-plugin-import. There are a lot of great rules in there, but we found it missing a few key use cases.
Rules
order-imports
Enforce a configurable convention in module import order. See the order-imports
page for configuration details.
// Given ESLint Config
rules: {
'import-helpers/order-imports': [
'warn',
{
newlinesBetween: 'always', // new line between groups
groups: [
'module',
'/^@shared/',
['parent', 'sibling', 'index'],
],
alphabetize: { order: 'asc', ignoreCase: true },
},
],
}
// will fix
import SiblingComponent from './SiblingComponent';
import lodash from 'lodash';
import SharedComponent from '@shared/components/SharedComponent';
import React from 'react';
// into
import lodash from 'lodash';
import React from 'react';
import SharedComponent from '@shared/components/SharedComponent';
import SiblingComponent from './SiblingComponent';
Installation
npm install eslint-plugin-import-helpers -g
or if you manage ESLint as a dev dependency:
# inside your project's working tree
npm install eslint-plugin-import-helpers --save-dev
To add a rule, update your .eslintrc.(yml|json|js)
:
{
// .eslintrc.js
plugins: ['eslint-plugin-import-helpers'],
rules: {
'import-helpers/order-imports': [
'warn',
{ // example configuration
newlinesBetween: 'always',
groups: [
'module',
'/^@shared/',
['parent', 'sibling', 'index'],
],
alphabetize: { order: 'asc', ignoreCase: true },
},
],
}
}
TypeScript
To use this plugin with TypeScript, you must use the TypeScript parser for ESLint. See @typescript-eslint/parser for more details.
Working with This Repo
Dependencies
Name | Version |
---|---|
node.js | 10.x |
yarn | 1.x |
Gulp v3 is the thing keeping us at node.js v10
Running Tests
First, yarn install
Then, yarn test
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].