Blame view

node_modules/eslint-plugin-import/config/recommended.js 622 Bytes
ce4c83ff   wxy   初始提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  /**
   * The basics.
   * @type {Object}
   */
  module.exports = {
    plugins: ['import'],
  
    rules: {
      // analysis/correctness
      'import/no-unresolved': 'error',
      'import/named': 'error',
      'import/namespace': 'error',
      'import/default': 'error',
      'import/export': 'error',
  
      // red flags (thus, warnings)
      'import/no-named-as-default': 'warn',
      'import/no-named-as-default-member': 'warn',
      'import/no-duplicates': 'warn'
    },
  
    // need all these for parsing dependencies (even if _your_ code doesn't need
    // all of them)
    parserOptions: {
      sourceType: 'module',
      ecmaVersion: 2018,
    },
  }