Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use import/order eslint check #5150

Merged
merged 2 commits into from
Mar 17, 2021
Merged

Use import/order eslint check #5150

merged 2 commits into from
Mar 17, 2021

Conversation

timleslie
Copy link
Contributor

@timleslie timleslie commented Mar 17, 2021

We now apply the import/order rule from https://github.com/benmosher/eslint-plugin-import so that we can have consistent ordering of our imports. Order below:

// 1. node "builtin" modules
import fs from 'fs';
import path from 'path';
// 2. "external" modules
import _ from 'lodash';
import chalk from 'chalk';
// 3. "internal" modules
// (if you have configured your path or webpack to handle your internal paths differently)
import foo from 'src/foo';
// 4. modules from a "parent" directory
import foo from '../foo';
import qux from '../../foo/qux';
// 5. "sibling" modules from the same or a sibling's directory
import bar from './bar';
import baz from './bar/baz';
// 6. "index" of the current directory
import main from './';
// 7. "object"-imports (only available in TypeScript)
import log = console.log;

@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2021

🦋 Changeset detected

Latest commit: 9ecbc74

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 40 packages
Name Type
@keystone-ui/core Patch
@keystone-ui/fields Patch
@keystone-ui/notice Patch
@keystone-ui/website Patch
@keystone-next/website Patch
@keystone-next/example-auth Patch
@keystone-next/example-ecommerce Patch
@keystone-next/example-roles Patch
@keystone-next/example-todo Patch
@keystone-next/admin-ui Patch
@keystone-next/admin-ui-utils Patch
@keystone-next/auth Patch
@keystone-next/cloudinary Patch
@keystone-next/fields Patch
@keystone-next/fields-document Patch
@keystone-next/keystone Patch
@keystone-next/session-store-redis Patch
@keystone-next/types Patch
@keystone-next/adapter-mongoose-legacy Patch
@keystone-next/adapter-prisma-legacy Patch
@keystone-next/app-admin-ui-legacy Patch
@keystone-next/app-static-legacy Patch
@keystone-next/field-views-loader-legacy Patch
@keystone-next/fields-legacy Patch
@keystone-next/fields-auto-increment-legacy Patch
@keystone-next/fields-cloudinary-image-legacy Patch
@keystone-next/fields-color-legacy Patch
@keystone-next/fields-location-google-legacy Patch
@keystone-next/fields-markdown-legacy Patch
@keystone-next/fields-mongoid-legacy Patch
@keystone-next/fields-oembed-legacy Patch
@keystone-next/fields-unsplash-legacy Patch
@keystone-next/keystone-legacy Patch
@keystone-next/test-utils-legacy Patch
@keystone-next/api-tests-legacy Patch
@keystonejs/examples-smoke-tests Patch
@keystone-next/cypress-project-access-control-legacy Patch
@keystone-next/cypress-project-basic-legacy Patch
@keystone-next/cypress-project-client-validation-legacy Patch
@keystone-next/cypress-project-login-legacy Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Mar 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/4mUWgS7iGUPKvbR1Hs6J9DqvdXFr
✅ Preview: https://keystone-next-docs-git-eslint-import-order-keystonejs.vercel.app

@timleslie timleslie requested a review from a team March 17, 2021 01:29
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 17, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9ecbc74:

Sandbox Source
@keystone-next/example-sandbox Configuration

@vercel vercel bot temporarily deployed to Preview March 17, 2021 01:46 Inactive
Copy link
Contributor

@gwyneplaine gwyneplaine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix typescript error as noted in comments, otherwise lgtm

@vercel vercel bot temporarily deployed to Preview March 17, 2021 02:28 Inactive
@timleslie timleslie enabled auto-merge (squash) March 17, 2021 02:28
@timleslie timleslie merged commit 3a9d20c into master Mar 17, 2021
@timleslie timleslie deleted the eslint-import-order branch March 17, 2021 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants