Skip to content

Add eslint/import plugin#143

Closed
digorath wants to merge 6 commits into
masterfrom
chore/add-typescript-eslint-recommended-and-prettier
Closed

Add eslint/import plugin#143
digorath wants to merge 6 commits into
masterfrom
chore/add-typescript-eslint-recommended-and-prettier

Conversation

@digorath

@digorath digorath commented Dec 8, 2020

Copy link
Copy Markdown
Collaborator

This PR is a suggestion and feedback on rule configuration is welcome.

Changes proposed in this PR:

Added imports plugin for eslint to take care of import sorting and grouping.

  • All rules are off by default, so the only added rule that is used from this plugin is import/order.

The only manually changed files in this PR are:

  • package.json (through yarn add ...)
  • eslintrc.yml
  • queries/index.js (comments between imports)

Fixes #128

@digorath digorath self-assigned this Dec 8, 2020
@digorath digorath added enhancement New feature or request refactoring Updating existing code labels Dec 8, 2020
@digorath digorath force-pushed the chore/add-typescript-eslint-recommended-and-prettier branch from b549089 to 3f566bf Compare December 11, 2020 12:04
@donni106 donni106 added this to the 1.5.0 milestone Dec 11, 2020
@donni106

donni106 commented Dec 11, 2020

Copy link
Copy Markdown
Member

@SoleCincis @digorath you can go through together and merge it afterwards.

@digorath

Copy link
Copy Markdown
Collaborator Author

I will update the PR towards the end of the year then.

@donni106 donni106 modified the milestones: 1.5.0, 1.4.3 Dec 16, 2020
@digorath digorath force-pushed the chore/add-typescript-eslint-recommended-and-prettier branch 2 times, most recently from 39778e3 to 5aeb575 Compare December 22, 2020 16:47
@digorath digorath changed the title Add @typescript/eslint-recommended, prettier and eslint/import plugin Add eslint/import plugin Dec 22, 2020
@digorath

Copy link
Copy Markdown
Collaborator Author

updated with master after merging the typescript recommended and prettier part separately.

@donni106 donni106 force-pushed the chore/add-typescript-eslint-recommended-and-prettier branch from ca77ee1 to da386a7 Compare January 6, 2021 19:06
@donni106 donni106 modified the milestones: 1.4.3, 1.4.4 Jan 7, 2021
@donni106

donni106 commented Jan 7, 2021

Copy link
Copy Markdown
Member

I made research and contacted the CodeClimate support.

@donni106 donni106 removed this from the 1.4.4 milestone Jan 12, 2021
@donni106

Copy link
Copy Markdown
Member

No answer from CodeClimate, even after consultation in the meantime. They stay quite on this :(

@donni106 donni106 marked this pull request as draft June 14, 2021 10:09
donni106 added 3 commits June 14, 2021 19:13
- added eslint/import plugin
  - enabled alphabetical sorting
  - enabled grouping
- added file extensions to analyze by CodeClimate
  https://docs.codeclimate.com/docs/eslint#extensions

> By default, the ESLint engine only analyzes .js files.
> If you want ESLint to analyze your JSX code and ES6 files,
> you'll need to specify this in your .codeclimate.yml, as shown
> in the example above.
- auto fixed most of them using
  `./node_modules/.bin/eslint . --fix`
- manually update imports in `queries/index.js`
@donni106 donni106 force-pushed the chore/add-typescript-eslint-recommended-and-prettier branch from da386a7 to bc7188e Compare June 14, 2021 17:20
donni106 added 3 commits June 14, 2021 19:49
- define settings more explicitly for the eslint import plugin
  to achieve better results
- removed `alphabetize` rule because codeclimate-eslint
  channel "eslint-7" is bundling an older version, that does
  not support it
  - see qltysh-archive/codeclimate-eslint#498 (comment)
- auto fixed most of them using
  `./node_modules/.bin/eslint ./src/**/* --fix
@donni106 donni106 force-pushed the chore/add-typescript-eslint-recommended-and-prettier branch from 6388e6a to e84f6f8 Compare June 14, 2021 18:29
@ghost

ghost commented Jun 14, 2021

Copy link
Copy Markdown

Congratulations 🎉. DeepCode analyzed your code in 4.137 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

👉 View analysis in DeepCode’s Dashboard | Configure the bot

👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !

If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin.

@qlty-cloud-legacy

Copy link
Copy Markdown

Code Climate has analyzed commit e84f6f8 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 3

View more on Code Climate.

@donni106

Copy link
Copy Markdown
Member

@donni106 donni106 marked this pull request as ready for review June 14, 2021 18:31
@donni106 donni106 added this to the 1.8.0 milestone Jun 14, 2021
@digorath

Copy link
Copy Markdown
Collaborator Author

Replaced by #244 after cherry picking setup commits.

@digorath digorath closed this Jun 22, 2021
@donni106 donni106 deleted the chore/add-typescript-eslint-recommended-and-prettier branch July 23, 2021 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request refactoring Updating existing code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ESlint] can the import structure be a rule?

2 participants