GithubHelp home page GithubHelp logo

smart-search-bar's Introduction

속성 태그 기능의 스마트 서치바

init 절차

1. default

bash

$ yarn create react-app ./ --typescript
$ yarn add ts-optchain -D

files

  • .env
NODE_PATH=src
REACT_EDITOR=atom
  • .images.d.ts
declare module '*.svg';
declare module '*.png';
declare module '*.jpg';
declare module '*.jpeg';
declare module '*.gif';
declare module '*.bmp';
declare module '*.tiff';
  • tsconfig.paths.json
{
  "compilerOptions": {
    "baseUrl": "./src",
    "paths": {
      "*": ["*"]
    }
  }
}
  • tsconfig.json
{
  "extends": "./tsconfig.paths.json",
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "plugins": [
      {
        "transform": "ts-optchain/transform"
      }
    ],,
    "baseUrl": "./src/",
    "paths": {
      "*": ["*"]
    },
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "preserve"
  },
  "include": ["src"]
}

2. eslint

extension

  • eslint

bash

$ yarn create react-app ./ --typescript
$ yarn add eslint-config-react-app eslint-plugin-react eslint-plugin-sort-class-members @typescript-eslint/eslint-plugin @typescript-eslint/parser prettier-eslint -D

files

  • .eslintrc
{
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "./tsconfig.json",
    "ecmaVersion": 2018,
    "sourceType": "module"
  },
  "extends": [
    "plugin:react/recommended",
    "plugin:@typescript-eslint/recommended"
  ],
  "plugins": ["sort-class-members"],
  "ecmaFeatures": {
    "jsx": true,
    "tsx": true
  },
  "rules": {
    "indent": "off",
    "semi": "warn",
    "quote-props": ["error", "as-needed"],
    "sort-class-members/sort-class-members": [
      2,
      {
        "order": [
          "[static-properties]",
          "[static-methods]",
          "[properties]",
          "[conventional-private-properties]",
          "constructor",
          "[methods]",
          "[conventional-private-methods]"
        ],
        "accessorPairPositioning": "getThenSet"
      }
    ],
    "@typescript-eslint/indent": ["error", 2],
    "@typescript-eslint/no-use-before-define": "off",
    "@typescript-eslint/explicit-function-return-type": "off",
    "@typescript-eslint/explicit-member-accessibility": [
      "warn",
      {
        "accessibility": "explicit",
        "overrides": {
          "constructors": "no-public",
          "methods": "no-public",
          "properties": "no-public"
        }
      }
    ],
    "@typescript-eslint/no-empty-interface": "warn",
    "@typescript-eslint/member-delimiter-style": "warn",
    "@typescript-eslint/no-non-null-assertion": "warn",
    "@typescript-eslint/camelcase": "warn",
    "@typescript-eslint/array-type": "warn",
    "@typescript-eslint/no-object-literal-type-assertion": [
      true,
      { "allow-arguments": true }
    ],
    "react/jsx-boolean-value": ["error", "never"],
    "react/sort-prop-types": [
      "warning",
      {
        "callbacksLast": true,
        "noSortAlphabetically": true
      }
    ],
    "react/jsx-curly-spacing": ["error", { "when": "never" }]
  },
  "settings": {
    "react": {
      "version": "detect"
    }
  }
}

3. stylelint

extension

  • stylelint
  • prettier

bash

$ yarn add stylelint stylelint-order stylelint-config-rational-order stylelint-config-recommended prettier-stylelint -D

files

.stylelintrc
{
  "extends": [
    "stylelint-config-recommended",
    "stylelint-config-rational-order"
  ],
  "rules": {
    "no-descending-specificity": true,
    "plugin/rational-order": true
  }
}

4. sass

bash

$ yarn add node-sass -D

smart-search-bar's People

Contributors

sebride4988 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.