eslint-plugin-import
ESLint plugin with rules that help validate proper imports. [Moved to: https://github.com/import-js/eslint-plugin-import] (by benmosher)
eslint-plugin-import
ESLint plugin with rules that help validate proper imports. (by import-js)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
eslint-plugin-import | eslint-plugin-import | |
---|---|---|
3 | 45 | |
3,509 | 5,309 | |
- | 0.7% | |
9.1 | 8.3 | |
over 2 years ago | 6 days ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
eslint-plugin-import
Posts with mentions or reviews of eslint-plugin-import.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-08-26.
-
How to remove ESlint error no-unresolved from importing 'react'
no-unresolved https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
-
Eslint with husky deleted changes
module.exports = { extends: 'erb', rules: { // A temporary hack related to IDE not resolving correct package.json 'import/no-extraneous-dependencies': 'off', 'import/no-unresolved': 'error', // Since React 17 and typescript 4.1 you can safely disable the rule 'react/react-in-jsx-scope': 'off', // custom overrides 'global-require': 'off', 'class-methods-use-this': 'off', 'promise/always-return': 'off', 'import/order': 'warn', 'import/prefer-default-export': 'off', 'jsx-a11y/media-has-caption': 'off', 'spaced-comment': 'off', 'jsx-a11y/label-has-associated-control': [ 'error', { required: { some: ['nesting', 'id'], }, }, ], 'jsx-a11y/label-has-for': [ 'error', { required: { some: ['nesting', 'id'], }, }, ], '@typescript-eslint/ban-ts-comment': 'off', 'prettier/prettier': 'off', }, plugins: ['prettier'], parserOptions: { ecmaVersion: 2020, sourceType: 'module', project: './tsconfig.json', tsconfigRootDir: __dirname, createDefaultProgram: true, }, settings: { 'import/resolver': { // See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below node: {}, webpack: { config: require.resolve('./.erb/configs/webpack.config.eslint.ts'), }, typescript: {}, }, 'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'], }, }, };
-
ESLint config for React and React Native development
eslint-plugin-import
eslint-plugin-import
Posts with mentions or reviews of eslint-plugin-import.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-09-21.
-
Speeding up the JavaScript ecosystem – Polyfills gone rogue
[2]: https://github.com/import-js/eslint-plugin-import/pull/2447#...
-
The Best ESLint Rules for React Projects
Finally, I'd also suggest requiring named exports via import:
-
PURISTA - Thanks to amazing open-source software
eslint-plugin-import
-
How to prevent other devs from using components from UI library directly?
You can 1. use a rule like this one to ensure that no one imports from antd and 2. limit what they can import from your library via https://nodejs.org/api/packages.html#main-entry-point-export
-
Need someone to explain why this happen regarding exporting
I'd check the eslint docs. They usually have a little write up about the rule.
-
React Component file naming convention?
Next, you add the ESLint rule or TypeScript configuration so it never happens again.
-
When to Create Standalone Components in Angular?
Are you using Eslint? It is possible to remove all the unused import on file level, but I don't remember if the setting is in the recommend config or the import/ordef plugin. If configured correctly, VS Code will prompt you with an option (CTRL+.) to "Delete all unused imports". It's only on file level though.
- People’s thoughts on ordering functions alphabetically in a react component?
-
3 popular Eslint rules that can make you write worse code.
Prefer default export (from airbnb style guide) I did drop default exports for a year now to use only named exports and they are actually (a slightly) better option. They provide a better DX, since you'll have autocomplete. The downside can be conflicts (which can be solved using an as to rename it). Don't refactor your entire codebase just to use it, but keep in mind for the next projects that named exports has better tradeoffs.
-
excluding folders/fildes when building
Yeah, the code under server should never get included unless you were to (transitively) import it from your entry point like App.tsx. Small suggestion, this is a good candidate for an ESLint rule if you use that.
What are some alternatives?
When comparing eslint-plugin-import and eslint-plugin-import you can also consider the following projects:
typescript-eslint - :sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript
prettier-plugin-organize-imports - Make Prettier organize your imports using the TypeScript language service API.