• eslint 配置


    eslint配置

    module.exports = {
      root: true,
      parser: '@typescript-eslint/parser',
      parserOptions: {
        ecmaVersion: 2020, // Use the latest ecmascript standard
        sourceType: 'module', // Allows using import/export statements
        ecmaFeatures: {
          jsx: true // Enable JSX since we're using React
        }
      },
      env: {
        browser: true, // Enables browser globals like window and document
        amd: true, // Enables require() and define() as global variables as per the amd spec.
        node: true // Enables Node.js global variables and Node.js scoping.
      },
      extends: [
        'standard',
        'plugin:@typescript-eslint/recommended',
        'plugin:react/recommended',
        'plugin:react-hooks/recommended',
        'plugin:jsx-a11y/recommended'
        // 'plugin:prettier/recommended'
      ],
      plugins: ['@typescript-eslint', 'prettier'],
      settings: {
        react: {
          version: 'detect' // Automatically detect the react version
        }
      },
      rules: {
        'prettier/prettier': ['error', {}, { usePrettierrc: true }],
        // 'React' must be in scope when using JSX
        'react/react-in-jsx-scope': 'off',
        'space-before-function-paren': 'off'
      }
    }
    

    prettier配置

    module.exports = {
      singleQuote: true,
      trailingComma: 'none',
      semi: false
    }
    
  • 相关阅读:
    程序崩溃访问非法内存
    C# IP转换,时间转换
    _heap_alloc_dbg 崩溃
    TaskIcon 系统任务栏图标
    zlib 压缩使用
    桌面清理工具
    CMMI知识库(精简版)
    JAVA程序员面试题集合
    OracleDECODE用法
    Oracle索引重建
  • 原文地址:https://www.cnblogs.com/li1234yun/p/14409141.html
Copyright © 2020-2023  润新知