Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error: Unexpected token prettier/prettier #199

Open
tiavina-mika opened this issue Feb 1, 2023 · 0 comments
Open

Parsing error: Unexpected token prettier/prettier #199

tiavina-mika opened this issue Feb 1, 2023 · 0 comments
Assignees
Labels
🐞 Bug Something isn't working

Comments

@tiavina-mika
Copy link

tiavina-mika commented Feb 1, 2023

Describe the Bug (버그 설명)

when runing npm run lint -- --fix

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

[email protected]

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

@tiavina-mika tiavina-mika added the 🐞 Bug Something isn't working label Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants