最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Why Eslint plugin for import order doesn't work in CRA? - Stack Overflow

programmeradmin5浏览0评论

I installed eslint-plugin-import-order and add it to eslintConfig in package.json.

Error I have:

Definition for rule 'import/order' was not found (import/order)

Please, help me to deal with it.

Sandbox:

I installed eslint-plugin-import-order and add it to eslintConfig in package.json.

Error I have:

Definition for rule 'import/order' was not found (import/order)

Please, help me to deal with it.

Sandbox: https://codesandbox.io/s/elegant-elbakyan-pilnc

Share Improve this question asked May 11, 2021 at 14:41 bigbabywebbigbabyweb 3881 gold badge5 silver badges12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 18

Note: eslint-plugin-import-order has been deprecated. Please use this https://github.com/benmosher/eslint-plugin-import

create a .eslintrc.json file and add the plugin like below.

{
  ....,
  "extends": ["eslint:recommended", "plugin:import/errors", "plugin:import/warnings"],

  "plugins": ["import"],
  
  .....
}

Restart your local server once to ensure the changes are reflected.

发布评论

评论列表(0)

  1. 暂无评论