Neverending Package Mountain

    cra-template-pretty-code

    1.1.0 • Public • Published

    cra-template-pretty-code

    react-scripts

    Create React App with Typescript, ESLint(Airbnb Styleguide), Prettier

    Get Started

    npx create-react-app my-app --template pretty-code
    
    # or yarn
    yarn create react-app my-app --template pretty-code

    Configuration Information

    ESLint

    // .eslintrc
    {
      "env": {
        "browser": true,
        "es6": true,
        "jest": true
      },
      "extends": [
        "airbnb",
        "airbnb/hooks",
        "airbnb-typescript",
        "plugin:@typescript-eslint/recommended",
        "plugin:jest/recommended",
        "plugin:prettier/recommended"
      ],
      "parser": "@typescript-eslint/parser",
      "parserOptions": {
        "ecmaFeatures": {
          "jsx": true
        },
        "ecmaVersion": 2018,
        "sourceType": "module",
        "project": "./tsconfig.json"
      },
      "plugins": ["@typescript-eslint", "jest", "react-hooks"],
      "ignorePatterns": ["setupTests.ts"],
      "rules": {
        "react/react-in-jsx-scope": "off",
        "react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
        "react/prop-types": "off",
        "react/jsx-props-no-spreading": "off",
        "react/no-array-index-key": "off",
        "react-hooks/rules-of-hooks": "error",
        "func-names": ["error", "as-needed"],
        "no-unused-vars": "warn",
        "@typescript-eslint/explicit-module-boundary-types": "off",
        "import/no-extraneous-dependencies": [
          "error",
          { "devDependencies": ["**/*.test.ts", "**/*.test.tsx"] }
        ]
      },
      "settings": {
        "react": {
          "version": "detect"
        }
      }
    }

    Prettier

    // .prettierrc
    {
      "singleQuote": true,
      "semi": true,
      "useTabs": false,
      "tabWidth": 2,
      "trailingComma": "all",
      "printWidth": 80
    }

    Install

    npm i cra-template-pretty-code

    DownloadsWeekly Downloads

    44

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    33.9 kB

    Total Files

    21

    Last publish

    Collaborators

    • lovelyhara