ljlm0402 / typescript-express-starter

📘 Quick and Easy TypeScript Express Starter
http://npm.im/typescript-express-starter
MIT License
2.72k stars 420 forks source link

Parsing error: Unexpected token prettier/prettier #199

Open tiavina-mika opened 1 year ago

tiavina-mika commented 1 year ago

Describe the Bug (버그 설명)

when runing npm run lint -- --fix

Version to Reproduce (현재 사용한 버전)

typescript-express-starter@9.2.0

Steps to Reproduce (재현 순서)

run : npm run lint -- --fix

Expected Behavior (예상 동작)

No warning in the console

Actual Behavior (실제 동작)

Got warnings in the console: image

Additional Context (추가 사항)

Capture screen (캡쳐 화면)

eslintrc :

{
  "parser": "@typescript-eslint/parser",
  "extends": [
    "plugin:prettier/recommended",
    "eslint:recommended",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended"
  ],
  "parserOptions": {
    "ecmaVersion": 2018,
    "sourceType": "module",
    "tsconfigRootDir": "./",
    "project": "tsconfig.json"
  },
  "ignorePatterns": ["node_modules", "src/http", "src/logs", "src/tests", "jest.config.js"],
  "rules": {
    "@typescript-eslint/ban-ts-comment": "off",
    "@typescript-eslint/explicit-function-return-type": "off",
    "@typescript-eslint/no-inferrable-type": "off",
    "no-unused-vars": "off",
    "@typescript-eslint/no-unused-vars": ["warn"],
    "no-extra-boolean-cast": "off",
    "@typescript-eslint/no-unnecessary-type-arguments": "error",
    "@typescript-eslint/no-explicit-any": "off",
    "@typescript-eslint/prefer-nullish-coalescing": "error",
    "@typescript-eslint/prefer-optional-chain": "error",
    "@typescript-eslint/explicit-module-boundary-types": "error",
    "react/react-in-jsx-scope": "off",
    "prettier/prettier": "warn"
  }
}

prettierrc :

{
    "printWidth": 150,
    "tabWidth": 2,
    "singleQuote": true,
    "trailingComma": "all",
    "semi": true,
    "bracketSpacing": true,
    "arrowParens": "avoid",
    "importOrder": [
        "^express$",
        "<THIRD_PARTY_MODULES>",
        "^@/config/(.*)$",
        "^@/controllers/(.*)$",
        "^@/dtos/(.*)$",
        "^@/exceptions/(.*)$",
        "^@/interfaces/(.*)$",
        "^@/middlewares/(.*)$",
        "^@/models/(.*)$",
        "^@/routes/(.*)$",
        "^@/utils/(.*)$",
        "^@/services/(.*)$",
        "^@/cloud/(.*)$",
        "^@/types/(.*)$",
        "^@config/(.*)$",
        "^@controllers/(.*)$",
        "^@dtos/(.*)$",
        "^@exceptions/(.*)$",
        "^@interfaces/(.*)$",
        "^@middlewares/(.*)$",
        "^@models/(.*)$",
        "^@routes/(.*)$",
        "^@utils/(.*)$",
        "^@services/(.*)$",
        "^@cloud/(.*)$",
        "^@types/(.*)$",
        "^[./]"
      ],
      "importOrderSeparation": true,
      "importOrderCaseInsensitive": true,
      "importOrderGroupNamespaceSpecifiers": true,
      "importOrderParserPlugins" : ["flow", "[\"decorators\", { \"decoratorsBeforeExport\": true }]"],
      "decoratorsBeforeExport": true
}

Exemple of the prettier warning: image